Class TokenOptions (0.28.0)

public final class TokenOptions extends GeneratedMessageV3 implements TokenOptionsOrBuilder

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

Protobuf type google.cloud.confidentialcomputing.v1.TokenOptions

Static Fields

AUDIENCE_FIELD_NUMBER

public static final int AUDIENCE_FIELD_NUMBER
Field Value
Type Description
int

NONCE_FIELD_NUMBER

public static final int NONCE_FIELD_NUMBER
Field Value
Type Description
int

TOKEN_TYPE_FIELD_NUMBER

public static final int TOKEN_TYPE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static TokenOptions getDefaultInstance()
Returns
Type Description
TokenOptions

getDescriptor()

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

newBuilder()

public static TokenOptions.Builder newBuilder()
Returns
Type Description
TokenOptions.Builder

newBuilder(TokenOptions prototype)

public static TokenOptions.Builder newBuilder(TokenOptions prototype)
Parameter
Name Description
prototype TokenOptions
Returns
Type Description
TokenOptions.Builder

parseDelimitedFrom(InputStream input)

public static TokenOptions parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
TokenOptions
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TokenOptions parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TokenOptions
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static TokenOptions parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
TokenOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static TokenOptions parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TokenOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static TokenOptions parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
TokenOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static TokenOptions parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TokenOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static TokenOptions parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
TokenOptions
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static TokenOptions parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TokenOptions
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static TokenOptions parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
TokenOptions
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TokenOptions parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TokenOptions
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static TokenOptions parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
TokenOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static TokenOptions parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TokenOptions
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<TokenOptions> parser()
Returns
Type Description
Parser<TokenOptions>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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

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.

getParserForType()

public Parser<TokenOptions> getParserForType()
Returns
Type Description
Parser<TokenOptions>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public TokenOptions.Builder newBuilderForType()
Returns
Type Description
TokenOptions.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected TokenOptions.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
TokenOptions.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public TokenOptions.Builder toBuilder()
Returns
Type Description
TokenOptions.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException