Class CreateKeyRequest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<CreateKeyRequest.Builder>
com.google.api.apikeys.v2.CreateKeyRequest.Builder
All Implemented Interfaces:
CreateKeyRequestOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
CreateKeyRequest

public static final class CreateKeyRequest.Builder extends com.google.protobuf.GeneratedMessage.Builder<CreateKeyRequest.Builder> implements CreateKeyRequestOrBuilder
 Request message for `CreateKey` method.
 
Protobuf type google.api.apikeys.v2.CreateKeyRequest
  • 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<CreateKeyRequest.Builder>
    • clear

      public CreateKeyRequest.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<CreateKeyRequest.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<CreateKeyRequest.Builder>
    • getDefaultInstanceForType

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

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

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

      public CreateKeyRequest.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<CreateKeyRequest.Builder>
    • mergeFrom

      public CreateKeyRequest.Builder mergeFrom(CreateKeyRequest other)
    • isInitialized

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

      public CreateKeyRequest.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<CreateKeyRequest.Builder>
      Throws:
      IOException
    • getParent

      public String getParent()
       Required. The project in which the API key is created.
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getParent in interface CreateKeyRequestOrBuilder
      Returns:
      The parent.
    • getParentBytes

      public com.google.protobuf.ByteString getParentBytes()
       Required. The project in which the API key is created.
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getParentBytes in interface CreateKeyRequestOrBuilder
      Returns:
      The bytes for parent.
    • setParent

      public CreateKeyRequest.Builder setParent(String value)
       Required. The project in which the API key is created.
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The parent to set.
      Returns:
      This builder for chaining.
    • clearParent

      public CreateKeyRequest.Builder clearParent()
       Required. The project in which the API key is created.
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setParentBytes

      public CreateKeyRequest.Builder setParentBytes(com.google.protobuf.ByteString value)
       Required. The project in which the API key is created.
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for parent to set.
      Returns:
      This builder for chaining.
    • hasKey

      public boolean hasKey()
       Required. The API key fields to set at creation time.
       You can configure only the `display_name`, `restrictions`, and
       `annotations` fields.
       
      .google.api.apikeys.v2.Key key = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasKey in interface CreateKeyRequestOrBuilder
      Returns:
      Whether the key field is set.
    • getKey

      public Key getKey()
       Required. The API key fields to set at creation time.
       You can configure only the `display_name`, `restrictions`, and
       `annotations` fields.
       
      .google.api.apikeys.v2.Key key = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getKey in interface CreateKeyRequestOrBuilder
      Returns:
      The key.
    • setKey

      public CreateKeyRequest.Builder setKey(Key value)
       Required. The API key fields to set at creation time.
       You can configure only the `display_name`, `restrictions`, and
       `annotations` fields.
       
      .google.api.apikeys.v2.Key key = 2 [(.google.api.field_behavior) = REQUIRED];
    • setKey

      public CreateKeyRequest.Builder setKey(Key.Builder builderForValue)
       Required. The API key fields to set at creation time.
       You can configure only the `display_name`, `restrictions`, and
       `annotations` fields.
       
      .google.api.apikeys.v2.Key key = 2 [(.google.api.field_behavior) = REQUIRED];
    • mergeKey

      public CreateKeyRequest.Builder mergeKey(Key value)
       Required. The API key fields to set at creation time.
       You can configure only the `display_name`, `restrictions`, and
       `annotations` fields.
       
      .google.api.apikeys.v2.Key key = 2 [(.google.api.field_behavior) = REQUIRED];
    • clearKey

      public CreateKeyRequest.Builder clearKey()
       Required. The API key fields to set at creation time.
       You can configure only the `display_name`, `restrictions`, and
       `annotations` fields.
       
      .google.api.apikeys.v2.Key key = 2 [(.google.api.field_behavior) = REQUIRED];
    • getKeyBuilder

      public Key.Builder getKeyBuilder()
       Required. The API key fields to set at creation time.
       You can configure only the `display_name`, `restrictions`, and
       `annotations` fields.
       
      .google.api.apikeys.v2.Key key = 2 [(.google.api.field_behavior) = REQUIRED];
    • getKeyOrBuilder

      public KeyOrBuilder getKeyOrBuilder()
       Required. The API key fields to set at creation time.
       You can configure only the `display_name`, `restrictions`, and
       `annotations` fields.
       
      .google.api.apikeys.v2.Key key = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getKeyOrBuilder in interface CreateKeyRequestOrBuilder
    • getKeyId

      public String getKeyId()
       User specified key id (optional). If specified, it will become the final
       component of the key resource name.
      
       The id must be unique within the project, must conform with RFC-1034,
       is restricted to lower-cased letters, and has a maximum length of 63
       characters. In another word, the id must match the regular
       expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
      
       The id must NOT be a UUID-like string.
       
      string key_id = 3;
      Specified by:
      getKeyId in interface CreateKeyRequestOrBuilder
      Returns:
      The keyId.
    • getKeyIdBytes

      public com.google.protobuf.ByteString getKeyIdBytes()
       User specified key id (optional). If specified, it will become the final
       component of the key resource name.
      
       The id must be unique within the project, must conform with RFC-1034,
       is restricted to lower-cased letters, and has a maximum length of 63
       characters. In another word, the id must match the regular
       expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
      
       The id must NOT be a UUID-like string.
       
      string key_id = 3;
      Specified by:
      getKeyIdBytes in interface CreateKeyRequestOrBuilder
      Returns:
      The bytes for keyId.
    • setKeyId

      public CreateKeyRequest.Builder setKeyId(String value)
       User specified key id (optional). If specified, it will become the final
       component of the key resource name.
      
       The id must be unique within the project, must conform with RFC-1034,
       is restricted to lower-cased letters, and has a maximum length of 63
       characters. In another word, the id must match the regular
       expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
      
       The id must NOT be a UUID-like string.
       
      string key_id = 3;
      Parameters:
      value - The keyId to set.
      Returns:
      This builder for chaining.
    • clearKeyId

      public CreateKeyRequest.Builder clearKeyId()
       User specified key id (optional). If specified, it will become the final
       component of the key resource name.
      
       The id must be unique within the project, must conform with RFC-1034,
       is restricted to lower-cased letters, and has a maximum length of 63
       characters. In another word, the id must match the regular
       expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
      
       The id must NOT be a UUID-like string.
       
      string key_id = 3;
      Returns:
      This builder for chaining.
    • setKeyIdBytes

      public CreateKeyRequest.Builder setKeyIdBytes(com.google.protobuf.ByteString value)
       User specified key id (optional). If specified, it will become the final
       component of the key resource name.
      
       The id must be unique within the project, must conform with RFC-1034,
       is restricted to lower-cased letters, and has a maximum length of 63
       characters. In another word, the id must match the regular
       expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
      
       The id must NOT be a UUID-like string.
       
      string key_id = 3;
      Parameters:
      value - The bytes for keyId to set.
      Returns:
      This builder for chaining.