Class TokenOptions.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<TokenOptions.Builder>
com.google.cloud.confidentialcomputing.v1.TokenOptions.Builder
All Implemented Interfaces:
TokenOptionsOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
TokenOptions

public static final class TokenOptions.Builder extends com.google.protobuf.GeneratedMessage.Builder<TokenOptions.Builder> implements TokenOptionsOrBuilder
 Options to modify claims in the token to generate custom-purpose tokens.
 
Protobuf type google.cloud.confidentialcomputing.v1.TokenOptions
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<TokenOptions.Builder>
    • clear

      public TokenOptions.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<TokenOptions.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<TokenOptions.Builder>
    • getDefaultInstanceForType

      public TokenOptions getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public TokenOptions build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public TokenOptions buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public TokenOptions.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TokenOptions.Builder>
    • mergeFrom

      public TokenOptions.Builder mergeFrom(TokenOptions other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<TokenOptions.Builder>
    • mergeFrom

      public TokenOptions.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TokenOptions.Builder>
      Throws:
      IOException
    • getTokenTypeOptionsCase

      public TokenOptions.TokenTypeOptionsCase getTokenTypeOptionsCase()
      Specified by:
      getTokenTypeOptionsCase in interface TokenOptionsOrBuilder
    • clearTokenTypeOptions

      public TokenOptions.Builder clearTokenTypeOptions()
    • hasAwsPrincipalTagsOptions

      public boolean hasAwsPrincipalTagsOptions()
       Optional. Options for AWS token type.
       
      .google.cloud.confidentialcomputing.v1.AwsPrincipalTagsOptions aws_principal_tags_options = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasAwsPrincipalTagsOptions in interface TokenOptionsOrBuilder
      Returns:
      Whether the awsPrincipalTagsOptions field is set.
    • getAwsPrincipalTagsOptions

      public AwsPrincipalTagsOptions getAwsPrincipalTagsOptions()
       Optional. Options for AWS token type.
       
      .google.cloud.confidentialcomputing.v1.AwsPrincipalTagsOptions aws_principal_tags_options = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAwsPrincipalTagsOptions in interface TokenOptionsOrBuilder
      Returns:
      The awsPrincipalTagsOptions.
    • setAwsPrincipalTagsOptions

      public TokenOptions.Builder setAwsPrincipalTagsOptions(AwsPrincipalTagsOptions value)
       Optional. Options for AWS token type.
       
      .google.cloud.confidentialcomputing.v1.AwsPrincipalTagsOptions aws_principal_tags_options = 4 [(.google.api.field_behavior) = OPTIONAL];
    • setAwsPrincipalTagsOptions

      public TokenOptions.Builder setAwsPrincipalTagsOptions(AwsPrincipalTagsOptions.Builder builderForValue)
       Optional. Options for AWS token type.
       
      .google.cloud.confidentialcomputing.v1.AwsPrincipalTagsOptions aws_principal_tags_options = 4 [(.google.api.field_behavior) = OPTIONAL];
    • mergeAwsPrincipalTagsOptions

      public TokenOptions.Builder mergeAwsPrincipalTagsOptions(AwsPrincipalTagsOptions value)
       Optional. Options for AWS token type.
       
      .google.cloud.confidentialcomputing.v1.AwsPrincipalTagsOptions aws_principal_tags_options = 4 [(.google.api.field_behavior) = OPTIONAL];
    • clearAwsPrincipalTagsOptions

      public TokenOptions.Builder clearAwsPrincipalTagsOptions()
       Optional. Options for AWS token type.
       
      .google.cloud.confidentialcomputing.v1.AwsPrincipalTagsOptions aws_principal_tags_options = 4 [(.google.api.field_behavior) = OPTIONAL];
    • getAwsPrincipalTagsOptionsBuilder

      public AwsPrincipalTagsOptions.Builder getAwsPrincipalTagsOptionsBuilder()
       Optional. Options for AWS token type.
       
      .google.cloud.confidentialcomputing.v1.AwsPrincipalTagsOptions aws_principal_tags_options = 4 [(.google.api.field_behavior) = OPTIONAL];
    • getAwsPrincipalTagsOptionsOrBuilder

      public AwsPrincipalTagsOptionsOrBuilder getAwsPrincipalTagsOptionsOrBuilder()
       Optional. Options for AWS token type.
       
      .google.cloud.confidentialcomputing.v1.AwsPrincipalTagsOptions aws_principal_tags_options = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAwsPrincipalTagsOptionsOrBuilder in interface TokenOptionsOrBuilder
    • 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];
      Specified by:
      getAudience in interface TokenOptionsOrBuilder
      Returns:
      The audience.
    • getAudienceBytes

      public com.google.protobuf.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];
      Specified by:
      getAudienceBytes in interface TokenOptionsOrBuilder
      Returns:
      The bytes for audience.
    • setAudience

      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];
      Parameters:
      value - The audience to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setAudienceBytes

      public TokenOptions.Builder setAudienceBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes for audience to set.
      Returns:
      This builder for chaining.
    • getNonceList

      public com.google.protobuf.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];
      Specified by:
      getNonceList in interface TokenOptionsOrBuilder
      Returns:
      A list containing the nonce.
    • 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];
      Specified by:
      getNonceCount in interface TokenOptionsOrBuilder
      Returns:
      The count of nonce.
    • getNonce

      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];
      Specified by:
      getNonce in interface TokenOptionsOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The nonce at the given index.
    • getNonceBytes

      public com.google.protobuf.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];
      Specified by:
      getNonceBytes in interface TokenOptionsOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the nonce at the given index.
    • setNonce

      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:
      index - The index to set the value at.
      value - The nonce to set.
      Returns:
      This builder for chaining.
    • addNonce

      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];
      Parameters:
      value - The nonce to add.
      Returns:
      This builder for chaining.
    • addAllNonce

      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];
      Parameters:
      values - The nonce to add.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • addNonceBytes

      public TokenOptions.Builder addNonceBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes of the nonce to add.
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      getTokenTypeValue in interface TokenOptionsOrBuilder
      Returns:
      The enum numeric value on the wire for tokenType.
    • setTokenTypeValue

      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];
      Parameters:
      value - The enum numeric value on the wire for tokenType to set.
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      getTokenType in interface TokenOptionsOrBuilder
      Returns:
      The tokenType.
    • setTokenType

      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];
      Parameters:
      value - The tokenType to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.