All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.clarifai.grpc.api.Upload Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: proto/clarifai/api/resources.proto

package com.clarifai.grpc.api;

/**
 * Protobuf type {@code clarifai.api.Upload}
 */
public final class Upload extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:clarifai.api.Upload)
    UploadOrBuilder {
private static final long serialVersionUID = 0L;
  // Use Upload.newBuilder() to construct.
  private Upload(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private Upload() {
    id_ = "";
    contentName_ = "";
    contentUrl_ = "";
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private Upload(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10: {
            java.lang.String s = input.readStringRequireUtf8();

            id_ = s;
            break;
          }
          case 18: {
            com.google.protobuf.Timestamp.Builder subBuilder = null;
            if (createdAt_ != null) {
              subBuilder = createdAt_.toBuilder();
            }
            createdAt_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(createdAt_);
              createdAt_ = subBuilder.buildPartial();
            }

            break;
          }
          case 26: {
            com.google.protobuf.Timestamp.Builder subBuilder = null;
            if (modifiedAt_ != null) {
              subBuilder = modifiedAt_.toBuilder();
            }
            modifiedAt_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(modifiedAt_);
              modifiedAt_ = subBuilder.buildPartial();
            }

            break;
          }
          case 34: {
            com.google.protobuf.Timestamp.Builder subBuilder = null;
            if (expiresAt_ != null) {
              subBuilder = expiresAt_.toBuilder();
            }
            expiresAt_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(expiresAt_);
              expiresAt_ = subBuilder.buildPartial();
            }

            break;
          }
          case 42: {
            com.clarifai.grpc.api.status.Status.Builder subBuilder = null;
            if (status_ != null) {
              subBuilder = status_.toBuilder();
            }
            status_ = input.readMessage(com.clarifai.grpc.api.status.Status.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(status_);
              status_ = subBuilder.buildPartial();
            }

            break;
          }
          case 48: {

            contentLength_ = input.readUInt64();
            break;
          }
          case 58: {
            java.lang.String s = input.readStringRequireUtf8();

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

            contentName_ = s;
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (com.google.protobuf.UninitializedMessageException e) {
      throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Upload_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Upload_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.clarifai.grpc.api.Upload.class, com.clarifai.grpc.api.Upload.Builder.class);
  }

  public static final int ID_FIELD_NUMBER = 1;
  private volatile java.lang.Object id_;
  /**
   * 
   * ID of upload
   * 
* * string id = 1; * @return The id. */ @java.lang.Override public java.lang.String getId() { java.lang.Object ref = id_; 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(); id_ = s; return s; } } /** *
   * ID of upload
   * 
* * string id = 1; * @return The bytes for id. */ @java.lang.Override public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CREATED_AT_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp createdAt_; /** *
   * When the upload was started.
   * The format is https://www.ietf.org/rfc/rfc3339.txt.
   * Example: "2006-01-02T15:04:05.999999Z".
   * 
* * .google.protobuf.Timestamp created_at = 2; * @return Whether the createdAt field is set. */ @java.lang.Override public boolean hasCreatedAt() { return createdAt_ != null; } /** *
   * When the upload was started.
   * The format is https://www.ietf.org/rfc/rfc3339.txt.
   * Example: "2006-01-02T15:04:05.999999Z".
   * 
* * .google.protobuf.Timestamp created_at = 2; * @return The createdAt. */ @java.lang.Override public com.google.protobuf.Timestamp getCreatedAt() { return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_; } /** *
   * When the upload was started.
   * The format is https://www.ietf.org/rfc/rfc3339.txt.
   * Example: "2006-01-02T15:04:05.999999Z".
   * 
* * .google.protobuf.Timestamp created_at = 2; */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() { return getCreatedAt(); } public static final int MODIFIED_AT_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp modifiedAt_; /** *
   * Most recent time when the upload was updated.
   * The format is https://www.ietf.org/rfc/rfc3339.txt.
   * Example: "2006-01-02T15:04:05.999999Z".
   * 
* * .google.protobuf.Timestamp modified_at = 3; * @return Whether the modifiedAt field is set. */ @java.lang.Override public boolean hasModifiedAt() { return modifiedAt_ != null; } /** *
   * Most recent time when the upload was updated.
   * The format is https://www.ietf.org/rfc/rfc3339.txt.
   * Example: "2006-01-02T15:04:05.999999Z".
   * 
* * .google.protobuf.Timestamp modified_at = 3; * @return The modifiedAt. */ @java.lang.Override public com.google.protobuf.Timestamp getModifiedAt() { return modifiedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : modifiedAt_; } /** *
   * Most recent time when the upload was updated.
   * The format is https://www.ietf.org/rfc/rfc3339.txt.
   * Example: "2006-01-02T15:04:05.999999Z".
   * 
* * .google.protobuf.Timestamp modified_at = 3; */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getModifiedAtOrBuilder() { return getModifiedAt(); } public static final int EXPIRES_AT_FIELD_NUMBER = 4; private com.google.protobuf.Timestamp expiresAt_; /** *
   * When the upload will expire and be deleted
   * The format is https://www.ietf.org/rfc/rfc3339.txt.
   * Example: "2006-01-02T15:04:05.999999Z".
   * 
* * .google.protobuf.Timestamp expires_at = 4; * @return Whether the expiresAt field is set. */ @java.lang.Override public boolean hasExpiresAt() { return expiresAt_ != null; } /** *
   * When the upload will expire and be deleted
   * The format is https://www.ietf.org/rfc/rfc3339.txt.
   * Example: "2006-01-02T15:04:05.999999Z".
   * 
* * .google.protobuf.Timestamp expires_at = 4; * @return The expiresAt. */ @java.lang.Override public com.google.protobuf.Timestamp getExpiresAt() { return expiresAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expiresAt_; } /** *
   * When the upload will expire and be deleted
   * The format is https://www.ietf.org/rfc/rfc3339.txt.
   * Example: "2006-01-02T15:04:05.999999Z".
   * 
* * .google.protobuf.Timestamp expires_at = 4; */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getExpiresAtOrBuilder() { return getExpiresAt(); } public static final int STATUS_FIELD_NUMBER = 5; private com.clarifai.grpc.api.status.Status status_; /** *
   * Status of the upload
   * 
* * .clarifai.api.status.Status status = 5; * @return Whether the status field is set. */ @java.lang.Override public boolean hasStatus() { return status_ != null; } /** *
   * Status of the upload
   * 
* * .clarifai.api.status.Status status = 5; * @return The status. */ @java.lang.Override public com.clarifai.grpc.api.status.Status getStatus() { return status_ == null ? com.clarifai.grpc.api.status.Status.getDefaultInstance() : status_; } /** *
   * Status of the upload
   * 
* * .clarifai.api.status.Status status = 5; */ @java.lang.Override public com.clarifai.grpc.api.status.StatusOrBuilder getStatusOrBuilder() { return getStatus(); } public static final int CONTENT_NAME_FIELD_NUMBER = 8; private volatile java.lang.Object contentName_; /** *
   * name of uploaded content (e.g. filename)
   * 
* * string content_name = 8; * @return The contentName. */ @java.lang.Override public java.lang.String getContentName() { java.lang.Object ref = contentName_; 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(); contentName_ = s; return s; } } /** *
   * name of uploaded content (e.g. filename)
   * 
* * string content_name = 8; * @return The bytes for contentName. */ @java.lang.Override public com.google.protobuf.ByteString getContentNameBytes() { java.lang.Object ref = contentName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); contentName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CONTENT_LENGTH_FIELD_NUMBER = 6; private long contentLength_; /** *
   * Total size of the upload content
   * 
* * uint64 content_length = 6; * @return The contentLength. */ @java.lang.Override public long getContentLength() { return contentLength_; } public static final int CONTENT_URL_FIELD_NUMBER = 7; private volatile java.lang.Object contentUrl_; /** *
   * Url of uploaded content
   * 
* * string content_url = 7; * @return The contentUrl. */ @java.lang.Override public java.lang.String getContentUrl() { java.lang.Object ref = contentUrl_; 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(); contentUrl_ = s; return s; } } /** *
   * Url of uploaded content
   * 
* * string content_url = 7; * @return The bytes for contentUrl. */ @java.lang.Override public com.google.protobuf.ByteString getContentUrlBytes() { java.lang.Object ref = contentUrl_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); contentUrl_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } if (createdAt_ != null) { output.writeMessage(2, getCreatedAt()); } if (modifiedAt_ != null) { output.writeMessage(3, getModifiedAt()); } if (expiresAt_ != null) { output.writeMessage(4, getExpiresAt()); } if (status_ != null) { output.writeMessage(5, getStatus()); } if (contentLength_ != 0L) { output.writeUInt64(6, contentLength_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentUrl_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, contentUrl_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, contentName_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } if (createdAt_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getCreatedAt()); } if (modifiedAt_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getModifiedAt()); } if (expiresAt_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getExpiresAt()); } if (status_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, getStatus()); } if (contentLength_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(6, contentLength_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentUrl_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, contentUrl_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, contentName_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.clarifai.grpc.api.Upload)) { return super.equals(obj); } com.clarifai.grpc.api.Upload other = (com.clarifai.grpc.api.Upload) obj; if (!getId() .equals(other.getId())) return false; if (hasCreatedAt() != other.hasCreatedAt()) return false; if (hasCreatedAt()) { if (!getCreatedAt() .equals(other.getCreatedAt())) return false; } if (hasModifiedAt() != other.hasModifiedAt()) return false; if (hasModifiedAt()) { if (!getModifiedAt() .equals(other.getModifiedAt())) return false; } if (hasExpiresAt() != other.hasExpiresAt()) return false; if (hasExpiresAt()) { if (!getExpiresAt() .equals(other.getExpiresAt())) return false; } if (hasStatus() != other.hasStatus()) return false; if (hasStatus()) { if (!getStatus() .equals(other.getStatus())) return false; } if (!getContentName() .equals(other.getContentName())) return false; if (getContentLength() != other.getContentLength()) return false; if (!getContentUrl() .equals(other.getContentUrl())) return false; if (!unknownFields.equals(other.unknownFields)) 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) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); if (hasCreatedAt()) { hash = (37 * hash) + CREATED_AT_FIELD_NUMBER; hash = (53 * hash) + getCreatedAt().hashCode(); } if (hasModifiedAt()) { hash = (37 * hash) + MODIFIED_AT_FIELD_NUMBER; hash = (53 * hash) + getModifiedAt().hashCode(); } if (hasExpiresAt()) { hash = (37 * hash) + EXPIRES_AT_FIELD_NUMBER; hash = (53 * hash) + getExpiresAt().hashCode(); } if (hasStatus()) { hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + getStatus().hashCode(); } hash = (37 * hash) + CONTENT_NAME_FIELD_NUMBER; hash = (53 * hash) + getContentName().hashCode(); hash = (37 * hash) + CONTENT_LENGTH_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getContentLength()); hash = (37 * hash) + CONTENT_URL_FIELD_NUMBER; hash = (53 * hash) + getContentUrl().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.clarifai.grpc.api.Upload parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.Upload parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.clarifai.grpc.api.Upload parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.Upload parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.clarifai.grpc.api.Upload parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.Upload parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.clarifai.grpc.api.Upload parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clarifai.grpc.api.Upload 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.clarifai.grpc.api.Upload parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.clarifai.grpc.api.Upload 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.clarifai.grpc.api.Upload parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clarifai.grpc.api.Upload 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(com.clarifai.grpc.api.Upload 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 clarifai.api.Upload} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:clarifai.api.Upload) com.clarifai.grpc.api.UploadOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Upload_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Upload_fieldAccessorTable .ensureFieldAccessorsInitialized( com.clarifai.grpc.api.Upload.class, com.clarifai.grpc.api.Upload.Builder.class); } // Construct using com.clarifai.grpc.api.Upload.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); id_ = ""; if (createdAtBuilder_ == null) { createdAt_ = null; } else { createdAt_ = null; createdAtBuilder_ = null; } if (modifiedAtBuilder_ == null) { modifiedAt_ = null; } else { modifiedAt_ = null; modifiedAtBuilder_ = null; } if (expiresAtBuilder_ == null) { expiresAt_ = null; } else { expiresAt_ = null; expiresAtBuilder_ = null; } if (statusBuilder_ == null) { status_ = null; } else { status_ = null; statusBuilder_ = null; } contentName_ = ""; contentLength_ = 0L; contentUrl_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Upload_descriptor; } @java.lang.Override public com.clarifai.grpc.api.Upload getDefaultInstanceForType() { return com.clarifai.grpc.api.Upload.getDefaultInstance(); } @java.lang.Override public com.clarifai.grpc.api.Upload build() { com.clarifai.grpc.api.Upload result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.clarifai.grpc.api.Upload buildPartial() { com.clarifai.grpc.api.Upload result = new com.clarifai.grpc.api.Upload(this); result.id_ = id_; if (createdAtBuilder_ == null) { result.createdAt_ = createdAt_; } else { result.createdAt_ = createdAtBuilder_.build(); } if (modifiedAtBuilder_ == null) { result.modifiedAt_ = modifiedAt_; } else { result.modifiedAt_ = modifiedAtBuilder_.build(); } if (expiresAtBuilder_ == null) { result.expiresAt_ = expiresAt_; } else { result.expiresAt_ = expiresAtBuilder_.build(); } if (statusBuilder_ == null) { result.status_ = status_; } else { result.status_ = statusBuilder_.build(); } result.contentName_ = contentName_; result.contentLength_ = contentLength_; result.contentUrl_ = contentUrl_; onBuilt(); return result; } @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 com.clarifai.grpc.api.Upload) { return mergeFrom((com.clarifai.grpc.api.Upload)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.clarifai.grpc.api.Upload other) { if (other == com.clarifai.grpc.api.Upload.getDefaultInstance()) return this; if (!other.getId().isEmpty()) { id_ = other.id_; onChanged(); } if (other.hasCreatedAt()) { mergeCreatedAt(other.getCreatedAt()); } if (other.hasModifiedAt()) { mergeModifiedAt(other.getModifiedAt()); } if (other.hasExpiresAt()) { mergeExpiresAt(other.getExpiresAt()); } if (other.hasStatus()) { mergeStatus(other.getStatus()); } if (!other.getContentName().isEmpty()) { contentName_ = other.contentName_; onChanged(); } if (other.getContentLength() != 0L) { setContentLength(other.getContentLength()); } if (!other.getContentUrl().isEmpty()) { contentUrl_ = other.contentUrl_; onChanged(); } this.mergeUnknownFields(other.unknownFields); 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 { com.clarifai.grpc.api.Upload parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.clarifai.grpc.api.Upload) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object id_ = ""; /** *
     * ID of upload
     * 
