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

com.clarifai.grpc.api.DataSourceCredentials 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.DataSourceCredentials}
 */
public final class DataSourceCredentials extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:clarifai.api.DataSourceCredentials)
    DataSourceCredentialsOrBuilder {
private static final long serialVersionUID = 0L;
  // Use DataSourceCredentials.newBuilder() to construct.
  private DataSourceCredentials(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private DataSourceCredentials() {
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private DataSourceCredentials(
      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.AWSCreds.Builder subBuilder = null;
            if (credentialsCase_ == 1) {
              subBuilder = ((com.clarifai.grpc.api.AWSCreds) credentials_).toBuilder();
            }
            credentials_ =
                input.readMessage(com.clarifai.grpc.api.AWSCreds.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.clarifai.grpc.api.AWSCreds) credentials_);
              credentials_ = subBuilder.buildPartial();
            }
            credentialsCase_ = 1;
            break;
          }
          case 18: {
            credentials_ = input.readBytes();
            credentialsCase_ = 2;
            break;
          }
          case 34: {
            com.clarifai.grpc.api.AzureBlobCreds.Builder subBuilder = null;
            if (credentialsCase_ == 4) {
              subBuilder = ((com.clarifai.grpc.api.AzureBlobCreds) credentials_).toBuilder();
            }
            credentials_ =
                input.readMessage(com.clarifai.grpc.api.AzureBlobCreds.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.clarifai.grpc.api.AzureBlobCreds) credentials_);
              credentials_ = subBuilder.buildPartial();
            }
            credentialsCase_ = 4;
            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_DataSourceCredentials_descriptor;
  }

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

  private int credentialsCase_ = 0;
  private java.lang.Object credentials_;
  public enum CredentialsCase
      implements com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    S3_CREDS(1),
    GCP_CREDS(2),
    AZURE_BLOB_CREDS(4),
    CREDENTIALS_NOT_SET(0);
    private final int value;
    private CredentialsCase(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 CredentialsCase valueOf(int value) {
      return forNumber(value);
    }

    public static CredentialsCase forNumber(int value) {
      switch (value) {
        case 1: return S3_CREDS;
        case 2: return GCP_CREDS;
        case 4: return AZURE_BLOB_CREDS;
        case 0: return CREDENTIALS_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public CredentialsCase
  getCredentialsCase() {
    return CredentialsCase.forNumber(
        credentialsCase_);
  }

  public static final int S3_CREDS_FIELD_NUMBER = 1;
  /**
   * 
   * AWS S3 credentials for authentication.
   * 
* * .clarifai.api.AWSCreds s3_creds = 1; * @return Whether the s3Creds field is set. */ @java.lang.Override public boolean hasS3Creds() { return credentialsCase_ == 1; } /** *
   * AWS S3 credentials for authentication.
   * 
* * .clarifai.api.AWSCreds s3_creds = 1; * @return The s3Creds. */ @java.lang.Override public com.clarifai.grpc.api.AWSCreds getS3Creds() { if (credentialsCase_ == 1) { return (com.clarifai.grpc.api.AWSCreds) credentials_; } return com.clarifai.grpc.api.AWSCreds.getDefaultInstance(); } /** *
   * AWS S3 credentials for authentication.
   * 
* * .clarifai.api.AWSCreds s3_creds = 1; */ @java.lang.Override public com.clarifai.grpc.api.AWSCredsOrBuilder getS3CredsOrBuilder() { if (credentialsCase_ == 1) { return (com.clarifai.grpc.api.AWSCreds) credentials_; } return com.clarifai.grpc.api.AWSCreds.getDefaultInstance(); } public static final int GCP_CREDS_FIELD_NUMBER = 2; /** *
   * GCP Cloud Storage uses service account key data(creds.json) as Byte array for authentication.
   * 
* * bytes gcp_creds = 2; * @return Whether the gcpCreds field is set. */ @java.lang.Override public boolean hasGcpCreds() { return credentialsCase_ == 2; } /** *
   * GCP Cloud Storage uses service account key data(creds.json) as Byte array for authentication.
   * 
* * bytes gcp_creds = 2; * @return The gcpCreds. */ @java.lang.Override public com.google.protobuf.ByteString getGcpCreds() { if (credentialsCase_ == 2) { return (com.google.protobuf.ByteString) credentials_; } return com.google.protobuf.ByteString.EMPTY; } public static final int AZURE_BLOB_CREDS_FIELD_NUMBER = 4; /** *
   * Azure Blob credentials for authentication.
   * 
* * .clarifai.api.AzureBlobCreds azure_blob_creds = 4; * @return Whether the azureBlobCreds field is set. */ @java.lang.Override public boolean hasAzureBlobCreds() { return credentialsCase_ == 4; } /** *
   * Azure Blob credentials for authentication.
   * 
* * .clarifai.api.AzureBlobCreds azure_blob_creds = 4; * @return The azureBlobCreds. */ @java.lang.Override public com.clarifai.grpc.api.AzureBlobCreds getAzureBlobCreds() { if (credentialsCase_ == 4) { return (com.clarifai.grpc.api.AzureBlobCreds) credentials_; } return com.clarifai.grpc.api.AzureBlobCreds.getDefaultInstance(); } /** *
   * Azure Blob credentials for authentication.
   * 
* * .clarifai.api.AzureBlobCreds azure_blob_creds = 4; */ @java.lang.Override public com.clarifai.grpc.api.AzureBlobCredsOrBuilder getAzureBlobCredsOrBuilder() { if (credentialsCase_ == 4) { return (com.clarifai.grpc.api.AzureBlobCreds) credentials_; } return com.clarifai.grpc.api.AzureBlobCreds.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 (credentialsCase_ == 1) { output.writeMessage(1, (com.clarifai.grpc.api.AWSCreds) credentials_); } if (credentialsCase_ == 2) { output.writeBytes( 2, (com.google.protobuf.ByteString) credentials_); } if (credentialsCase_ == 4) { output.writeMessage(4, (com.clarifai.grpc.api.AzureBlobCreds) credentials_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (credentialsCase_ == 1) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, (com.clarifai.grpc.api.AWSCreds) credentials_); } if (credentialsCase_ == 2) { size += com.google.protobuf.CodedOutputStream .computeBytesSize( 2, (com.google.protobuf.ByteString) credentials_); } if (credentialsCase_ == 4) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, (com.clarifai.grpc.api.AzureBlobCreds) credentials_); } 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.DataSourceCredentials)) { return super.equals(obj); } com.clarifai.grpc.api.DataSourceCredentials other = (com.clarifai.grpc.api.DataSourceCredentials) obj; if (!getCredentialsCase().equals(other.getCredentialsCase())) return false; switch (credentialsCase_) { case 1: if (!getS3Creds() .equals(other.getS3Creds())) return false; break; case 2: if (!getGcpCreds() .equals(other.getGcpCreds())) return false; break; case 4: if (!getAzureBlobCreds() .equals(other.getAzureBlobCreds())) 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 (credentialsCase_) { case 1: hash = (37 * hash) + S3_CREDS_FIELD_NUMBER; hash = (53 * hash) + getS3Creds().hashCode(); break; case 2: hash = (37 * hash) + GCP_CREDS_FIELD_NUMBER; hash = (53 * hash) + getGcpCreds().hashCode(); break; case 4: hash = (37 * hash) + AZURE_BLOB_CREDS_FIELD_NUMBER; hash = (53 * hash) + getAzureBlobCreds().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.clarifai.grpc.api.DataSourceCredentials parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.DataSourceCredentials 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.DataSourceCredentials parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.DataSourceCredentials 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.DataSourceCredentials parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.DataSourceCredentials parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.clarifai.grpc.api.DataSourceCredentials parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clarifai.grpc.api.DataSourceCredentials 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.DataSourceCredentials parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.clarifai.grpc.api.DataSourceCredentials 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.DataSourceCredentials parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clarifai.grpc.api.DataSourceCredentials 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.DataSourceCredentials 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.DataSourceCredentials} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:clarifai.api.DataSourceCredentials) com.clarifai.grpc.api.DataSourceCredentialsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_DataSourceCredentials_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_DataSourceCredentials_fieldAccessorTable .ensureFieldAccessorsInitialized( com.clarifai.grpc.api.DataSourceCredentials.class, com.clarifai.grpc.api.DataSourceCredentials.Builder.class); } // Construct using com.clarifai.grpc.api.DataSourceCredentials.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(); credentialsCase_ = 0; credentials_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_DataSourceCredentials_descriptor; } @java.lang.Override public com.clarifai.grpc.api.DataSourceCredentials getDefaultInstanceForType() { return com.clarifai.grpc.api.DataSourceCredentials.getDefaultInstance(); } @java.lang.Override public com.clarifai.grpc.api.DataSourceCredentials build() { com.clarifai.grpc.api.DataSourceCredentials result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.clarifai.grpc.api.DataSourceCredentials buildPartial() { com.clarifai.grpc.api.DataSourceCredentials result = new com.clarifai.grpc.api.DataSourceCredentials(this); if (credentialsCase_ == 1) { if (s3CredsBuilder_ == null) { result.credentials_ = credentials_; } else { result.credentials_ = s3CredsBuilder_.build(); } } if (credentialsCase_ == 2) { result.credentials_ = credentials_; } if (credentialsCase_ == 4) { if (azureBlobCredsBuilder_ == null) { result.credentials_ = credentials_; } else { result.credentials_ = azureBlobCredsBuilder_.build(); } } result.credentialsCase_ = credentialsCase_; 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.DataSourceCredentials) { return mergeFrom((com.clarifai.grpc.api.DataSourceCredentials)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.clarifai.grpc.api.DataSourceCredentials other) { if (other == com.clarifai.grpc.api.DataSourceCredentials.getDefaultInstance()) return this; switch (other.getCredentialsCase()) { case S3_CREDS: { mergeS3Creds(other.getS3Creds()); break; } case GCP_CREDS: { setGcpCreds(other.getGcpCreds()); break; } case AZURE_BLOB_CREDS: { mergeAzureBlobCreds(other.getAzureBlobCreds()); break; } case CREDENTIALS_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.DataSourceCredentials parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.clarifai.grpc.api.DataSourceCredentials) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int credentialsCase_ = 0; private java.lang.Object credentials_; public CredentialsCase getCredentialsCase() { return CredentialsCase.forNumber( credentialsCase_); } public Builder clearCredentials() { credentialsCase_ = 0; credentials_ = null; onChanged(); return this; } private com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.AWSCreds, com.clarifai.grpc.api.AWSCreds.Builder, com.clarifai.grpc.api.AWSCredsOrBuilder> s3CredsBuilder_; /** *
     * AWS S3 credentials for authentication.
     * 
