Class MetadataExchangeRequest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<MetadataExchangeRequest.Builder>
com.google.cloud.alloydb.connectors.v1beta.MetadataExchangeRequest.Builder
All Implemented Interfaces:
MetadataExchangeRequestOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
MetadataExchangeRequest

public static final class MetadataExchangeRequest.Builder extends com.google.protobuf.GeneratedMessage.Builder<MetadataExchangeRequest.Builder> implements MetadataExchangeRequestOrBuilder
 Message used by AlloyDB connectors to exchange client and connection metadata
 with the server after a successful TLS handshake. This metadata includes an
 IAM token, which is used to authenticate users based on their IAM identity.
 The sole purpose of this message is for the use of AlloyDB connectors.
 Clients should not rely on this message directly as there can be breaking
 changes in the future.
 
Protobuf type google.cloud.alloydb.connectors.v1beta.MetadataExchangeRequest
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<MetadataExchangeRequest.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<MetadataExchangeRequest.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<MetadataExchangeRequest.Builder>
    • getDefaultInstanceForType

      public MetadataExchangeRequest getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public MetadataExchangeRequest build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public MetadataExchangeRequest buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public MetadataExchangeRequest.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<MetadataExchangeRequest.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<MetadataExchangeRequest.Builder>
    • mergeFrom

      public MetadataExchangeRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<MetadataExchangeRequest.Builder>
      Throws:
      IOException
    • getUserAgent

      public String getUserAgent()
       Optional. Connector information.
       
      string user_agent = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getUserAgent in interface MetadataExchangeRequestOrBuilder
      Returns:
      The userAgent.
    • getUserAgentBytes

      public com.google.protobuf.ByteString getUserAgentBytes()
       Optional. Connector information.
       
      string user_agent = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getUserAgentBytes in interface MetadataExchangeRequestOrBuilder
      Returns:
      The bytes for userAgent.
    • setUserAgent

      public MetadataExchangeRequest.Builder setUserAgent(String value)
       Optional. Connector information.
       
      string user_agent = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The userAgent to set.
      Returns:
      This builder for chaining.
    • clearUserAgent

      public MetadataExchangeRequest.Builder clearUserAgent()
       Optional. Connector information.
       
      string user_agent = 1 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setUserAgentBytes

      public MetadataExchangeRequest.Builder setUserAgentBytes(com.google.protobuf.ByteString value)
       Optional. Connector information.
       
      string user_agent = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for userAgent to set.
      Returns:
      This builder for chaining.
    • getAuthTypeValue

      public int getAuthTypeValue()
       Authentication type.
       
      .google.cloud.alloydb.connectors.v1beta.MetadataExchangeRequest.AuthType auth_type = 2;
      Specified by:
      getAuthTypeValue in interface MetadataExchangeRequestOrBuilder
      Returns:
      The enum numeric value on the wire for authType.
    • setAuthTypeValue

      public MetadataExchangeRequest.Builder setAuthTypeValue(int value)
       Authentication type.
       
      .google.cloud.alloydb.connectors.v1beta.MetadataExchangeRequest.AuthType auth_type = 2;
      Parameters:
      value - The enum numeric value on the wire for authType to set.
      Returns:
      This builder for chaining.
    • getAuthType

      public MetadataExchangeRequest.AuthType getAuthType()
       Authentication type.
       
      .google.cloud.alloydb.connectors.v1beta.MetadataExchangeRequest.AuthType auth_type = 2;
      Specified by:
      getAuthType in interface MetadataExchangeRequestOrBuilder
      Returns:
      The authType.
    • setAuthType

       Authentication type.
       
      .google.cloud.alloydb.connectors.v1beta.MetadataExchangeRequest.AuthType auth_type = 2;
      Parameters:
      value - The authType to set.
      Returns:
      This builder for chaining.
    • clearAuthType

      public MetadataExchangeRequest.Builder clearAuthType()
       Authentication type.
       
      .google.cloud.alloydb.connectors.v1beta.MetadataExchangeRequest.AuthType auth_type = 2;
      Returns:
      This builder for chaining.
    • getOauth2Token

      public String getOauth2Token()
       IAM token used for both IAM user authentiation and
       `alloydb.instances.connect` permission check.
       
      string oauth2_token = 3;
      Specified by:
      getOauth2Token in interface MetadataExchangeRequestOrBuilder
      Returns:
      The oauth2Token.
    • getOauth2TokenBytes

      public com.google.protobuf.ByteString getOauth2TokenBytes()
       IAM token used for both IAM user authentiation and
       `alloydb.instances.connect` permission check.
       
      string oauth2_token = 3;
      Specified by:
      getOauth2TokenBytes in interface MetadataExchangeRequestOrBuilder
      Returns:
      The bytes for oauth2Token.
    • setOauth2Token

      public MetadataExchangeRequest.Builder setOauth2Token(String value)
       IAM token used for both IAM user authentiation and
       `alloydb.instances.connect` permission check.
       
      string oauth2_token = 3;
      Parameters:
      value - The oauth2Token to set.
      Returns:
      This builder for chaining.
    • clearOauth2Token

      public MetadataExchangeRequest.Builder clearOauth2Token()
       IAM token used for both IAM user authentiation and
       `alloydb.instances.connect` permission check.
       
      string oauth2_token = 3;
      Returns:
      This builder for chaining.
    • setOauth2TokenBytes

      public MetadataExchangeRequest.Builder setOauth2TokenBytes(com.google.protobuf.ByteString value)
       IAM token used for both IAM user authentiation and
       `alloydb.instances.connect` permission check.
       
      string oauth2_token = 3;
      Parameters:
      value - The bytes for oauth2Token to set.
      Returns:
      This builder for chaining.