/*
 * MIT License
 *
 * Copyright (c) 2023 OrdinaryRoad
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: douyin_websocket_frame.proto

package tech.ordinaryroad.live.chat.client.douyin.protobuf;

/**
 * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame}
 */
public final class douyin_websocket_frame extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame)
    douyin_websocket_frameOrBuilder {
private static final long serialVersionUID = 0L;
  // Use douyin_websocket_frame.newBuilder() to construct.
  private douyin_websocket_frame(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private douyin_websocket_frame() {
    payloadEncoding_ = "";
    payloadType_ = "";
    payload_ = com.google.protobuf.ByteString.EMPTY;
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new douyin_websocket_frame();
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_websocket_frameProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapField internalGetMapField(
      int number) {
    switch (number) {
      case 5:
        return internalGetHeadersList();
      default:
        throw new RuntimeException(
            "Invalid map field number: " + number);
    }
  }
  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_websocket_frameProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame.Builder.class);
  }

  public static final int SEQ_ID_FIELD_NUMBER = 1;
  private long seqId_ = 0L;
  /**
   * <code>uint64 seq_id = 1;</code>
   * @return The seqId.
   */
  @java.lang.Override
  public long getSeqId() {
    return seqId_;
  }

  public static final int LOG_ID_FIELD_NUMBER = 2;
  private long logId_ = 0L;
  /**
   * <code>uint64 log_id = 2;</code>
   * @return The logId.
   */
  @java.lang.Override
  public long getLogId() {
    return logId_;
  }

  public static final int SERVICE_FIELD_NUMBER = 3;
  private long service_ = 0L;
  /**
   * <code>uint64 service = 3;</code>
   * @return The service.
   */
  @java.lang.Override
  public long getService() {
    return service_;
  }

  public static final int METHOD_FIELD_NUMBER = 4;
  private long method_ = 0L;
  /**
   * <code>uint64 method = 4;</code>
   * @return The method.
   */
  @java.lang.Override
  public long getMethod() {
    return method_;
  }

  public static final int HEADERS_LIST_FIELD_NUMBER = 5;
  private static final class HeadersListDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<
        java.lang.String, java.lang.String> defaultEntry =
            com.google.protobuf.MapEntry
            .<java.lang.String, java.lang.String>newDefaultInstance(
                tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_websocket_frameProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_HeadersListEntry_descriptor, 
                com.google.protobuf.WireFormat.FieldType.STRING,
                "",
                com.google.protobuf.WireFormat.FieldType.STRING,
                "");
  }
  @SuppressWarnings("serial")
  private com.google.protobuf.MapField<
      java.lang.String, java.lang.String> headersList_;
  private com.google.protobuf.MapField<java.lang.String, java.lang.String>
  internalGetHeadersList() {
    if (headersList_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          HeadersListDefaultEntryHolder.defaultEntry);
    }
    return headersList_;
  }
  public int getHeadersListCount() {
    return internalGetHeadersList().getMap().size();
  }
  /**
   * <code>map&lt;string, string&gt; headers_list = 5;</code>
   */
  @java.lang.Override
  public boolean containsHeadersList(
      java.lang.String key) {
    if (key == null) { throw new NullPointerException("map key"); }
    return internalGetHeadersList().getMap().containsKey(key);
  }
  /**
   * Use {@link #getHeadersListMap()} instead.
   */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getHeadersList() {
    return getHeadersListMap();
  }
  /**
   * <code>map&lt;string, string&gt; headers_list = 5;</code>
   */
  @java.lang.Override
  public java.util.Map<java.lang.String, java.lang.String> getHeadersListMap() {
    return internalGetHeadersList().getMap();
  }
  /**
   * <code>map&lt;string, string&gt; headers_list = 5;</code>
   */
  @java.lang.Override
  public /* nullable */
