Class 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.GeneratedMessageV3.Builder<CreateKeyRequest.Builder>
    implements CreateKeyRequestOrBuilder
     Request message for `CreateKey` method.
     
    Protobuf type google.api.apikeys.v2.CreateKeyRequest
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public CreateKeyRequest.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<CreateKeyRequest.Builder>
      • setField

        public CreateKeyRequest.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                 Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<CreateKeyRequest.Builder>
      • clearField

        public CreateKeyRequest.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<CreateKeyRequest.Builder>
      • clearOneof

        public CreateKeyRequest.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<CreateKeyRequest.Builder>
      • setRepeatedField

        public CreateKeyRequest.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                         int index,
                                                         Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<CreateKeyRequest.Builder>
      • addRepeatedField

        public CreateKeyRequest.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                         Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<CreateKeyRequest.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>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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.
      • setUnknownFields

        public final CreateKeyRequest.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<CreateKeyRequest.Builder>
      • mergeUnknownFields

        public final CreateKeyRequest.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<CreateKeyRequest.Builder>