* * .clarifai.api.AWSCreds s3_creds = 1; * @return Whether the s3Creds field is set. */ @java.lang.Override public boolean hasS3Creds() { return credentialsCase_ == 1; } /** *
     * AWS S3 credentials for authentication.
     * 
* * .clarifai.api.AWSCreds s3_creds = 1; * @return The s3Creds. */ @java.lang.Override public com.clarifai.grpc.api.AWSCreds getS3Creds() { if (s3CredsBuilder_ == null) { if (credentialsCase_ == 1) { return (com.clarifai.grpc.api.AWSCreds) credentials_; } return com.clarifai.grpc.api.AWSCreds.getDefaultInstance(); } else { if (credentialsCase_ == 1) { return s3CredsBuilder_.getMessage(); } return com.clarifai.grpc.api.AWSCreds.getDefaultInstance(); } } /** *
     * AWS S3 credentials for authentication.
     * 
* * .clarifai.api.AWSCreds s3_creds = 1; */ public Builder setS3Creds(com.clarifai.grpc.api.AWSCreds value) { if (s3CredsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } credentials_ = value; onChanged(); } else { s3CredsBuilder_.setMessage(value); } credentialsCase_ = 1; return this; } /** *
     * AWS S3 credentials for authentication.
     * 
* * .clarifai.api.AWSCreds s3_creds = 1; */ public Builder setS3Creds( com.clarifai.grpc.api.AWSCreds.Builder builderForValue) { if (s3CredsBuilder_ == null) { credentials_ = builderForValue.build(); onChanged(); } else { s3CredsBuilder_.setMessage(builderForValue.build()); } credentialsCase_ = 1; return this; } /** *
     * AWS S3 credentials for authentication.
     * 
* * .clarifai.api.AWSCreds s3_creds = 1; */ public Builder mergeS3Creds(com.clarifai.grpc.api.AWSCreds value) { if (s3CredsBuilder_ == null) { if (credentialsCase_ == 1 && credentials_ != com.clarifai.grpc.api.AWSCreds.getDefaultInstance()) { credentials_ = com.clarifai.grpc.api.AWSCreds.newBuilder((com.clarifai.grpc.api.AWSCreds) credentials_) .mergeFrom(value).buildPartial(); } else { credentials_ = value; } onChanged(); } else { if (credentialsCase_ == 1) { s3CredsBuilder_.mergeFrom(value); } else { s3CredsBuilder_.setMessage(value); } } credentialsCase_ = 1; return this; } /** *
     * AWS S3 credentials for authentication.
     * 
* * .clarifai.api.AWSCreds s3_creds = 1; */ public Builder clearS3Creds() { if (s3CredsBuilder_ == null) { if (credentialsCase_ == 1) { credentialsCase_ = 0; credentials_ = null; onChanged(); } } else { if (credentialsCase_ == 1) { credentialsCase_ = 0; credentials_ = null; } s3CredsBuilder_.clear(); } return this; } /** *
     * AWS S3 credentials for authentication.
     * 
* * .clarifai.api.AWSCreds s3_creds = 1; */ public com.clarifai.grpc.api.AWSCreds.Builder getS3CredsBuilder() { return getS3CredsFieldBuilder().getBuilder(); } /** *
     * AWS S3 credentials for authentication.
     * 
* * .clarifai.api.AWSCreds s3_creds = 1; */ @java.lang.Override public com.clarifai.grpc.api.AWSCredsOrBuilder getS3CredsOrBuilder() { if ((credentialsCase_ == 1) && (s3CredsBuilder_ != null)) { return s3CredsBuilder_.getMessageOrBuilder(); } else { if (credentialsCase_ == 1) { return (com.clarifai.grpc.api.AWSCreds) credentials_; } return com.clarifai.grpc.api.AWSCreds.getDefaultInstance(); } } /** *
     * AWS S3 credentials for authentication.
     * 
* * .clarifai.api.AWSCreds s3_creds = 1; */ private com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.AWSCreds, com.clarifai.grpc.api.AWSCreds.Builder, com.clarifai.grpc.api.AWSCredsOrBuilder> getS3CredsFieldBuilder() { if (s3CredsBuilder_ == null) { if (!(credentialsCase_ == 1)) { credentials_ = com.clarifai.grpc.api.AWSCreds.getDefaultInstance(); } s3CredsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.AWSCreds, com.clarifai.grpc.api.AWSCreds.Builder, com.clarifai.grpc.api.AWSCredsOrBuilder>( (com.clarifai.grpc.api.AWSCreds) credentials_, getParentForChildren(), isClean()); credentials_ = null; } credentialsCase_ = 1; onChanged();; return s3CredsBuilder_; } /** *
     * GCP Cloud Storage uses service account key data(creds.json) as Byte array for authentication.
     * 
* * bytes gcp_creds = 2; * @return Whether the gcpCreds field is set. */ public boolean hasGcpCreds() { return credentialsCase_ == 2; } /** *
     * GCP Cloud Storage uses service account key data(creds.json) as Byte array for authentication.
     * 
* * bytes gcp_creds = 2; * @return The gcpCreds. */ public com.google.protobuf.ByteString getGcpCreds() { if (credentialsCase_ == 2) { return (com.google.protobuf.ByteString) credentials_; } return com.google.protobuf.ByteString.EMPTY; } /** *
     * GCP Cloud Storage uses service account key data(creds.json) as Byte array for authentication.
     * 
* * bytes gcp_creds = 2; * @param value The gcpCreds to set. * @return This builder for chaining. */ public Builder setGcpCreds(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } credentialsCase_ = 2; credentials_ = value; onChanged(); return this; } /** *
     * GCP Cloud Storage uses service account key data(creds.json) as Byte array for authentication.
     * 
* * bytes gcp_creds = 2; * @return This builder for chaining. */ public Builder clearGcpCreds() { if (credentialsCase_ == 2) { credentialsCase_ = 0; credentials_ = null; onChanged(); } return this; } private com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.AzureBlobCreds, com.clarifai.grpc.api.AzureBlobCreds.Builder, com.clarifai.grpc.api.AzureBlobCredsOrBuilder> azureBlobCredsBuilder_; /** *
     * Azure Blob credentials for authentication.
     * 
* * .clarifai.api.AzureBlobCreds azure_blob_creds = 4; * @return Whether the azureBlobCreds field is set. */ @java.lang.Override public boolean hasAzureBlobCreds() { return credentialsCase_ == 4; } /** *
     * Azure Blob credentials for authentication.
     * 
* * .clarifai.api.AzureBlobCreds azure_blob_creds = 4; * @return The azureBlobCreds. */ @java.lang.Override public com.clarifai.grpc.api.AzureBlobCreds getAzureBlobCreds() { if (azureBlobCredsBuilder_ == null) { if (credentialsCase_ == 4) { return (com.clarifai.grpc.api.AzureBlobCreds) credentials_; } return com.clarifai.grpc.api.AzureBlobCreds.getDefaultInstance(); } else { if (credentialsCase_ == 4) { return azureBlobCredsBuilder_.getMessage(); } return com.clarifai.grpc.api.AzureBlobCreds.getDefaultInstance(); } } /** *
     * Azure Blob credentials for authentication.
     * 
* * .clarifai.api.AzureBlobCreds azure_blob_creds = 4; */ public Builder setAzureBlobCreds(com.clarifai.grpc.api.AzureBlobCreds value) { if (azureBlobCredsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } credentials_ = value; onChanged(); } else { azureBlobCredsBuilder_.setMessage(value); } credentialsCase_ = 4; return this; } /** *
     * Azure Blob credentials for authentication.
     * 
* * .clarifai.api.AzureBlobCreds azure_blob_creds = 4; */ public Builder setAzureBlobCreds( com.clarifai.grpc.api.AzureBlobCreds.Builder builderForValue) { if (azureBlobCredsBuilder_ == null) { credentials_ = builderForValue.build(); onChanged(); } else { azureBlobCredsBuilder_.setMessage(builderForValue.build()); } credentialsCase_ = 4; return this; } /** *
     * Azure Blob credentials for authentication.
     * 
* * .clarifai.api.AzureBlobCreds azure_blob_creds = 4; */ public Builder mergeAzureBlobCreds(com.clarifai.grpc.api.AzureBlobCreds value) { if (azureBlobCredsBuilder_ == null) { if (credentialsCase_ == 4 && credentials_ != com.clarifai.grpc.api.AzureBlobCreds.getDefaultInstance()) { credentials_ = com.clarifai.grpc.api.AzureBlobCreds.newBuilder((com.clarifai.grpc.api.AzureBlobCreds) credentials_) .mergeFrom(value).buildPartial(); } else { credentials_ = value; } onChanged(); } else { if (credentialsCase_ == 4) { azureBlobCredsBuilder_.mergeFrom(value); } else { azureBlobCredsBuilder_.setMessage(value); } } credentialsCase_ = 4; return this; } /** *
     * Azure Blob credentials for authentication.
     * 
* * .clarifai.api.AzureBlobCreds azure_blob_creds = 4; */ public Builder clearAzureBlobCreds() { if (azureBlobCredsBuilder_ == null) { if (credentialsCase_ == 4) { credentialsCase_ = 0; credentials_ = null; onChanged(); } } else { if (credentialsCase_ == 4) { credentialsCase_ = 0; credentials_ = null; } azureBlobCredsBuilder_.clear(); } return this; } /** *
     * Azure Blob credentials for authentication.
     * 
* * .clarifai.api.AzureBlobCreds azure_blob_creds = 4; */ public com.clarifai.grpc.api.AzureBlobCreds.Builder getAzureBlobCredsBuilder() { return getAzureBlobCredsFieldBuilder().getBuilder(); } /** *
     * Azure Blob credentials for authentication.
     * 
* * .clarifai.api.AzureBlobCreds azure_blob_creds = 4; */ @java.lang.Override public com.clarifai.grpc.api.AzureBlobCredsOrBuilder getAzureBlobCredsOrBuilder() { if ((credentialsCase_ == 4) && (azureBlobCredsBuilder_ != null)) { return azureBlobCredsBuilder_.getMessageOrBuilder(); } else { if (credentialsCase_ == 4) { return (com.clarifai.grpc.api.AzureBlobCreds) credentials_; } return com.clarifai.grpc.api.AzureBlobCreds.getDefaultInstance(); } } /** *
     * Azure Blob credentials for authentication.
     * 
* * .clarifai.api.AzureBlobCreds azure_blob_creds = 4; */ private com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.AzureBlobCreds, com.clarifai.grpc.api.AzureBlobCreds.Builder, com.clarifai.grpc.api.AzureBlobCredsOrBuilder> getAzureBlobCredsFieldBuilder() { if (azureBlobCredsBuilder_ == null) { if (!(credentialsCase_ == 4)) { credentials_ = com.clarifai.grpc.api.AzureBlobCreds.getDefaultInstance(); } azureBlobCredsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.AzureBlobCreds, com.clarifai.grpc.api.AzureBlobCreds.Builder, com.clarifai.grpc.api.AzureBlobCredsOrBuilder>( (com.clarifai.grpc.api.AzureBlobCreds) credentials_, getParentForChildren(), isClean()); credentials_ = null; } credentialsCase_ = 4; onChanged();; return azureBlobCredsBuilder_; } @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.DataSourceCredentials) } // @@protoc_insertion_point(class_scope:clarifai.api.DataSourceCredentials) private static final com.clarifai.grpc.api.DataSourceCredentials DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.clarifai.grpc.api.DataSourceCredentials(); } public static com.clarifai.grpc.api.DataSourceCredentials getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public DataSourceCredentials parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new DataSourceCredentials(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.DataSourceCredentials getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy