Class AuthConfig.Oauth2ClientCredentialsConfig.Builder (0.28.0)

public static final class AuthConfig.Oauth2ClientCredentialsConfig.Builder extends GeneratedMessageV3.Builder<AuthConfig.Oauth2ClientCredentialsConfig.Builder> implements AuthConfig.Oauth2ClientCredentialsConfigOrBuilder

Parameters to support Oauth 2.0 client credentials grant authentication. See https://tools.ietf.org/html/rfc6749#section-1.3.4 for more details.

Protobuf type google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AuthConfig.Oauth2ClientCredentialsConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AuthConfig.Oauth2ClientCredentialsConfig.Builder
Overrides

build()

public AuthConfig.Oauth2ClientCredentialsConfig build()
Returns
Type Description
AuthConfig.Oauth2ClientCredentialsConfig

buildPartial()

public AuthConfig.Oauth2ClientCredentialsConfig buildPartial()
Returns
Type Description
AuthConfig.Oauth2ClientCredentialsConfig

clear()

public AuthConfig.Oauth2ClientCredentialsConfig.Builder clear()
Returns
Type Description
AuthConfig.Oauth2ClientCredentialsConfig.Builder
Overrides

clearClientId()

public AuthConfig.Oauth2ClientCredentialsConfig.Builder clearClientId()

Required. The client identifier.

string client_id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AuthConfig.Oauth2ClientCredentialsConfig.Builder

This builder for chaining.

clearClientSecret()

public AuthConfig.Oauth2ClientCredentialsConfig.Builder clearClientSecret()

Required. Secret version reference containing the client secret. The secretmanager.versions.access permission should be granted to the service account accessing the secret.

.google.cloud.apihub.v1.Secret client_secret = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AuthConfig.Oauth2ClientCredentialsConfig.Builder

clearField(Descriptors.FieldDescriptor field)

public AuthConfig.Oauth2ClientCredentialsConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
AuthConfig.Oauth2ClientCredentialsConfig.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public AuthConfig.Oauth2ClientCredentialsConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
AuthConfig.Oauth2ClientCredentialsConfig.Builder
Overrides

clone()

public AuthConfig.Oauth2ClientCredentialsConfig.Builder clone()
Returns
Type Description
AuthConfig.Oauth2ClientCredentialsConfig.Builder
Overrides

getClientId()

public String getClientId()

Required. The client identifier.

string client_id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The clientId.

getClientIdBytes()

public ByteString getClientIdBytes()

Required. The client identifier.

string client_id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for clientId.

getClientSecret()

public Secret getClientSecret()

Required. Secret version reference containing the client secret. The secretmanager.versions.access permission should be granted to the service account accessing the secret.

.google.cloud.apihub.v1.Secret client_secret = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Secret

The clientSecret.

getClientSecretBuilder()

public Secret.Builder getClientSecretBuilder()

Required. Secret version reference containing the client secret. The secretmanager.versions.access permission should be granted to the service account accessing the secret.

.google.cloud.apihub.v1.Secret client_secret = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Secret.Builder

getClientSecretOrBuilder()

public SecretOrBuilder getClientSecretOrBuilder()

Required. Secret version reference containing the client secret. The secretmanager.versions.access permission should be granted to the service account accessing the secret.

.google.cloud.apihub.v1.Secret client_secret = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
SecretOrBuilder

getDefaultInstanceForType()

public AuthConfig.Oauth2ClientCredentialsConfig getDefaultInstanceForType()
Returns
Type Description
AuthConfig.Oauth2ClientCredentialsConfig

getDescriptorForType()

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

hasClientSecret()

public boolean hasClientSecret()

Required. Secret version reference containing the client secret. The secretmanager.versions.access permission should be granted to the service account accessing the secret.

.google.cloud.apihub.v1.Secret client_secret = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the clientSecret field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeClientSecret(Secret value)

public AuthConfig.Oauth2ClientCredentialsConfig.Builder mergeClientSecret(Secret value)

Required. Secret version reference containing the client secret. The secretmanager.versions.access permission should be granted to the service account accessing the secret.

.google.cloud.apihub.v1.Secret client_secret = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Secret
Returns
Type Description
AuthConfig.Oauth2ClientCredentialsConfig.Builder

mergeFrom(AuthConfig.Oauth2ClientCredentialsConfig other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AuthConfig.Oauth2ClientCredentialsConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AuthConfig.Oauth2ClientCredentialsConfig.Builder
Overrides

setClientId(String value)

public AuthConfig.Oauth2ClientCredentialsConfig.Builder setClientId(String value)

Required. The client identifier.

string client_id = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The clientId to set.

Returns
Type Description
AuthConfig.Oauth2ClientCredentialsConfig.Builder

This builder for chaining.

setClientIdBytes(ByteString value)

public AuthConfig.Oauth2ClientCredentialsConfig.Builder setClientIdBytes(ByteString value)

Required. The client identifier.

string client_id = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for clientId to set.

Returns
Type Description
AuthConfig.Oauth2ClientCredentialsConfig.Builder

This builder for chaining.

setClientSecret(Secret value)

public AuthConfig.Oauth2ClientCredentialsConfig.Builder setClientSecret(Secret value)

Required. Secret version reference containing the client secret. The secretmanager.versions.access permission should be granted to the service account accessing the secret.

.google.cloud.apihub.v1.Secret client_secret = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Secret
Returns
Type Description
AuthConfig.Oauth2ClientCredentialsConfig.Builder

setClientSecret(Secret.Builder builderForValue)

public AuthConfig.Oauth2ClientCredentialsConfig.Builder setClientSecret(Secret.Builder builderForValue)

Required. Secret version reference containing the client secret. The secretmanager.versions.access permission should be granted to the service account accessing the secret.

.google.cloud.apihub.v1.Secret client_secret = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue Secret.Builder
Returns
Type Description
AuthConfig.Oauth2ClientCredentialsConfig.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public AuthConfig.Oauth2ClientCredentialsConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AuthConfig.Oauth2ClientCredentialsConfig.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public AuthConfig.Oauth2ClientCredentialsConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
AuthConfig.Oauth2ClientCredentialsConfig.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final AuthConfig.Oauth2ClientCredentialsConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AuthConfig.Oauth2ClientCredentialsConfig.Builder
Overrides