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

package com.ywt.gapi.base.file;

/**
 * <pre>
 *上传图片请求
 * </pre>
 *
 * Protobuf type {@code com.ywt.gapi.base.file.UploadImageRequest}
 */
public  final class UploadImageRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.ywt.gapi.base.file.UploadImageRequest)
    UploadImageRequestOrBuilder {
  // Use UploadImageRequest.newBuilder() to construct.
  private UploadImageRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private UploadImageRequest() {
    filename_ = "";
    vpath_ = "";
    datas_ = com.google.protobuf.ByteString.EMPTY;
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
  }
  private UploadImageRequest(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    int mutable_bitField0_ = 0;
    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: {
            java.lang.String s = input.readStringRequireUtf8();

            filename_ = s;
            break;
          }
          case 18: {
            java.lang.String s = input.readStringRequireUtf8();

            vpath_ = s;
            break;
          }
          case 26: {

            datas_ = input.readBytes();
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.ywt.gapi.base.file.File.internal_static_com_ywt_gapi_base_file_UploadImageRequest_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.ywt.gapi.base.file.File.internal_static_com_ywt_gapi_base_file_UploadImageRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.ywt.gapi.base.file.UploadImageRequest.class, com.ywt.gapi.base.file.UploadImageRequest.Builder.class);
  }

  public static final int FILENAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object filename_;
  /**
   * <pre>
   *文件名
   * </pre>
   *
   * <code>string filename = 1;</code>
   */
  public java.lang.String getFilename() {
    java.lang.Object ref = filename_;
    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();
      filename_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *文件名
   * </pre>
   *
   * <code>string filename = 1;</code>
   */
  public com.google.protobuf.ByteString
      getFilenameBytes() {
    java.lang.Object ref = filename_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      filename_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int VPATH_FIELD_NUMBER = 2;
  private volatile java.lang.Object vpath_;
  /**
   * <pre>
   *路径
   * </pre>
   *
   * <code>string vpath = 2;</code>
   */
  public java.lang.String getVpath() {
    java.lang.Object ref = vpath_;
    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();
      vpath_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *路径
   * </pre>
   *
   * <code>string vpath = 2;</code>
   */
  public com.google.protobuf.ByteString
      getVpathBytes() {
    java.lang.Object ref = vpath_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      vpath_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DATAS_FIELD_NUMBER = 3;
  private com.google.protobuf.ByteString datas_;
  /**
   * <pre>
   *文件流
   * </pre>
   *
   * <code>bytes datas = 3;</code>
   */
  public com.google.protobuf.ByteString getDatas() {
    return datas_;
  }

  private byte memoizedIsInitialized = -1;
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (!getFilenameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filename_);
    }
    if (!getVpathBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, vpath_);
    }
    if (!datas_.isEmpty()) {
      output.writeBytes(3, datas_);
    }
  }

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

    size = 0;
    if (!getFilenameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filename_);
    }
    if (!getVpathBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, vpath_);
    }
    if (!datas_.isEmpty()) {
      size += com.google.protobuf.CodedOutputStream
        .computeBytesSize(3, datas_);
    }
    memoizedSize = size;
    return size;
  }

  private static final long serialVersionUID = 0L;
  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof com.ywt.gapi.base.file.UploadImageRequest)) {
      return super.equals(obj);
    }
    com.ywt.gapi.base.file.UploadImageRequest other = (com.ywt.gapi.base.file.UploadImageRequest) obj;

    boolean result = true;
    result = result && getFilename()
        .equals(other.getFilename());
    result = result && getVpath()
        .equals(other.getVpath());
    result = result && getDatas()
        .equals(other.getDatas());
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + FILENAME_FIELD_NUMBER;
    hash = (53 * hash) + getFilename().hashCode();
    hash = (37 * hash) + VPATH_FIELD_NUMBER;
    hash = (53 * hash) + getVpath().hashCode();
    hash = (37 * hash) + DATAS_FIELD_NUMBER;
    hash = (53 * hash) + getDatas().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.ywt.gapi.base.file.UploadImageRequest parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.base.file.UploadImageRequest parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ywt.gapi.base.file.UploadImageRequest parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.base.file.UploadImageRequest parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ywt.gapi.base.file.UploadImageRequest parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.base.file.UploadImageRequest parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ywt.gapi.base.file.UploadImageRequest parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.base.file.UploadImageRequest 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 com.ywt.gapi.base.file.UploadImageRequest parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.base.file.UploadImageRequest 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 com.ywt.gapi.base.file.UploadImageRequest parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.base.file.UploadImageRequest parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.ywt.gapi.base.file.UploadImageRequest prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  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;
  }
  /**
   * <pre>
   *上传图片请求
   * </pre>
   *
   * Protobuf type {@code com.ywt.gapi.base.file.UploadImageRequest}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:com.ywt.gapi.base.file.UploadImageRequest)
      com.ywt.gapi.base.file.UploadImageRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.ywt.gapi.base.file.File.internal_static_com_ywt_gapi_base_file_UploadImageRequest_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.ywt.gapi.base.file.File.internal_static_com_ywt_gapi_base_file_UploadImageRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.ywt.gapi.base.file.UploadImageRequest.class, com.ywt.gapi.base.file.UploadImageRequest.Builder.class);
    }

    // Construct using com.ywt.gapi.base.file.UploadImageRequest.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    public Builder clear() {
      super.clear();
      filename_ = "";

      vpath_ = "";

      datas_ = com.google.protobuf.ByteString.EMPTY;

      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.ywt.gapi.base.file.File.internal_static_com_ywt_gapi_base_file_UploadImageRequest_descriptor;
    }

    public com.ywt.gapi.base.file.UploadImageRequest getDefaultInstanceForType() {
      return com.ywt.gapi.base.file.UploadImageRequest.getDefaultInstance();
    }

    public com.ywt.gapi.base.file.UploadImageRequest build() {
      com.ywt.gapi.base.file.UploadImageRequest result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    public com.ywt.gapi.base.file.UploadImageRequest buildPartial() {
      com.ywt.gapi.base.file.UploadImageRequest result = new com.ywt.gapi.base.file.UploadImageRequest(this);
      result.filename_ = filename_;
      result.vpath_ = vpath_;
      result.datas_ = datas_;
      onBuilt();
      return result;
    }

    public Builder clone() {
      return (Builder) super.clone();
    }
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return (Builder) super.setField(field, value);
    }
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return (Builder) super.clearField(field);
    }
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return (Builder) super.clearOneof(oneof);
    }
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, Object value) {
      return (Builder) super.setRepeatedField(field, index, value);
    }
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return (Builder) super.addRepeatedField(field, value);
    }
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.ywt.gapi.base.file.UploadImageRequest) {
        return mergeFrom((com.ywt.gapi.base.file.UploadImageRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.ywt.gapi.base.file.UploadImageRequest other) {
      if (other == com.ywt.gapi.base.file.UploadImageRequest.getDefaultInstance()) return this;
      if (!other.getFilename().isEmpty()) {
        filename_ = other.filename_;
        onChanged();
      }
      if (!other.getVpath().isEmpty()) {
        vpath_ = other.vpath_;
        onChanged();
      }
      if (other.getDatas() != com.google.protobuf.ByteString.EMPTY) {
        setDatas(other.getDatas());
      }
      onChanged();
      return this;
    }

    public final boolean isInitialized() {
      return true;
    }

    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      com.ywt.gapi.base.file.UploadImageRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.ywt.gapi.base.file.UploadImageRequest) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private java.lang.Object filename_ = "";
    /**
     * <pre>
     *文件名
     * </pre>
     *
     * <code>string filename = 1;</code>
     */
    public java.lang.String getFilename() {
      java.lang.Object ref = filename_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        filename_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *文件名
     * </pre>
     *
     * <code>string filename = 1;</code>
     */
    public com.google.protobuf.ByteString
        getFilenameBytes() {
      java.lang.Object ref = filename_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        filename_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *文件名
     * </pre>
     *
     * <code>string filename = 1;</code>
     */
    public Builder setFilename(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      filename_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *文件名
     * </pre>
     *
     * <code>string filename = 1;</code>
     */
    public Builder clearFilename() {
      
      filename_ = getDefaultInstance().getFilename();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *文件名
     * </pre>
     *
     * <code>string filename = 1;</code>
     */
    public Builder setFilenameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      filename_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object vpath_ = "";
    /**
     * <pre>
     *路径
     * </pre>
     *
     * <code>string vpath = 2;</code>
     */
    public java.lang.String getVpath() {
      java.lang.Object ref = vpath_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        vpath_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *路径
     * </pre>
     *
     * <code>string vpath = 2;</code>
     */
    public com.google.protobuf.ByteString
        getVpathBytes() {
      java.lang.Object ref = vpath_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        vpath_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *路径
     * </pre>
     *
     * <code>string vpath = 2;</code>
     */
    public Builder setVpath(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      vpath_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *路径
     * </pre>
     *
     * <code>string vpath = 2;</code>
     */
    public Builder clearVpath() {
      
      vpath_ = getDefaultInstance().getVpath();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *路径
     * </pre>
     *
     * <code>string vpath = 2;</code>
     */
    public Builder setVpathBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      vpath_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.ByteString datas_ = com.google.protobuf.ByteString.EMPTY;
    /**
     * <pre>
     *文件流
     * </pre>
     *
     * <code>bytes datas = 3;</code>
     */
    public com.google.protobuf.ByteString getDatas() {
      return datas_;
    }
    /**
     * <pre>
     *文件流
     * </pre>
     *
     * <code>bytes datas = 3;</code>
     */
    public Builder setDatas(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      datas_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *文件流
     * </pre>
     *
     * <code>bytes datas = 3;</code>
     */
    public Builder clearDatas() {
      
      datas_ = getDefaultInstance().getDatas();
      onChanged();
      return this;
    }
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return this;
    }

    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return this;
    }


    // @@protoc_insertion_point(builder_scope:com.ywt.gapi.base.file.UploadImageRequest)
  }

  // @@protoc_insertion_point(class_scope:com.ywt.gapi.base.file.UploadImageRequest)
  private static final com.ywt.gapi.base.file.UploadImageRequest DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.ywt.gapi.base.file.UploadImageRequest();
  }

  public static com.ywt.gapi.base.file.UploadImageRequest getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<UploadImageRequest>
      PARSER = new com.google.protobuf.AbstractParser<UploadImageRequest>() {
    public UploadImageRequest parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
        return new UploadImageRequest(input, extensionRegistry);
    }
  };

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

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

  public com.ywt.gapi.base.file.UploadImageRequest getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

