Class MetadataExchangeRequest.Builder (0.61.0)

public static final class MetadataExchangeRequest.Builder extends 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.v1alpha.MetadataExchangeRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public MetadataExchangeRequest build()
Returns
Type Description
MetadataExchangeRequest

buildPartial()

public MetadataExchangeRequest buildPartial()
Returns
Type Description
MetadataExchangeRequest

clear()

public MetadataExchangeRequest.Builder clear()
Returns
Type Description
MetadataExchangeRequest.Builder
Overrides

clearAuthType()

public MetadataExchangeRequest.Builder clearAuthType()

Authentication type.

.google.cloud.alloydb.connectors.v1alpha.MetadataExchangeRequest.AuthType auth_type = 2;

Returns
Type Description
MetadataExchangeRequest.Builder

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
Type Description
MetadataExchangeRequest.Builder

This builder for chaining.

clearUserAgent()

public MetadataExchangeRequest.Builder clearUserAgent()

Optional. Connector information.

string user_agent = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
MetadataExchangeRequest.Builder

This builder for chaining.

getAuthType()

public MetadataExchangeRequest.AuthType getAuthType()

Authentication type.

.google.cloud.alloydb.connectors.v1alpha.MetadataExchangeRequest.AuthType auth_type = 2;

Returns
Type Description
MetadataExchangeRequest.AuthType

The authType.

getAuthTypeValue()

public int getAuthTypeValue()

Authentication type.

.google.cloud.alloydb.connectors.v1alpha.MetadataExchangeRequest.AuthType auth_type = 2;

Returns
Type Description
int

The enum numeric value on the wire for authType.

getDefaultInstanceForType()

public MetadataExchangeRequest getDefaultInstanceForType()
Returns
Type Description
MetadataExchangeRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getOauth2Token()

public String getOauth2Token()

IAM token used for both IAM user authentiation and alloydb.instances.connect permission check.

string oauth2_token = 3;

Returns
Type Description
String

The oauth2Token.

getOauth2TokenBytes()

public ByteString getOauth2TokenBytes()

IAM token used for both IAM user authentiation and alloydb.instances.connect permission check.

string oauth2_token = 3;

Returns
Type Description
ByteString

The bytes for oauth2Token.

getUserAgent()

public String getUserAgent()

Optional. Connector information.

string user_agent = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The userAgent.

getUserAgentBytes()

public ByteString getUserAgentBytes()

Optional. Connector information.

string user_agent = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for userAgent.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(MetadataExchangeRequest other)

public MetadataExchangeRequest.Builder mergeFrom(MetadataExchangeRequest other)
Parameter
Name Description
other MetadataExchangeRequest
Returns
Type Description
MetadataExchangeRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public MetadataExchangeRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
MetadataExchangeRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public MetadataExchangeRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
MetadataExchangeRequest.Builder
Overrides

setAuthType(MetadataExchangeRequest.AuthType value)

public MetadataExchangeRequest.Builder setAuthType(MetadataExchangeRequest.AuthType value)

Authentication type.

.google.cloud.alloydb.connectors.v1alpha.MetadataExchangeRequest.AuthType auth_type = 2;

Parameter
Name Description
value MetadataExchangeRequest.AuthType

The authType to set.

Returns
Type Description
MetadataExchangeRequest.Builder

This builder for chaining.

setAuthTypeValue(int value)

public MetadataExchangeRequest.Builder setAuthTypeValue(int value)

Authentication type.

.google.cloud.alloydb.connectors.v1alpha.MetadataExchangeRequest.AuthType auth_type = 2;

Parameter
Name Description
value int

The enum numeric value on the wire for authType to set.

Returns
Type Description
MetadataExchangeRequest.Builder

This builder for chaining.

setOauth2Token(String value)

public MetadataExchangeRequest.Builder setOauth2Token(String value)

IAM token used for both IAM user authentiation and alloydb.instances.connect permission check.

string oauth2_token = 3;

Parameter
Name Description
value String

The oauth2Token to set.

Returns
Type Description
MetadataExchangeRequest.Builder

This builder for chaining.

setOauth2TokenBytes(ByteString value)

public MetadataExchangeRequest.Builder setOauth2TokenBytes(ByteString value)

IAM token used for both IAM user authentiation and alloydb.instances.connect permission check.

string oauth2_token = 3;

Parameter
Name Description
value ByteString

The bytes for oauth2Token to set.

Returns
Type Description
MetadataExchangeRequest.Builder

This builder for chaining.

setUserAgent(String value)

public MetadataExchangeRequest.Builder setUserAgent(String value)

Optional. Connector information.

string user_agent = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The userAgent to set.

Returns
Type Description
MetadataExchangeRequest.Builder

This builder for chaining.

setUserAgentBytes(ByteString value)

public MetadataExchangeRequest.Builder setUserAgentBytes(ByteString value)

Optional. Connector information.

string user_agent = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for userAgent to set.

Returns
Type Description
MetadataExchangeRequest.Builder

This builder for chaining.