java.lang.String getHeadersListOrDefault(
      java.lang.String key,
      /* nullable */
java.lang.String defaultValue) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map<java.lang.String, java.lang.String> map =
        internalGetHeadersList().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   * <code>map&lt;string, string&gt; headers_list = 5;</code>
   */
  @java.lang.Override
  public java.lang.String getHeadersListOrThrow(
      java.lang.String key) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map<java.lang.String, java.lang.String> map =
        internalGetHeadersList().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int PAYLOAD_ENCODING_FIELD_NUMBER = 6;
  @SuppressWarnings("serial")
  private volatile java.lang.Object payloadEncoding_ = "";
  /**
   * <code>string payload_encoding = 6;</code>
   * @return The payloadEncoding.
   */
  @java.lang.Override
  public java.lang.String getPayloadEncoding() {
    java.lang.Object ref = payloadEncoding_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      payloadEncoding_ = s;
      return s;
    }
  }
  /**
   * <code>string payload_encoding = 6;</code>
   * @return The bytes for payloadEncoding.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getPayloadEncodingBytes() {
    java.lang.Object ref = payloadEncoding_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      payloadEncoding_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PAYLOAD_TYPE_FIELD_NUMBER = 7;
  @SuppressWarnings("serial")
  private volatile java.lang.Object payloadType_ = "";
  /**
   * <code>string payload_type = 7;</code>
   * @return The payloadType.
   */
  @java.lang.Override
  public java.lang.String getPayloadType() {
    java.lang.Object ref = payloadType_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      payloadType_ = s;
      return s;
    }
  }
  /**
   * <code>string payload_type = 7;</code>
   * @return The bytes for payloadType.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getPayloadTypeBytes() {
    java.lang.Object ref = payloadType_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      payloadType_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PAYLOAD_FIELD_NUMBER = 8;
  private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
  /**
   * <code>bytes payload = 8;</code>
   * @return The payload.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getPayload() {
    return payload_;
  }

  private byte memoizedIsInitialized = -1;
  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (seqId_ != 0L) {
      output.writeUInt64(1, seqId_);
    }
    if (logId_ != 0L) {
      output.writeUInt64(2, logId_);
    }
    if (service_ != 0L) {
      output.writeUInt64(3, service_);
    }
    if (method_ != 0L) {
      output.writeUInt64(4, method_);
    }
    com.google.protobuf.GeneratedMessageV3
      .serializeStringMapTo(
        output,
        internalGetHeadersList(),
        HeadersListDefaultEntryHolder.defaultEntry,
        5);
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadEncoding_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, payloadEncoding_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadType_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, payloadType_);
    }
    if (!payload_.isEmpty()) {
      output.writeBytes(8, payload_);
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (seqId_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt64Size(1, seqId_);
    }
    if (logId_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt64Size(2, logId_);
    }
    if (service_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt64Size(3, service_);
    }
    if (method_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt64Size(4, method_);
    }
    for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
         : internalGetHeadersList().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
      headersList__ = HeadersListDefaultEntryHolder.defaultEntry.newBuilderForType()
          .setKey(entry.getKey())
          .setValue(entry.getValue())
          .build();
      size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(5, headersList__);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadEncoding_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, payloadEncoding_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadType_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, payloadType_);
    }
    if (!payload_.isEmpty()) {
      size += com.google.protobuf.CodedOutputStream
        .computeBytesSize(8, payload_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame)) {
      return super.equals(obj);
    }
    tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame) obj;

    if (getSeqId()
        != other.getSeqId()) return false;
    if (getLogId()
        != other.getLogId()) return false;
    if (getService()
        != other.getService()) return false;
    if (getMethod()
        != other.getMethod()) return false;
    if (!internalGetHeadersList().equals(
        other.internalGetHeadersList())) return false;
    if (!getPayloadEncoding()
        .equals(other.getPayloadEncoding())) return false;
    if (!getPayloadType()
        .equals(other.getPayloadType())) return false;
    if (!getPayload()
        .equals(other.getPayload())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + SEQ_ID_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getSeqId());
    hash = (37 * hash) + LOG_ID_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getLogId());
    hash = (37 * hash) + SERVICE_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getService());
    hash = (37 * hash) + METHOD_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getMethod());
    if (!internalGetHeadersList().getMap().isEmpty()) {
      hash = (37 * hash) + HEADERS_LIST_FIELD_NUMBER;
      hash = (53 * hash) + internalGetHeadersList().hashCode();
    }
    hash = (37 * hash) + PAYLOAD_ENCODING_FIELD_NUMBER;
    hash = (53 * hash) + getPayloadEncoding().hashCode();
    hash = (37 * hash) + PAYLOAD_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + getPayloadType().hashCode();
    hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
    hash = (53 * hash) + getPayload().hashCode();
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame)
      tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frameOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_websocket_frameProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMapField(
        int number) {
      switch (number) {
        case 5:
          return internalGetHeadersList();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMutableMapField(
        int number) {
      switch (number) {
        case 5:
          return internalGetMutableHeadersList();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_websocket_frameProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame.Builder.class);
    }

    // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame.newBuilder()
    private Builder() {

    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);

    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      seqId_ = 0L;
      logId_ = 0L;
      service_ = 0L;
      method_ = 0L;
      internalGetMutableHeadersList().clear();
      payloadEncoding_ = "";
      payloadType_ = "";
      payload_ = com.google.protobuf.ByteString.EMPTY;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_websocket_frameProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_descriptor;
    }

    @java.lang.Override
    public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame getDefaultInstanceForType() {
      return tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame.getDefaultInstance();
    }

    @java.lang.Override
    public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame build() {
      tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame buildPartial() {
      tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame(this);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.seqId_ = seqId_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.logId_ = logId_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.service_ = service_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.method_ = method_;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.headersList_ = internalGetHeadersList();
        result.headersList_.makeImmutable();
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.payloadEncoding_ = payloadEncoding_;
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.payloadType_ = payloadType_;
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.payload_ = payload_;
      }
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }
    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.setField(field, value);
    }
    @java.lang.Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @java.lang.Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }
    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame) {
        return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame other) {
      if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame.getDefaultInstance()) return this;
      if (other.getSeqId() != 0L) {
        setSeqId(other.getSeqId());
      }
      if (other.getLogId() != 0L) {
        setLogId(other.getLogId());
      }
      if (other.getService() != 0L) {
        setService(other.getService());
      }
      if (other.getMethod() != 0L) {
        setMethod(other.getMethod());
      }
      internalGetMutableHeadersList().mergeFrom(
          other.internalGetHeadersList());
      bitField0_ |= 0x00000010;
      if (!other.getPayloadEncoding().isEmpty()) {
        payloadEncoding_ = other.payloadEncoding_;
        bitField0_ |= 0x00000020;
        onChanged();
      }
      if (!other.getPayloadType().isEmpty()) {
        payloadType_ = other.payloadType_;
        bitField0_ |= 0x00000040;
        onChanged();
      }
      if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) {
        setPayload(other.getPayload());
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {
              seqId_ = input.readUInt64();
              bitField0_ |= 0x00000001;
              break;
            } // case 8
            case 16: {
              logId_ = input.readUInt64();
              bitField0_ |= 0x00000002;
              break;
            } // case 16
            case 24: {
              service_ = input.readUInt64();
              bitField0_ |= 0x00000004;
              break;
            } // case 24
            case 32: {
              method_ = input.readUInt64();
              bitField0_ |= 0x00000008;
              break;
            } // case 32
            case 42: {
              com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
              headersList__ = input.readMessage(
                  HeadersListDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
              internalGetMutableHeadersList().getMutableMap().put(
                  headersList__.getKey(), headersList__.getValue());
              bitField0_ |= 0x00000010;
              break;
            } // case 42
            case 50: {
              payloadEncoding_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000020;
              break;
            } // case 50
            case 58: {
              payloadType_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000040;
              break;
            } // case 58
            case 66: {
              payload_ = input.readBytes();
              bitField0_ |= 0x00000080;
              break;
            } // case 66
            default: {
              if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                done = true; // was an endgroup tag
              }
              break;
            } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }
    private int bitField0_;

    private long seqId_ ;
    /**
     * <code>uint64 seq_id = 1;</code>
     * @return The seqId.
     */
    @java.lang.Override
    public long getSeqId() {
      return seqId_;
    }
    /**
     * <code>uint64 seq_id = 1;</code>
     * @param value The seqId to set.
     * @return This builder for chaining.
     */
    public Builder setSeqId(long value) {

      seqId_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * <code>uint64 seq_id = 1;</code>
     * @return This builder for chaining.
     */
    public Builder clearSeqId() {
      bitField0_ = (bitField0_ & ~0x00000001);
      seqId_ = 0L;
      onChanged();
      return this;
    }

    private long logId_ ;
    /**
     * <code>uint64 log_id = 2;</code>
     * @return The logId.
     */
    @java.lang.Override
    public long getLogId() {
      return logId_;
    }
    /**
     * <code>uint64 log_id = 2;</code>
     * @param value The logId to set.
     * @return This builder for chaining.
     */
    public Builder setLogId(long value) {

      logId_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * <code>uint64 log_id = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearLogId() {
      bitField0_ = (bitField0_ & ~0x00000002);
      logId_ = 0L;
      onChanged();
      return this;
    }

    private long service_ ;
    /**
     * <code>uint64 service = 3;</code>
     * @return The service.
     */
    @java.lang.Override
    public long getService() {
      return service_;
    }
    /**
     * <code>uint64 service = 3;</code>
     * @param value The service to set.
     * @return This builder for chaining.
     */
    public Builder setService(long value) {

      service_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     * <code>uint64 service = 3;</code>
     * @return This builder for chaining.
     */
    public Builder clearService() {
      bitField0_ = (bitField0_ & ~0x00000004);
      service_ = 0L;
      onChanged();
      return this;
    }

    private long method_ ;
    /**
     * <code>uint64 method = 4;</code>
     * @return The method.
     */
    @java.lang.Override
    public long getMethod() {
      return method_;
    }
    /**
     * <code>uint64 method = 4;</code>
     * @param value The method to set.
     * @return This builder for chaining.
     */
    public Builder setMethod(long value) {

      method_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     * <code>uint64 method = 4;</code>
     * @return This builder for chaining.
     */
    public Builder clearMethod() {
      bitField0_ = (bitField0_ & ~0x00000008);
      method_ = 0L;
      onChanged();
      return this;
    }

    private com.google.protobuf.MapField<
        java.lang.String, java.lang.String> headersList_;
    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetHeadersList() {
      if (headersList_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            HeadersListDefaultEntryHolder.defaultEntry);
      }
      return headersList_;
    }
    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetMutableHeadersList() {
      if (headersList_ == null) {
        headersList_ = com.google.protobuf.MapField.newMapField(
            HeadersListDefaultEntryHolder.defaultEntry);
      }
      if (!headersList_.isMutable()) {
        headersList_ = headersList_.copy();
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return headersList_;
    }
    public int getHeadersListCount() {
      return internalGetHeadersList().getMap().size();
    }
    /**
     * <code>map&lt;string, string&gt; headers_list = 5;</code>
     */
    @java.lang.Override
    public boolean containsHeadersList(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      return internalGetHeadersList().getMap().containsKey(key);
    }
    /**
     * Use {@link #getHeadersListMap()} instead.
     */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getHeadersList() {
      return getHeadersListMap();
    }
    /**
     * <code>map&lt;string, string&gt; headers_list = 5;</code>
     */
    @java.lang.Override
    public java.util.Map<java.lang.String, java.lang.String> getHeadersListMap() {
      return internalGetHeadersList().getMap();
    }
    /**
     * <code>map&lt;string, string&gt; headers_list = 5;</code>
     */
    @java.lang.Override
    public /* nullable */
java.lang.String getHeadersListOrDefault(
        java.lang.String key,
        /* nullable */
java.lang.String defaultValue) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map<java.lang.String, java.lang.String> map =
          internalGetHeadersList().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     * <code>map&lt;string, string&gt; headers_list = 5;</code>
     */
    @java.lang.Override
    public java.lang.String getHeadersListOrThrow(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map<java.lang.String, java.lang.String> map =
          internalGetHeadersList().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }
    public Builder clearHeadersList() {
      bitField0_ = (bitField0_ & ~0x00000010);
      internalGetMutableHeadersList().getMutableMap()
          .clear();
      return this;
    }
    /**
     * <code>map&lt;string, string&gt; headers_list = 5;</code>
     */
    public Builder removeHeadersList(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      internalGetMutableHeadersList().getMutableMap()
          .remove(key);
      return this;
    }
    /**
     * Use alternate mutation accessors instead.
     */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String>
        getMutableHeadersList() {
      bitField0_ |= 0x00000010;
      return internalGetMutableHeadersList().getMutableMap();
    }
    /**
     * <code>map&lt;string, string&gt; headers_list = 5;</code>
     */
    public Builder putHeadersList(
        java.lang.String key,
        java.lang.String value) {
      if (key == null) { throw new NullPointerException("map key"); }
      if (value == null) { throw new NullPointerException("map value"); }
      internalGetMutableHeadersList().getMutableMap()
          .put(key, value);
      bitField0_ |= 0x00000010;
      return this;
    }
    /**
     * <code>map&lt;string, string&gt; headers_list = 5;</code>
     */
    public Builder putAllHeadersList(
        java.util.Map<java.lang.String, java.lang.String> values) {
      internalGetMutableHeadersList().getMutableMap()
          .putAll(values);
      bitField0_ |= 0x00000010;
      return this;
    }

    private java.lang.Object payloadEncoding_ = "";
    /**
     * <code>string payload_encoding = 6;</code>
     * @return The payloadEncoding.
     */
    public java.lang.String getPayloadEncoding() {
      java.lang.Object ref = payloadEncoding_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        payloadEncoding_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string payload_encoding = 6;</code>
     * @return The bytes for payloadEncoding.
     */
    public com.google.protobuf.ByteString
        getPayloadEncodingBytes() {
      java.lang.Object ref = payloadEncoding_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        payloadEncoding_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string payload_encoding = 6;</code>
     * @param value The payloadEncoding to set.
     * @return This builder for chaining.
     */
    public Builder setPayloadEncoding(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      payloadEncoding_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     * <code>string payload_encoding = 6;</code>
     * @return This builder for chaining.
     */
    public Builder clearPayloadEncoding() {
      payloadEncoding_ = getDefaultInstance().getPayloadEncoding();
      bitField0_ = (bitField0_ & ~0x00000020);
      onChanged();
      return this;
    }
    /**
     * <code>string payload_encoding = 6;</code>
     * @param value The bytes for payloadEncoding to set.
     * @return This builder for chaining.
     */
    public Builder setPayloadEncodingBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      payloadEncoding_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }

    private java.lang.Object payloadType_ = "";
    /**
     * <code>string payload_type = 7;</code>
     * @return The payloadType.
     */
    public java.lang.String getPayloadType() {
      java.lang.Object ref = payloadType_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        payloadType_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string payload_type = 7;</code>
     * @return The bytes for payloadType.
     */
    public com.google.protobuf.ByteString
        getPayloadTypeBytes() {
      java.lang.Object ref = payloadType_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        payloadType_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string payload_type = 7;</code>
     * @param value The payloadType to set.
     * @return This builder for chaining.
     */
    public Builder setPayloadType(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      payloadType_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     * <code>string payload_type = 7;</code>
     * @return This builder for chaining.
     */
    public Builder clearPayloadType() {
      payloadType_ = getDefaultInstance().getPayloadType();
      bitField0_ = (bitField0_ & ~0x00000040);
      onChanged();
      return this;
    }
    /**
     * <code>string payload_type = 7;</code>
     * @param value The bytes for payloadType to set.
     * @return This builder for chaining.
     */
    public Builder setPayloadTypeBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      payloadType_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }

    private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
    /**
     * <code>bytes payload = 8;</code>
     * @return The payload.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getPayload() {
      return payload_;
    }
    /**
     * <code>bytes payload = 8;</code>
     * @param value The payload to set.
     * @return This builder for chaining.
     */
    public Builder setPayload(com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      payload_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     * <code>bytes payload = 8;</code>
     * @return This builder for chaining.
     */
    public Builder clearPayload() {
      bitField0_ = (bitField0_ & ~0x00000080);
      payload_ = getDefaultInstance().getPayload();
      onChanged();
      return this;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame)
  }

  // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame)
  private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame();
  }

  public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<douyin_websocket_frame>
      PARSER = new com.google.protobuf.AbstractParser<douyin_websocket_frame>() {
    @java.lang.Override
    public douyin_websocket_frame parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      Builder builder = newBuilder();
      try {
        builder.mergeFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(builder.buildPartial());
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e)
            .setUnfinishedMessage(builder.buildPartial());
      }
      return builder.buildPartial();
    }
  };

  public static com.google.protobuf.Parser<douyin_websocket_frame> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<douyin_websocket_frame> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

