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

package com.farsunset.cim.sdk.android.model.proto;

public final class SentBodyProto {
  private SentBodyProto() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }
  public interface ModelOrBuilder extends
      // @@protoc_insertion_point(interface_extends:com.farsunset.cim.sdk.android.model.proto.Model)
      com.google.protobuf.MessageLiteOrBuilder {

    /**
     * <code>optional string key = 1;</code>
     */
    String getKey();
    /**
     * <code>optional string key = 1;</code>
     */
    com.google.protobuf.ByteString
        getKeyBytes();

    /**
     * <code>optional int64 timestamp = 2;</code>
     */
    long getTimestamp();

    /**
     * <code>map&lt;string, string&gt; data = 3;</code>
     */
    int getDataCount();
    /**
     * <code>map&lt;string, string&gt; data = 3;</code>
     */
    boolean containsData(
            String key);
    /**
     * Use {@link #getDataMap()} instead.
     */
    @Deprecated
    java.util.Map<String, String>
    getData();
    /**
     * <code>map&lt;string, string&gt; data = 3;</code>
     */
    java.util.Map<String, String>
    getDataMap();
    /**
     * <code>map&lt;string, string&gt; data = 3;</code>
     */

    String getDataOrDefault(
            String key,
            String defaultValue);
    /**
     * <code>map&lt;string, string&gt; data = 3;</code>
     */

    String getDataOrThrow(
            String key);
  }
  /**
   * Protobuf type {@code com.farsunset.cim.sdk.android.model.proto.Model}
   */
  public  static final class Model extends
      com.google.protobuf.GeneratedMessageLite<
          Model, Model.Builder> implements
      // @@protoc_insertion_point(message_implements:com.farsunset.cim.sdk.android.model.proto.Model)
      ModelOrBuilder {
    private Model() {
      key_ = "";
    }
    private int bitField0_;
    public static final int KEY_FIELD_NUMBER = 1;
    private String key_;
    /**
     * <code>optional string key = 1;</code>
     */
    public String getKey() {
      return key_;
    }
    /**
     * <code>optional string key = 1;</code>
     */
    public com.google.protobuf.ByteString
        getKeyBytes() {
      return com.google.protobuf.ByteString.copyFromUtf8(key_);
    }
    /**
     * <code>optional string key = 1;</code>
     */
    private void setKey(
        String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      key_ = value;
    }
    /**
     * <code>optional string key = 1;</code>
     */
    private void clearKey() {
      
      key_ = getDefaultInstance().getKey();
    }
    /**
     * <code>optional string key = 1;</code>
     */
    private void setKeyBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      key_ = value.toStringUtf8();
    }

    public static final int TIMESTAMP_FIELD_NUMBER = 2;
    private long timestamp_;
    /**
     * <code>optional int64 timestamp = 2;</code>
     */
    public long getTimestamp() {
      return timestamp_;
    }
    /**
     * <code>optional int64 timestamp = 2;</code>
     */
    private void setTimestamp(long value) {
      
      timestamp_ = value;
    }
    /**
     * <code>optional int64 timestamp = 2;</code>
     */
    private void clearTimestamp() {
      
      timestamp_ = 0L;
    }

    public static final int DATA_FIELD_NUMBER = 3;
    private static final class DataDefaultEntryHolder {
      static final com.google.protobuf.MapEntryLite<
          String, String> defaultEntry =
              com.google.protobuf.MapEntryLite
              .<String, String>newDefaultInstance(
                  com.google.protobuf.WireFormat.FieldType.STRING,
                  "",
                  com.google.protobuf.WireFormat.FieldType.STRING,
                  "");
    }
    private com.google.protobuf.MapFieldLite<
        String, String> data_ =
            com.google.protobuf.MapFieldLite.emptyMapField();
    private com.google.protobuf.MapFieldLite<String, String>
    internalGetData() {
      return data_;
    }
    private com.google.protobuf.MapFieldLite<String, String>
    internalGetMutableData() {
      if (!data_.isMutable()) {
        data_ = data_.mutableCopy();
      }
      return data_;
    }

    public int getDataCount() {
      return internalGetData().size();
    }
    /**
     * <code>map&lt;string, string&gt; data = 3;</code>
     */

    public boolean containsData(
        String key) {
      if (key == null) { throw new NullPointerException(); }
      return internalGetData().containsKey(key);
    }
    /**
     * Use {@link #getDataMap()} instead.
     */
    @Deprecated
    public java.util.Map<String, String> getData() {
      return getDataMap();
    }
    /**
     * <code>map&lt;string, string&gt; data = 3;</code>
     */

    public java.util.Map<String, String> getDataMap() {
      return java.util.Collections.unmodifiableMap(
          internalGetData());
    }
    /**
     * <code>map&lt;string, string&gt; data = 3;</code>
     */

    public String getDataOrDefault(
        String key,
        String defaultValue) {
      if (key == null) { throw new NullPointerException(); }
      java.util.Map<String, String> map =
          internalGetData();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     * <code>map&lt;string, string&gt; data = 3;</code>
     */

    public String getDataOrThrow(
        String key) {
      if (key == null) { throw new NullPointerException(); }
      java.util.Map<String, String> map =
          internalGetData();
      if (!map.containsKey(key)) {
        throw new IllegalArgumentException();
      }
      return map.get(key);
    }
    /**
     * <code>map&lt;string, string&gt; data = 3;</code>
     */
    private java.util.Map<String, String>
    getMutableDataMap() {
      return internalGetMutableData();
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (!key_.isEmpty()) {
        output.writeString(1, getKey());
      }
      if (timestamp_ != 0L) {
        output.writeInt64(2, timestamp_);
      }
      for (java.util.Map.Entry<String, String> entry
           : internalGetData().entrySet()) {
        DataDefaultEntryHolder.defaultEntry.serializeTo(
            output, 3, entry.getKey(), entry.getValue());
      }
    }

    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (!key_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeStringSize(1, getKey());
      }
      if (timestamp_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(2, timestamp_);
      }
      for (java.util.Map.Entry<String, String> entry
           : internalGetData().entrySet()) {
        size += DataDefaultEntryHolder.defaultEntry.computeMessageSize(
          3, entry.getKey(), entry.getValue());
      }
      memoizedSerializedSize = size;
      return size;
    }

    public static Model parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static Model parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static Model parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static Model parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static Model parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static Model parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static Model parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static Model parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static Model parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static Model parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(Model prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    /**
     * Protobuf type {@code com.farsunset.cim.sdk.android.model.proto.Model}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          Model, Builder> implements
        // @@protoc_insertion_point(builder_implements:com.farsunset.cim.sdk.android.model.proto.Model)
        ModelOrBuilder {
      // Construct using com.farsunset.cim.sdk.android.model.proto.SentBodyProto.Model.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <code>optional string key = 1;</code>
       */
      public String getKey() {
        return instance.getKey();
      }
      /**
       * <code>optional string key = 1;</code>
       */
      public com.google.protobuf.ByteString
          getKeyBytes() {
        return instance.getKeyBytes();
      }
      /**
       * <code>optional string key = 1;</code>
       */
      public Builder setKey(
          String value) {
        copyOnWrite();
        instance.setKey(value);
        return this;
      }
      /**
       * <code>optional string key = 1;</code>
       */
      public Builder clearKey() {
        copyOnWrite();
        instance.clearKey();
        return this;
      }
      /**
       * <code>optional string key = 1;</code>
       */
      public Builder setKeyBytes(
          com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setKeyBytes(value);
        return this;
      }

      /**
       * <code>optional int64 timestamp = 2;</code>
       */
      public long getTimestamp() {
        return instance.getTimestamp();
      }
      /**
       * <code>optional int64 timestamp = 2;</code>
       */
      public Builder setTimestamp(long value) {
        copyOnWrite();
        instance.setTimestamp(value);
        return this;
      }
      /**
       * <code>optional int64 timestamp = 2;</code>
       */
      public Builder clearTimestamp() {
        copyOnWrite();
        instance.clearTimestamp();
        return this;
      }


      public int getDataCount() {
        return instance.getDataMap().size();
      }
      /**
       * <code>map&lt;string, string&gt; data = 3;</code>
       */

      public boolean containsData(
          String key) {
        if (key == null) { throw new NullPointerException(); }
        return instance.getDataMap().containsKey(key);
      }

      public Builder clearData() {
        copyOnWrite();
        instance.getMutableDataMap().clear();
        return this;
      }
      /**
       * <code>map&lt;string, string&gt; data = 3;</code>
       */

      public Builder removeData(
          String key) {
        if (key == null) { throw new NullPointerException(); }
        copyOnWrite();
        instance.getMutableDataMap().remove(key);
        return this;
      }
      /**
       * Use {@link #getDataMap()} instead.
       */
      @Deprecated
      public java.util.Map<String, String> getData() {
        return getDataMap();
      }
      /**
       * <code>map&lt;string, string&gt; data = 3;</code>
       */
      public java.util.Map<String, String> getDataMap() {
        return java.util.Collections.unmodifiableMap(
            instance.getDataMap());
      }
      /**
       * <code>map&lt;string, string&gt; data = 3;</code>
       */

      public String getDataOrDefault(
          String key,
          String defaultValue) {
        if (key == null) { throw new NullPointerException(); }
        java.util.Map<String, String> map =
            instance.getDataMap();
        return map.containsKey(key) ? map.get(key) : defaultValue;
      }
      /**
       * <code>map&lt;string, string&gt; data = 3;</code>
       */

      public String getDataOrThrow(
          String key) {
        if (key == null) { throw new NullPointerException(); }
        java.util.Map<String, String> map =
            instance.getDataMap();
        if (!map.containsKey(key)) {
          throw new IllegalArgumentException();
        }
        return map.get(key);
      }
      /**
       * <code>map&lt;string, string&gt; data = 3;</code>
       */
      public Builder putData(
          String key,
          String value) {
        if (key == null) { throw new NullPointerException(); }
        if (value == null) { throw new NullPointerException(); }
        copyOnWrite();
        instance.getMutableDataMap().put(key, value);
        return this;
      }
      /**
       * <code>map&lt;string, string&gt; data = 3;</code>
       */
      public Builder putAllData(
          java.util.Map<String, String> values) {
        copyOnWrite();
        instance.getMutableDataMap().putAll(values);
        return this;
      }

      // @@protoc_insertion_point(builder_scope:com.farsunset.cim.sdk.android.model.proto.Model)
    }
    protected final Object dynamicMethod(
        MethodToInvoke method,
        Object arg0, Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new Model();
        }
        case IS_INITIALIZED: {
          return DEFAULT_INSTANCE;
        }
        case MAKE_IMMUTABLE: {
          data_.makeImmutable();
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          Model other = (Model) arg1;
          key_ = visitor.visitString(!key_.isEmpty(), key_,
              !other.key_.isEmpty(), other.key_);
          timestamp_ = visitor.visitLong(timestamp_ != 0L, timestamp_,
              other.timestamp_ != 0L, other.timestamp_);
          data_ = visitor.visitMap(
              data_, other.internalGetData());
          if (visitor == MergeFromVisitor
              .INSTANCE) {
            bitField0_ |= other.bitField0_;
          }
          return this;
        }
        case MERGE_FROM_STREAM: {
          com.google.protobuf.CodedInputStream input =
              (com.google.protobuf.CodedInputStream) arg0;
          com.google.protobuf.ExtensionRegistryLite extensionRegistry =
              (com.google.protobuf.ExtensionRegistryLite) arg1;
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                default: {
                  if (!input.skipField(tag)) {
                    done = true;
                  }
                  break;
                }
                case 10: {
                  String s = input.readStringRequireUtf8();

                  key_ = s;
                  break;
                }
                case 16: {

                  timestamp_ = input.readInt64();
                  break;
                }
                case 26: {
                  if (!data_.isMutable()) {
                    data_ = data_.mutableCopy();
                  }
                  DataDefaultEntryHolder.defaultEntry.parseInto(data_, input, extensionRegistry);  break;
                }
              }
            }
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw new RuntimeException(e.setUnfinishedMessage(this));
          } catch (java.io.IOException e) {
            throw new RuntimeException(
                new com.google.protobuf.InvalidProtocolBufferException(
                    e.getMessage()).setUnfinishedMessage(this));
          } finally {
          }
        }
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          if (PARSER == null) {    synchronized (Model.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:com.farsunset.cim.sdk.android.model.proto.Model)
    private static final Model DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new Model();
      DEFAULT_INSTANCE.makeImmutable();
    }

    public static Model getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<Model> PARSER;

    public static com.google.protobuf.Parser<Model> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }


  static {
  }

  // @@protoc_insertion_point(outer_class_scope)
}
