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

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

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

package com.clarifai.grpc.api;

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

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private PostModelVersionsUploadRequest(
      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: {
            com.clarifai.grpc.api.PostModelVersionsUploadConfig.Builder subBuilder = null;
            if (uploadDataCase_ == 1) {
              subBuilder = ((com.clarifai.grpc.api.PostModelVersionsUploadConfig) uploadData_).toBuilder();
            }
            uploadData_ =
                input.readMessage(com.clarifai.grpc.api.PostModelVersionsUploadConfig.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.clarifai.grpc.api.PostModelVersionsUploadConfig) uploadData_);
              uploadData_ = subBuilder.buildPartial();
            }
            uploadDataCase_ = 1;
            break;
          }
          case 18: {
            com.clarifai.grpc.api.UploadContentPart.Builder subBuilder = null;
            if (uploadDataCase_ == 2) {
              subBuilder = ((com.clarifai.grpc.api.UploadContentPart) uploadData_).toBuilder();
            }
            uploadData_ =
                input.readMessage(com.clarifai.grpc.api.UploadContentPart.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.clarifai.grpc.api.UploadContentPart) uploadData_);
              uploadData_ = subBuilder.buildPartial();
            }
            uploadDataCase_ = 2;
            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.Service.internal_static_clarifai_api_PostModelVersionsUploadRequest_descriptor;
  }

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

  private int uploadDataCase_ = 0;
  private java.lang.Object uploadData_;
  public enum UploadDataCase
      implements com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    UPLOAD_CONFIG(1),
    CONTENT_PART(2),
    UPLOADDATA_NOT_SET(0);
    private final int value;
    private UploadDataCase(int value) {
      this.value = value;
    }
    /**
     * @param value The number of the enum to look for.
     * @return The enum associated with the given number.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static UploadDataCase valueOf(int value) {
      return forNumber(value);
    }

    public static UploadDataCase forNumber(int value) {
      switch (value) {
        case 1: return UPLOAD_CONFIG;
        case 2: return CONTENT_PART;
        case 0: return UPLOADDATA_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public UploadDataCase
  getUploadDataCase() {
    return UploadDataCase.forNumber(
        uploadDataCase_);
  }

  public static final int UPLOAD_CONFIG_FIELD_NUMBER = 1;
  /**
   * .clarifai.api.PostModelVersionsUploadConfig upload_config = 1;
   * @return Whether the uploadConfig field is set.
   */
  @java.lang.Override
  public boolean hasUploadConfig() {
    return uploadDataCase_ == 1;
  }
  /**
   * .clarifai.api.PostModelVersionsUploadConfig upload_config = 1;
   * @return The uploadConfig.
   */
  @java.lang.Override
  public com.clarifai.grpc.api.PostModelVersionsUploadConfig getUploadConfig() {
    if (uploadDataCase_ == 1) {
       return (com.clarifai.grpc.api.PostModelVersionsUploadConfig) uploadData_;
    }
    return com.clarifai.grpc.api.PostModelVersionsUploadConfig.getDefaultInstance();
  }
  /**
   * .clarifai.api.PostModelVersionsUploadConfig upload_config = 1;
   */
  @java.lang.Override
  public com.clarifai.grpc.api.PostModelVersionsUploadConfigOrBuilder getUploadConfigOrBuilder() {
    if (uploadDataCase_ == 1) {
       return (com.clarifai.grpc.api.PostModelVersionsUploadConfig) uploadData_;
    }
    return com.clarifai.grpc.api.PostModelVersionsUploadConfig.getDefaultInstance();
  }

  public static final int CONTENT_PART_FIELD_NUMBER = 2;
  /**
   * .clarifai.api.UploadContentPart content_part = 2;
   * @return Whether the contentPart field is set.
   */
  @java.lang.Override
  public boolean hasContentPart() {
    return uploadDataCase_ == 2;
  }
  /**
   * .clarifai.api.UploadContentPart content_part = 2;
   * @return The contentPart.
   */
  @java.lang.Override
  public com.clarifai.grpc.api.UploadContentPart getContentPart() {
    if (uploadDataCase_ == 2) {
       return (com.clarifai.grpc.api.UploadContentPart) uploadData_;
    }
    return com.clarifai.grpc.api.UploadContentPart.getDefaultInstance();
  }
  /**
   * .clarifai.api.UploadContentPart content_part = 2;
   */
  @java.lang.Override
  public com.clarifai.grpc.api.UploadContentPartOrBuilder getContentPartOrBuilder() {
    if (uploadDataCase_ == 2) {
       return (com.clarifai.grpc.api.UploadContentPart) uploadData_;
    }
    return com.clarifai.grpc.api.UploadContentPart.getDefaultInstance();
  }

  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 (uploadDataCase_ == 1) {
      output.writeMessage(1, (com.clarifai.grpc.api.PostModelVersionsUploadConfig) uploadData_);
    }
    if (uploadDataCase_ == 2) {
      output.writeMessage(2, (com.clarifai.grpc.api.UploadContentPart) uploadData_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (uploadDataCase_ == 1) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, (com.clarifai.grpc.api.PostModelVersionsUploadConfig) uploadData_);
    }
    if (uploadDataCase_ == 2) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, (com.clarifai.grpc.api.UploadContentPart) uploadData_);
    }
    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.PostModelVersionsUploadRequest)) {
      return super.equals(obj);
    }
    com.clarifai.grpc.api.PostModelVersionsUploadRequest other = (com.clarifai.grpc.api.PostModelVersionsUploadRequest) obj;

    if (!getUploadDataCase().equals(other.getUploadDataCase())) return false;
    switch (uploadDataCase_) {
      case 1:
        if (!getUploadConfig()
            .equals(other.getUploadConfig())) return false;
        break;
      case 2:
        if (!getContentPart()
            .equals(other.getContentPart())) return false;
        break;
      case 0:
      default:
    }
    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();
    switch (uploadDataCase_) {
      case 1:
        hash = (37 * hash) + UPLOAD_CONFIG_FIELD_NUMBER;
        hash = (53 * hash) + getUploadConfig().hashCode();
        break;
      case 2:
        hash = (37 * hash) + CONTENT_PART_FIELD_NUMBER;
        hash = (53 * hash) + getContentPart().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.clarifai.grpc.api.PostModelVersionsUploadRequest parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.clarifai.grpc.api.PostModelVersionsUploadRequest 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.PostModelVersionsUploadRequest parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.clarifai.grpc.api.PostModelVersionsUploadRequest 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.PostModelVersionsUploadRequest parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.clarifai.grpc.api.PostModelVersionsUploadRequest parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.clarifai.grpc.api.PostModelVersionsUploadRequest parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.clarifai.grpc.api.PostModelVersionsUploadRequest 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.PostModelVersionsUploadRequest parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.clarifai.grpc.api.PostModelVersionsUploadRequest 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.PostModelVersionsUploadRequest parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.clarifai.grpc.api.PostModelVersionsUploadRequest 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.PostModelVersionsUploadRequest 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.PostModelVersionsUploadRequest}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:clarifai.api.PostModelVersionsUploadRequest)
      com.clarifai.grpc.api.PostModelVersionsUploadRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.clarifai.grpc.api.Service.internal_static_clarifai_api_PostModelVersionsUploadRequest_descriptor;
    }

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

    // Construct using com.clarifai.grpc.api.PostModelVersionsUploadRequest.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();
      uploadDataCase_ = 0;
      uploadData_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.clarifai.grpc.api.Service.internal_static_clarifai_api_PostModelVersionsUploadRequest_descriptor;
    }

    @java.lang.Override
    public com.clarifai.grpc.api.PostModelVersionsUploadRequest getDefaultInstanceForType() {
      return com.clarifai.grpc.api.PostModelVersionsUploadRequest.getDefaultInstance();
    }

    @java.lang.Override
    public com.clarifai.grpc.api.PostModelVersionsUploadRequest build() {
      com.clarifai.grpc.api.PostModelVersionsUploadRequest result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.clarifai.grpc.api.PostModelVersionsUploadRequest buildPartial() {
      com.clarifai.grpc.api.PostModelVersionsUploadRequest result = new com.clarifai.grpc.api.PostModelVersionsUploadRequest(this);
      if (uploadDataCase_ == 1) {
        if (uploadConfigBuilder_ == null) {
          result.uploadData_ = uploadData_;
        } else {
          result.uploadData_ = uploadConfigBuilder_.build();
        }
      }
      if (uploadDataCase_ == 2) {
        if (contentPartBuilder_ == null) {
          result.uploadData_ = uploadData_;
        } else {
          result.uploadData_ = contentPartBuilder_.build();
        }
      }
      result.uploadDataCase_ = uploadDataCase_;
      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.PostModelVersionsUploadRequest) {
        return mergeFrom((com.clarifai.grpc.api.PostModelVersionsUploadRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.clarifai.grpc.api.PostModelVersionsUploadRequest other) {
      if (other == com.clarifai.grpc.api.PostModelVersionsUploadRequest.getDefaultInstance()) return this;
      switch (other.getUploadDataCase()) {
        case UPLOAD_CONFIG: {
          mergeUploadConfig(other.getUploadConfig());
          break;
        }
        case CONTENT_PART: {
          mergeContentPart(other.getContentPart());
          break;
        }
        case UPLOADDATA_NOT_SET: {
          break;
        }
      }
      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.PostModelVersionsUploadRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.clarifai.grpc.api.PostModelVersionsUploadRequest) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int uploadDataCase_ = 0;
    private java.lang.Object uploadData_;
    public UploadDataCase
        getUploadDataCase() {
      return UploadDataCase.forNumber(
          uploadDataCase_);
    }

    public Builder clearUploadData() {
      uploadDataCase_ = 0;
      uploadData_ = null;
      onChanged();
      return this;
    }


    private com.google.protobuf.SingleFieldBuilderV3<
        com.clarifai.grpc.api.PostModelVersionsUploadConfig, com.clarifai.grpc.api.PostModelVersionsUploadConfig.Builder, com.clarifai.grpc.api.PostModelVersionsUploadConfigOrBuilder> uploadConfigBuilder_;
    /**
     * .clarifai.api.PostModelVersionsUploadConfig upload_config = 1;
     * @return Whether the uploadConfig field is set.
     */
    @java.lang.Override
    public boolean hasUploadConfig() {
      return uploadDataCase_ == 1;
    }
    /**
     * .clarifai.api.PostModelVersionsUploadConfig upload_config = 1;
     * @return The uploadConfig.
     */
    @java.lang.Override
    public com.clarifai.grpc.api.PostModelVersionsUploadConfig getUploadConfig() {
      if (uploadConfigBuilder_ == null) {
        if (uploadDataCase_ == 1) {
          return (com.clarifai.grpc.api.PostModelVersionsUploadConfig) uploadData_;
        }
        return com.clarifai.grpc.api.PostModelVersionsUploadConfig.getDefaultInstance();
      } else {
        if (uploadDataCase_ == 1) {
          return uploadConfigBuilder_.getMessage();
        }
        return com.clarifai.grpc.api.PostModelVersionsUploadConfig.getDefaultInstance();
      }
    }
    /**
     * .clarifai.api.PostModelVersionsUploadConfig upload_config = 1;
     */
    public Builder setUploadConfig(com.clarifai.grpc.api.PostModelVersionsUploadConfig value) {
      if (uploadConfigBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        uploadData_ = value;
        onChanged();
      } else {
        uploadConfigBuilder_.setMessage(value);
      }
      uploadDataCase_ = 1;
      return this;
    }
    /**
     * .clarifai.api.PostModelVersionsUploadConfig upload_config = 1;
     */
    public Builder setUploadConfig(
        com.clarifai.grpc.api.PostModelVersionsUploadConfig.Builder builderForValue) {
      if (uploadConfigBuilder_ == null) {
        uploadData_ = builderForValue.build();
        onChanged();
      } else {
        uploadConfigBuilder_.setMessage(builderForValue.build());
      }
      uploadDataCase_ = 1;
      return this;
    }
    /**
     * .clarifai.api.PostModelVersionsUploadConfig upload_config = 1;
     */
    public Builder mergeUploadConfig(com.clarifai.grpc.api.PostModelVersionsUploadConfig value) {
      if (uploadConfigBuilder_ == null) {
        if (uploadDataCase_ == 1 &&
            uploadData_ != com.clarifai.grpc.api.PostModelVersionsUploadConfig.getDefaultInstance()) {
          uploadData_ = com.clarifai.grpc.api.PostModelVersionsUploadConfig.newBuilder((com.clarifai.grpc.api.PostModelVersionsUploadConfig) uploadData_)
              .mergeFrom(value).buildPartial();
        } else {
          uploadData_ = value;
        }
        onChanged();
      } else {
        if (uploadDataCase_ == 1) {
          uploadConfigBuilder_.mergeFrom(value);
        } else {
          uploadConfigBuilder_.setMessage(value);
        }
      }
      uploadDataCase_ = 1;
      return this;
    }
    /**
     * .clarifai.api.PostModelVersionsUploadConfig upload_config = 1;
     */
    public Builder clearUploadConfig() {
      if (uploadConfigBuilder_ == null) {
        if (uploadDataCase_ == 1) {
          uploadDataCase_ = 0;
          uploadData_ = null;
          onChanged();
        }
      } else {
        if (uploadDataCase_ == 1) {
          uploadDataCase_ = 0;
          uploadData_ = null;
        }
        uploadConfigBuilder_.clear();
      }
      return this;
    }
    /**
     * .clarifai.api.PostModelVersionsUploadConfig upload_config = 1;
     */
    public com.clarifai.grpc.api.PostModelVersionsUploadConfig.Builder getUploadConfigBuilder() {
      return getUploadConfigFieldBuilder().getBuilder();
    }
    /**
     * .clarifai.api.PostModelVersionsUploadConfig upload_config = 1;
     */
    @java.lang.Override
    public com.clarifai.grpc.api.PostModelVersionsUploadConfigOrBuilder getUploadConfigOrBuilder() {
      if ((uploadDataCase_ == 1) && (uploadConfigBuilder_ != null)) {
        return uploadConfigBuilder_.getMessageOrBuilder();
      } else {
        if (uploadDataCase_ == 1) {
          return (com.clarifai.grpc.api.PostModelVersionsUploadConfig) uploadData_;
        }
        return com.clarifai.grpc.api.PostModelVersionsUploadConfig.getDefaultInstance();
      }
    }
    /**
     * .clarifai.api.PostModelVersionsUploadConfig upload_config = 1;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.clarifai.grpc.api.PostModelVersionsUploadConfig, com.clarifai.grpc.api.PostModelVersionsUploadConfig.Builder, com.clarifai.grpc.api.PostModelVersionsUploadConfigOrBuilder> 
        getUploadConfigFieldBuilder() {
      if (uploadConfigBuilder_ == null) {
        if (!(uploadDataCase_ == 1)) {
          uploadData_ = com.clarifai.grpc.api.PostModelVersionsUploadConfig.getDefaultInstance();
        }
        uploadConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.clarifai.grpc.api.PostModelVersionsUploadConfig, com.clarifai.grpc.api.PostModelVersionsUploadConfig.Builder, com.clarifai.grpc.api.PostModelVersionsUploadConfigOrBuilder>(
                (com.clarifai.grpc.api.PostModelVersionsUploadConfig) uploadData_,
                getParentForChildren(),
                isClean());
        uploadData_ = null;
      }
      uploadDataCase_ = 1;
      onChanged();;
      return uploadConfigBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.clarifai.grpc.api.UploadContentPart, com.clarifai.grpc.api.UploadContentPart.Builder, com.clarifai.grpc.api.UploadContentPartOrBuilder> contentPartBuilder_;
    /**
     * .clarifai.api.UploadContentPart content_part = 2;
     * @return Whether the contentPart field is set.
     */
    @java.lang.Override
    public boolean hasContentPart() {
      return uploadDataCase_ == 2;
    }
    /**
     * .clarifai.api.UploadContentPart content_part = 2;
     * @return The contentPart.
     */
    @java.lang.Override
    public com.clarifai.grpc.api.UploadContentPart getContentPart() {
      if (contentPartBuilder_ == null) {
        if (uploadDataCase_ == 2) {
          return (com.clarifai.grpc.api.UploadContentPart) uploadData_;
        }
        return com.clarifai.grpc.api.UploadContentPart.getDefaultInstance();
      } else {
        if (uploadDataCase_ == 2) {
          return contentPartBuilder_.getMessage();
        }
        return com.clarifai.grpc.api.UploadContentPart.getDefaultInstance();
      }
    }
    /**
     * .clarifai.api.UploadContentPart content_part = 2;
     */
    public Builder setContentPart(com.clarifai.grpc.api.UploadContentPart value) {
      if (contentPartBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        uploadData_ = value;
        onChanged();
      } else {
        contentPartBuilder_.setMessage(value);
      }
      uploadDataCase_ = 2;
      return this;
    }
    /**
     * .clarifai.api.UploadContentPart content_part = 2;
     */
    public Builder setContentPart(
        com.clarifai.grpc.api.UploadContentPart.Builder builderForValue) {
      if (contentPartBuilder_ == null) {
        uploadData_ = builderForValue.build();
        onChanged();
      } else {
        contentPartBuilder_.setMessage(builderForValue.build());
      }
      uploadDataCase_ = 2;
      return this;
    }
    /**
     * .clarifai.api.UploadContentPart content_part = 2;
     */
    public Builder mergeContentPart(com.clarifai.grpc.api.UploadContentPart value) {
      if (contentPartBuilder_ == null) {
        if (uploadDataCase_ == 2 &&
            uploadData_ != com.clarifai.grpc.api.UploadContentPart.getDefaultInstance()) {
          uploadData_ = com.clarifai.grpc.api.UploadContentPart.newBuilder((com.clarifai.grpc.api.UploadContentPart) uploadData_)
              .mergeFrom(value).buildPartial();
        } else {
          uploadData_ = value;
        }
        onChanged();
      } else {
        if (uploadDataCase_ == 2) {
          contentPartBuilder_.mergeFrom(value);
        } else {
          contentPartBuilder_.setMessage(value);
        }
      }
      uploadDataCase_ = 2;
      return this;
    }
    /**
     * .clarifai.api.UploadContentPart content_part = 2;
     */
    public Builder clearContentPart() {
      if (contentPartBuilder_ == null) {
        if (uploadDataCase_ == 2) {
          uploadDataCase_ = 0;
          uploadData_ = null;
          onChanged();
        }
      } else {
        if (uploadDataCase_ == 2) {
          uploadDataCase_ = 0;
          uploadData_ = null;
        }
        contentPartBuilder_.clear();
      }
      return this;
    }
    /**
     * .clarifai.api.UploadContentPart content_part = 2;
     */
    public com.clarifai.grpc.api.UploadContentPart.Builder getContentPartBuilder() {
      return getContentPartFieldBuilder().getBuilder();
    }
    /**
     * .clarifai.api.UploadContentPart content_part = 2;
     */
    @java.lang.Override
    public com.clarifai.grpc.api.UploadContentPartOrBuilder getContentPartOrBuilder() {
      if ((uploadDataCase_ == 2) && (contentPartBuilder_ != null)) {
        return contentPartBuilder_.getMessageOrBuilder();
      } else {
        if (uploadDataCase_ == 2) {
          return (com.clarifai.grpc.api.UploadContentPart) uploadData_;
        }
        return com.clarifai.grpc.api.UploadContentPart.getDefaultInstance();
      }
    }
    /**
     * .clarifai.api.UploadContentPart content_part = 2;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.clarifai.grpc.api.UploadContentPart, com.clarifai.grpc.api.UploadContentPart.Builder, com.clarifai.grpc.api.UploadContentPartOrBuilder> 
        getContentPartFieldBuilder() {
      if (contentPartBuilder_ == null) {
        if (!(uploadDataCase_ == 2)) {
          uploadData_ = com.clarifai.grpc.api.UploadContentPart.getDefaultInstance();
        }
        contentPartBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.clarifai.grpc.api.UploadContentPart, com.clarifai.grpc.api.UploadContentPart.Builder, com.clarifai.grpc.api.UploadContentPartOrBuilder>(
                (com.clarifai.grpc.api.UploadContentPart) uploadData_,
                getParentForChildren(),
                isClean());
        uploadData_ = null;
      }
      uploadDataCase_ = 2;
      onChanged();;
      return contentPartBuilder_;
    }
    @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.PostModelVersionsUploadRequest)
  }

  // @@protoc_insertion_point(class_scope:clarifai.api.PostModelVersionsUploadRequest)
  private static final com.clarifai.grpc.api.PostModelVersionsUploadRequest DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.clarifai.grpc.api.PostModelVersionsUploadRequest();
  }

  public static com.clarifai.grpc.api.PostModelVersionsUploadRequest getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser
      PARSER = new com.google.protobuf.AbstractParser() {
    @java.lang.Override
    public PostModelVersionsUploadRequest parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new PostModelVersionsUploadRequest(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.PostModelVersionsUploadRequest getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy