Class TokenOptions.Builder (0.39.0)

public static final class TokenOptions.Builder extends GeneratedMessageV3.Builder<TokenOptions.Builder> implements TokenOptionsOrBuilder

Options to modify claims in the token to generate custom-purpose tokens.

Protobuf type google.cloud.confidentialcomputing.v1.TokenOptions

Static Methods

getDescriptor()

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

Methods

addAllNonce(Iterable<String> values)

public TokenOptions.Builder addAllNonce(Iterable<String> values)

Optional. Optional parameter to place one or more nonces in the eat_nonce claim in the output token. The minimum size for JSON-encoded EATs is 10 bytes and the maximum size is 74 bytes.

repeated string nonce = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The nonce to add.

Returns
Type Description
TokenOptions.Builder

This builder for chaining.

addNonce(String value)

public TokenOptions.Builder addNonce(String value)

Optional. Optional parameter to place one or more nonces in the eat_nonce claim in the output token. The minimum size for JSON-encoded EATs is 10 bytes and the maximum size is 74 bytes.

repeated string nonce = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The nonce to add.

Returns
Type Description
TokenOptions.Builder

This builder for chaining.

addNonceBytes(ByteString value)

public TokenOptions.Builder addNonceBytes(ByteString value)

Optional. Optional parameter to place one or more nonces in the eat_nonce claim in the output token. The minimum size for JSON-encoded EATs is 10 bytes and the maximum size is 74 bytes.

repeated string nonce = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the nonce to add.

Returns
Type Description
TokenOptions.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public TokenOptions build()
Returns
Type Description
TokenOptions

buildPartial()

public TokenOptions buildPartial()
Returns
Type Description
TokenOptions

clear()

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

clearAudience()

public TokenOptions.Builder clearAudience()

Optional. Optional string to issue the token with a custom audience claim. Required if one or more nonces are specified.

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

Returns
Type Description
TokenOptions.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearNonce()

public TokenOptions.Builder clearNonce()

Optional. Optional parameter to place one or more nonces in the eat_nonce claim in the output token. The minimum size for JSON-encoded EATs is 10 bytes and the maximum size is 74 bytes.

repeated string nonce = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TokenOptions.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearTokenType()

public TokenOptions.Builder clearTokenType()

Optional. Optional token type to select what type of token to return.

.google.cloud.confidentialcomputing.v1.TokenType token_type = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TokenOptions.Builder

This builder for chaining.

clone()

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

getAudience()

public String getAudience()

Optional. Optional string to issue the token with a custom audience claim. Required if one or more nonces are specified.

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

Returns
Type Description
String

The audience.

getAudienceBytes()

public ByteString getAudienceBytes()

Optional. Optional string to issue the token with a custom audience claim. Required if one or more nonces are specified.

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

Returns
Type Description
ByteString

The bytes for audience.

getDefaultInstanceForType()

public TokenOptions getDefaultInstanceForType()
Returns
Type Description
TokenOptions

getDescriptorForType()

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

getNonce(int index)

public String getNonce(int index)

Optional. Optional parameter to place one or more nonces in the eat_nonce claim in the output token. The minimum size for JSON-encoded EATs is 10 bytes and the maximum size is 74 bytes.

repeated string nonce = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The nonce at the given index.

getNonceBytes(int index)

public ByteString getNonceBytes(int index)

Optional. Optional parameter to place one or more nonces in the eat_nonce claim in the output token. The minimum size for JSON-encoded EATs is 10 bytes and the maximum size is 74 bytes.

repeated string nonce = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the nonce at the given index.

getNonceCount()

public int getNonceCount()

Optional. Optional parameter to place one or more nonces in the eat_nonce claim in the output token. The minimum size for JSON-encoded EATs is 10 bytes and the maximum size is 74 bytes.

repeated string nonce = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of nonce.

getNonceList()

public ProtocolStringList getNonceList()

Optional. Optional parameter to place one or more nonces in the eat_nonce claim in the output token. The minimum size for JSON-encoded EATs is 10 bytes and the maximum size is 74 bytes.

repeated string nonce = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the nonce.

getTokenType()

public TokenType getTokenType()

Optional. Optional token type to select what type of token to return.

.google.cloud.confidentialcomputing.v1.TokenType token_type = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TokenType

The tokenType.

getTokenTypeValue()

public int getTokenTypeValue()

Optional. Optional token type to select what type of token to return.

.google.cloud.confidentialcomputing.v1.TokenType token_type = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for tokenType.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(TokenOptions other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAudience(String value)

public TokenOptions.Builder setAudience(String value)

Optional. Optional string to issue the token with a custom audience claim. Required if one or more nonces are specified.

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

Parameter
Name Description
value String

The audience to set.

Returns
Type Description
TokenOptions.Builder

This builder for chaining.

setAudienceBytes(ByteString value)

public TokenOptions.Builder setAudienceBytes(ByteString value)

Optional. Optional string to issue the token with a custom audience claim. Required if one or more nonces are specified.

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

Parameter
Name Description
value ByteString

The bytes for audience to set.

Returns
Type Description
TokenOptions.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setNonce(int index, String value)

public TokenOptions.Builder setNonce(int index, String value)

Optional. Optional parameter to place one or more nonces in the eat_nonce claim in the output token. The minimum size for JSON-encoded EATs is 10 bytes and the maximum size is 74 bytes.

repeated string nonce = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The nonce to set.

Returns
Type Description
TokenOptions.Builder

This builder for chaining.

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

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

setTokenType(TokenType value)

public TokenOptions.Builder setTokenType(TokenType value)

Optional. Optional token type to select what type of token to return.

.google.cloud.confidentialcomputing.v1.TokenType token_type = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value TokenType

The tokenType to set.

Returns
Type Description
TokenOptions.Builder

This builder for chaining.

setTokenTypeValue(int value)

public TokenOptions.Builder setTokenTypeValue(int value)

Optional. Optional token type to select what type of token to return.

.google.cloud.confidentialcomputing.v1.TokenType token_type = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

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

Returns
Type Description
TokenOptions.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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