Class TokenOptions (0.27.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
TypeDescription
int

NONCE_FIELD_NUMBER

public static final int NONCE_FIELD_NUMBER
Field Value
TypeDescription
int

TOKEN_TYPE_FIELD_NUMBER

public static final int TOKEN_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static TokenOptions getDefaultInstance()
Returns
TypeDescription
TokenOptions

getDescriptor()

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

newBuilder()

public static TokenOptions.Builder newBuilder()
Returns
TypeDescription
TokenOptions.Builder

newBuilder(TokenOptions prototype)

public static TokenOptions.Builder newBuilder(TokenOptions prototype)
Parameter
NameDescription
prototypeTokenOptions
Returns
TypeDescription
TokenOptions.Builder

parseDelimitedFrom(InputStream input)

public static TokenOptions parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
TokenOptions
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TokenOptions parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TokenOptions
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static TokenOptions parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
TokenOptions
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static TokenOptions parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TokenOptions
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static TokenOptions parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
TokenOptions
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static TokenOptions parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TokenOptions
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static TokenOptions parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
TokenOptions
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static TokenOptions parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TokenOptions
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static TokenOptions parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
TokenOptions
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TokenOptions parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TokenOptions
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static TokenOptions parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
TokenOptions
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static TokenOptions parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TokenOptions
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<TokenOptions> parser()
Returns
TypeDescription
Parser<TokenOptions>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
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
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

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.

getParserForType()

public Parser<TokenOptions> getParserForType()
Returns
TypeDescription
Parser<TokenOptions>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public TokenOptions.Builder newBuilderForType()
Returns
TypeDescription
TokenOptions.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected TokenOptions.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
TokenOptions.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public TokenOptions.Builder toBuilder()
Returns
TypeDescription
TokenOptions.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException