Class OidcToken.Builder (2.14.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.scheduler.v1.OidcToken

Implements

OidcTokenOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public OidcToken.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
OidcToken.Builder
Overrides

build()

public OidcToken build()
Returns
TypeDescription
OidcToken

buildPartial()

public OidcToken buildPartial()
Returns
TypeDescription
OidcToken

clear()

public OidcToken.Builder clear()
Returns
TypeDescription
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
TypeDescription
OidcToken.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public OidcToken.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
OidcToken.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public OidcToken.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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 job. The caller must have iam.serviceAccounts.actAs permission for the service account.

string service_account_email = 1;

Returns
TypeDescription
OidcToken.Builder

This builder for chaining.

clone()

public OidcToken.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for audience.

getDefaultInstanceForType()

public OidcToken getDefaultInstanceForType()
Returns
TypeDescription
OidcToken

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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 job. The caller must have iam.serviceAccounts.actAs permission for the service account.

string service_account_email = 1;

Returns
TypeDescription
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 job. The caller must have iam.serviceAccounts.actAs permission for the service account.

string service_account_email = 1;

Returns
TypeDescription
ByteString

The bytes for serviceAccountEmail.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(OidcToken other)

public OidcToken.Builder mergeFrom(OidcToken other)
Parameter
NameDescription
otherOidcToken
Returns
TypeDescription
OidcToken.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public OidcToken.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OidcToken.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public OidcToken.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
OidcToken.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final OidcToken.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueString

The audience to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for audience to set.

Returns
TypeDescription
OidcToken.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public OidcToken.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
OidcToken.Builder
Overrides

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

public OidcToken.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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 job. The caller must have iam.serviceAccounts.actAs permission for the service account.

string service_account_email = 1;

Parameter
NameDescription
valueString

The serviceAccountEmail to set.

Returns
TypeDescription
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 job. The caller must have iam.serviceAccounts.actAs permission for the service account.

string service_account_email = 1;

Parameter
NameDescription
valueByteString

The bytes for serviceAccountEmail to set.

Returns
TypeDescription
OidcToken.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final OidcToken.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
OidcToken.Builder
Overrides