Class TokenOptions.Builder (0.27.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
TypeDescription
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
NameDescription
valuesIterable<String>

The nonce to add.

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

The nonce to add.

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

The bytes of the nonce to add.

Returns
TypeDescription
TokenOptions.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public TokenOptions build()
Returns
TypeDescription
TokenOptions

buildPartial()

public TokenOptions buildPartial()
Returns
TypeDescription
TokenOptions

clear()

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

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public TokenOptions.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
TokenOptions.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public TokenOptions.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
TokenOptions.Builder

This builder for chaining.

clone()

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

The bytes for audience.

getDefaultInstanceForType()

public TokenOptions getDefaultInstanceForType()
Returns
TypeDescription
TokenOptions

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

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

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
int

The enum numeric value on the wire for tokenType.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(TokenOptions other)

public TokenOptions.Builder mergeFrom(TokenOptions other)
Parameter
NameDescription
otherTokenOptions
Returns
TypeDescription
TokenOptions.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

The audience to set.

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

The bytes for audience to set.

Returns
TypeDescription
TokenOptions.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public TokenOptions.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The nonce to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueTokenType

The tokenType to set.

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

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

Returns
TypeDescription
TokenOptions.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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