* * string id = 1; * @return The id. */ public java.lang.String getId() { java.lang.Object ref = id_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); id_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * ID of upload
     * 
* * string id = 1; * @return The bytes for id. */ public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * ID of upload
     * 
* * string id = 1; * @param value The id to set. * @return This builder for chaining. */ public Builder setId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } id_ = value; onChanged(); return this; } /** *
     * ID of upload
     * 
* * string id = 1; * @return This builder for chaining. */ public Builder clearId() { id_ = getDefaultInstance().getId(); onChanged(); return this; } /** *
     * ID of upload
     * 
* * string id = 1; * @param value The bytes for id to set. * @return This builder for chaining. */ public Builder setIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); id_ = value; onChanged(); return this; } private com.google.protobuf.Timestamp createdAt_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createdAtBuilder_; /** *
     * When the upload was started.
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp created_at = 2; * @return Whether the createdAt field is set. */ public boolean hasCreatedAt() { return createdAtBuilder_ != null || createdAt_ != null; } /** *
     * When the upload was started.
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp created_at = 2; * @return The createdAt. */ public com.google.protobuf.Timestamp getCreatedAt() { if (createdAtBuilder_ == null) { return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_; } else { return createdAtBuilder_.getMessage(); } } /** *
     * When the upload was started.
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp created_at = 2; */ public Builder setCreatedAt(com.google.protobuf.Timestamp value) { if (createdAtBuilder_ == null) { if (value == null) { throw new NullPointerException(); } createdAt_ = value; onChanged(); } else { createdAtBuilder_.setMessage(value); } return this; } /** *
     * When the upload was started.
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp created_at = 2; */ public Builder setCreatedAt( com.google.protobuf.Timestamp.Builder builderForValue) { if (createdAtBuilder_ == null) { createdAt_ = builderForValue.build(); onChanged(); } else { createdAtBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * When the upload was started.
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp created_at = 2; */ public Builder mergeCreatedAt(com.google.protobuf.Timestamp value) { if (createdAtBuilder_ == null) { if (createdAt_ != null) { createdAt_ = com.google.protobuf.Timestamp.newBuilder(createdAt_).mergeFrom(value).buildPartial(); } else { createdAt_ = value; } onChanged(); } else { createdAtBuilder_.mergeFrom(value); } return this; } /** *
     * When the upload was started.
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp created_at = 2; */ public Builder clearCreatedAt() { if (createdAtBuilder_ == null) { createdAt_ = null; onChanged(); } else { createdAt_ = null; createdAtBuilder_ = null; } return this; } /** *
     * When the upload was started.
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp created_at = 2; */ public com.google.protobuf.Timestamp.Builder getCreatedAtBuilder() { onChanged(); return getCreatedAtFieldBuilder().getBuilder(); } /** *
     * When the upload was started.
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp created_at = 2; */ public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() { if (createdAtBuilder_ != null) { return createdAtBuilder_.getMessageOrBuilder(); } else { return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_; } } /** *
     * When the upload was started.
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp created_at = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getCreatedAtFieldBuilder() { if (createdAtBuilder_ == null) { createdAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getCreatedAt(), getParentForChildren(), isClean()); createdAt_ = null; } return createdAtBuilder_; } private com.google.protobuf.Timestamp modifiedAt_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> modifiedAtBuilder_; /** *
     * Most recent time when the upload was updated.
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp modified_at = 3; * @return Whether the modifiedAt field is set. */ public boolean hasModifiedAt() { return modifiedAtBuilder_ != null || modifiedAt_ != null; } /** *
     * Most recent time when the upload was updated.
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp modified_at = 3; * @return The modifiedAt. */ public com.google.protobuf.Timestamp getModifiedAt() { if (modifiedAtBuilder_ == null) { return modifiedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : modifiedAt_; } else { return modifiedAtBuilder_.getMessage(); } } /** *
     * Most recent time when the upload was updated.
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp modified_at = 3; */ public Builder setModifiedAt(com.google.protobuf.Timestamp value) { if (modifiedAtBuilder_ == null) { if (value == null) { throw new NullPointerException(); } modifiedAt_ = value; onChanged(); } else { modifiedAtBuilder_.setMessage(value); } return this; } /** *
     * Most recent time when the upload was updated.
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp modified_at = 3; */ public Builder setModifiedAt( com.google.protobuf.Timestamp.Builder builderForValue) { if (modifiedAtBuilder_ == null) { modifiedAt_ = builderForValue.build(); onChanged(); } else { modifiedAtBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * Most recent time when the upload was updated.
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp modified_at = 3; */ public Builder mergeModifiedAt(com.google.protobuf.Timestamp value) { if (modifiedAtBuilder_ == null) { if (modifiedAt_ != null) { modifiedAt_ = com.google.protobuf.Timestamp.newBuilder(modifiedAt_).mergeFrom(value).buildPartial(); } else { modifiedAt_ = value; } onChanged(); } else { modifiedAtBuilder_.mergeFrom(value); } return this; } /** *
     * Most recent time when the upload was updated.
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp modified_at = 3; */ public Builder clearModifiedAt() { if (modifiedAtBuilder_ == null) { modifiedAt_ = null; onChanged(); } else { modifiedAt_ = null; modifiedAtBuilder_ = null; } return this; } /** *
     * Most recent time when the upload was updated.
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp modified_at = 3; */ public com.google.protobuf.Timestamp.Builder getModifiedAtBuilder() { onChanged(); return getModifiedAtFieldBuilder().getBuilder(); } /** *
     * Most recent time when the upload was updated.
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp modified_at = 3; */ public com.google.protobuf.TimestampOrBuilder getModifiedAtOrBuilder() { if (modifiedAtBuilder_ != null) { return modifiedAtBuilder_.getMessageOrBuilder(); } else { return modifiedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : modifiedAt_; } } /** *
     * Most recent time when the upload was updated.
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp modified_at = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getModifiedAtFieldBuilder() { if (modifiedAtBuilder_ == null) { modifiedAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getModifiedAt(), getParentForChildren(), isClean()); modifiedAt_ = null; } return modifiedAtBuilder_; } private com.google.protobuf.Timestamp expiresAt_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> expiresAtBuilder_; /** *
     * When the upload will expire and be deleted
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp expires_at = 4; * @return Whether the expiresAt field is set. */ public boolean hasExpiresAt() { return expiresAtBuilder_ != null || expiresAt_ != null; } /** *
     * When the upload will expire and be deleted
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp expires_at = 4; * @return The expiresAt. */ public com.google.protobuf.Timestamp getExpiresAt() { if (expiresAtBuilder_ == null) { return expiresAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expiresAt_; } else { return expiresAtBuilder_.getMessage(); } } /** *
     * When the upload will expire and be deleted
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp expires_at = 4; */ public Builder setExpiresAt(com.google.protobuf.Timestamp value) { if (expiresAtBuilder_ == null) { if (value == null) { throw new NullPointerException(); } expiresAt_ = value; onChanged(); } else { expiresAtBuilder_.setMessage(value); } return this; } /** *
     * When the upload will expire and be deleted
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp expires_at = 4; */ public Builder setExpiresAt( com.google.protobuf.Timestamp.Builder builderForValue) { if (expiresAtBuilder_ == null) { expiresAt_ = builderForValue.build(); onChanged(); } else { expiresAtBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * When the upload will expire and be deleted
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp expires_at = 4; */ public Builder mergeExpiresAt(com.google.protobuf.Timestamp value) { if (expiresAtBuilder_ == null) { if (expiresAt_ != null) { expiresAt_ = com.google.protobuf.Timestamp.newBuilder(expiresAt_).mergeFrom(value).buildPartial(); } else { expiresAt_ = value; } onChanged(); } else { expiresAtBuilder_.mergeFrom(value); } return this; } /** *
     * When the upload will expire and be deleted
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp expires_at = 4; */ public Builder clearExpiresAt() { if (expiresAtBuilder_ == null) { expiresAt_ = null; onChanged(); } else { expiresAt_ = null; expiresAtBuilder_ = null; } return this; } /** *
     * When the upload will expire and be deleted
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp expires_at = 4; */ public com.google.protobuf.Timestamp.Builder getExpiresAtBuilder() { onChanged(); return getExpiresAtFieldBuilder().getBuilder(); } /** *
     * When the upload will expire and be deleted
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp expires_at = 4; */ public com.google.protobuf.TimestampOrBuilder getExpiresAtOrBuilder() { if (expiresAtBuilder_ != null) { return expiresAtBuilder_.getMessageOrBuilder(); } else { return expiresAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expiresAt_; } } /** *
     * When the upload will expire and be deleted
     * The format is https://www.ietf.org/rfc/rfc3339.txt.
     * Example: "2006-01-02T15:04:05.999999Z".
     * 
* * .google.protobuf.Timestamp expires_at = 4; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getExpiresAtFieldBuilder() { if (expiresAtBuilder_ == null) { expiresAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getExpiresAt(), getParentForChildren(), isClean()); expiresAt_ = null; } return expiresAtBuilder_; } private com.clarifai.grpc.api.status.Status status_; private com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.status.Status, com.clarifai.grpc.api.status.Status.Builder, com.clarifai.grpc.api.status.StatusOrBuilder> statusBuilder_; /** *
     * Status of the upload
     * 
* * .clarifai.api.status.Status status = 5; * @return Whether the status field is set. */ public boolean hasStatus() { return statusBuilder_ != null || status_ != null; } /** *
     * Status of the upload
     * 
* * .clarifai.api.status.Status status = 5; * @return The status. */ public com.clarifai.grpc.api.status.Status getStatus() { if (statusBuilder_ == null) { return status_ == null ? com.clarifai.grpc.api.status.Status.getDefaultInstance() : status_; } else { return statusBuilder_.getMessage(); } } /** *
     * Status of the upload
     * 
* * .clarifai.api.status.Status status = 5; */ public Builder setStatus(com.clarifai.grpc.api.status.Status value) { if (statusBuilder_ == null) { if (value == null) { throw new NullPointerException(); } status_ = value; onChanged(); } else { statusBuilder_.setMessage(value); } return this; } /** *
     * Status of the upload
     * 
* * .clarifai.api.status.Status status = 5; */ public Builder setStatus( com.clarifai.grpc.api.status.Status.Builder builderForValue) { if (statusBuilder_ == null) { status_ = builderForValue.build(); onChanged(); } else { statusBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * Status of the upload
     * 
* * .clarifai.api.status.Status status = 5; */ public Builder mergeStatus(com.clarifai.grpc.api.status.Status value) { if (statusBuilder_ == null) { if (status_ != null) { status_ = com.clarifai.grpc.api.status.Status.newBuilder(status_).mergeFrom(value).buildPartial(); } else { status_ = value; } onChanged(); } else { statusBuilder_.mergeFrom(value); } return this; } /** *
     * Status of the upload
     * 
* * .clarifai.api.status.Status status = 5; */ public Builder clearStatus() { if (statusBuilder_ == null) { status_ = null; onChanged(); } else { status_ = null; statusBuilder_ = null; } return this; } /** *
     * Status of the upload
     * 
* * .clarifai.api.status.Status status = 5; */ public com.clarifai.grpc.api.status.Status.Builder getStatusBuilder() { onChanged(); return getStatusFieldBuilder().getBuilder(); } /** *
     * Status of the upload
     * 
* * .clarifai.api.status.Status status = 5; */ public com.clarifai.grpc.api.status.StatusOrBuilder getStatusOrBuilder() { if (statusBuilder_ != null) { return statusBuilder_.getMessageOrBuilder(); } else { return status_ == null ? com.clarifai.grpc.api.status.Status.getDefaultInstance() : status_; } } /** *
     * Status of the upload
     * 
* * .clarifai.api.status.Status status = 5; */ private com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.status.Status, com.clarifai.grpc.api.status.Status.Builder, com.clarifai.grpc.api.status.StatusOrBuilder> getStatusFieldBuilder() { if (statusBuilder_ == null) { statusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.status.Status, com.clarifai.grpc.api.status.Status.Builder, com.clarifai.grpc.api.status.StatusOrBuilder>( getStatus(), getParentForChildren(), isClean()); status_ = null; } return statusBuilder_; } private java.lang.Object contentName_ = ""; /** *
     * name of uploaded content (e.g. filename)
     * 
* * string content_name = 8; * @return The contentName. */ public java.lang.String getContentName() { java.lang.Object ref = contentName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); contentName_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * name of uploaded content (e.g. filename)
     * 
* * string content_name = 8; * @return The bytes for contentName. */ public com.google.protobuf.ByteString getContentNameBytes() { java.lang.Object ref = contentName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); contentName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * name of uploaded content (e.g. filename)
     * 
* * string content_name = 8; * @param value The contentName to set. * @return This builder for chaining. */ public Builder setContentName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } contentName_ = value; onChanged(); return this; } /** *
     * name of uploaded content (e.g. filename)
     * 
* * string content_name = 8; * @return This builder for chaining. */ public Builder clearContentName() { contentName_ = getDefaultInstance().getContentName(); onChanged(); return this; } /** *
     * name of uploaded content (e.g. filename)
     * 
* * string content_name = 8; * @param value The bytes for contentName to set. * @return This builder for chaining. */ public Builder setContentNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); contentName_ = value; onChanged(); return this; } private long contentLength_ ; /** *
     * Total size of the upload content
     * 
* * uint64 content_length = 6; * @return The contentLength. */ @java.lang.Override public long getContentLength() { return contentLength_; } /** *
     * Total size of the upload content
     * 
* * uint64 content_length = 6; * @param value The contentLength to set. * @return This builder for chaining. */ public Builder setContentLength(long value) { contentLength_ = value; onChanged(); return this; } /** *
     * Total size of the upload content
     * 
* * uint64 content_length = 6; * @return This builder for chaining. */ public Builder clearContentLength() { contentLength_ = 0L; onChanged(); return this; } private java.lang.Object contentUrl_ = ""; /** *
     * Url of uploaded content
     * 
* * string content_url = 7; * @return The contentUrl. */ public java.lang.String getContentUrl() { java.lang.Object ref = contentUrl_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); contentUrl_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Url of uploaded content
     * 
* * string content_url = 7; * @return The bytes for contentUrl. */ public com.google.protobuf.ByteString getContentUrlBytes() { java.lang.Object ref = contentUrl_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); contentUrl_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Url of uploaded content
     * 
* * string content_url = 7; * @param value The contentUrl to set. * @return This builder for chaining. */ public Builder setContentUrl( java.lang.String value) { if (value == null) { throw new NullPointerException(); } contentUrl_ = value; onChanged(); return this; } /** *
     * Url of uploaded content
     * 
* * string content_url = 7; * @return This builder for chaining. */ public Builder clearContentUrl() { contentUrl_ = getDefaultInstance().getContentUrl(); onChanged(); return this; } /** *
     * Url of uploaded content
     * 
* * string content_url = 7; * @param value The bytes for contentUrl to set. * @return This builder for chaining. */ public Builder setContentUrlBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); contentUrl_ = value; 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:clarifai.api.Upload) } // @@protoc_insertion_point(class_scope:clarifai.api.Upload) private static final com.clarifai.grpc.api.Upload DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.clarifai.grpc.api.Upload(); } public static com.clarifai.grpc.api.Upload getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Upload parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Upload(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.clarifai.grpc.api.Upload getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy