Class OidcToken.Builder (2.47.0)

public static final class OidcToken.Builder extends GeneratedMessageV3.Builder<OidcToken.Builder> implements OidcTokenOrBuilder

Contains information needed for generating an OpenID Connect token. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself.

Protobuf type google.cloud.tasks.v2beta3.OidcToken

Implements

OidcTokenOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public OidcToken build()
Returns
Type Description
OidcToken

buildPartial()

public OidcToken buildPartial()
Returns
Type Description
OidcToken

clear()

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

clearAudience()

public OidcToken.Builder clearAudience()

Audience to be used when generating OIDC token. If not specified, the URI specified in target will be used.

string audience = 2;

Returns
Type Description
OidcToken.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearServiceAccountEmail()

public OidcToken.Builder clearServiceAccountEmail()

Service account email to be used for generating OIDC token. The service account must be within the same project as the queue. The caller must have iam.serviceAccounts.actAs permission for the service account.

string service_account_email = 1;

Returns
Type Description
OidcToken.Builder

This builder for chaining.

clone()

public OidcToken.Builder clone()
Returns
Type Description
OidcToken.Builder
Overrides

getAudience()

public String getAudience()

Audience to be used when generating OIDC token. If not specified, the URI specified in target will be used.

string audience = 2;

Returns
Type Description
String

The audience.

getAudienceBytes()

public ByteString getAudienceBytes()

Audience to be used when generating OIDC token. If not specified, the URI specified in target will be used.

string audience = 2;

Returns
Type Description
ByteString

The bytes for audience.

getDefaultInstanceForType()

public OidcToken getDefaultInstanceForType()
Returns
Type Description
OidcToken

getDescriptorForType()

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

getServiceAccountEmail()

public String getServiceAccountEmail()

Service account email to be used for generating OIDC token. The service account must be within the same project as the queue. The caller must have iam.serviceAccounts.actAs permission for the service account.

string service_account_email = 1;

Returns
Type Description
String

The serviceAccountEmail.

getServiceAccountEmailBytes()

public ByteString getServiceAccountEmailBytes()

Service account email to be used for generating OIDC token. The service account must be within the same project as the queue. The caller must have iam.serviceAccounts.actAs permission for the service account.

string service_account_email = 1;

Returns
Type Description
ByteString

The bytes for serviceAccountEmail.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(OidcToken other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAudience(String value)

public OidcToken.Builder setAudience(String value)

Audience to be used when generating OIDC token. If not specified, the URI specified in target will be used.

string audience = 2;

Parameter
Name Description
value String

The audience to set.

Returns
Type Description
OidcToken.Builder

This builder for chaining.

setAudienceBytes(ByteString value)

public OidcToken.Builder setAudienceBytes(ByteString value)

Audience to be used when generating OIDC token. If not specified, the URI specified in target will be used.

string audience = 2;

Parameter
Name Description
value ByteString

The bytes for audience to set.

Returns
Type Description
OidcToken.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setServiceAccountEmail(String value)

public OidcToken.Builder setServiceAccountEmail(String value)

Service account email to be used for generating OIDC token. The service account must be within the same project as the queue. The caller must have iam.serviceAccounts.actAs permission for the service account.

string service_account_email = 1;

Parameter
Name Description
value String

The serviceAccountEmail to set.

Returns
Type Description
OidcToken.Builder

This builder for chaining.

setServiceAccountEmailBytes(ByteString value)

public OidcToken.Builder setServiceAccountEmailBytes(ByteString value)

Service account email to be used for generating OIDC token. The service account must be within the same project as the queue. The caller must have iam.serviceAccounts.actAs permission for the service account.

string service_account_email = 1;

Parameter
Name Description
value ByteString

The bytes for serviceAccountEmail to set.

Returns
Type Description
OidcToken.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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