Class CreateCryptoKeyRequest

  • All Implemented Interfaces:
    CreateCryptoKeyRequestOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class CreateCryptoKeyRequest
    extends com.google.protobuf.GeneratedMessageV3
    implements CreateCryptoKeyRequestOrBuilder
     Request message for
     [KeyManagementService.CreateCryptoKey][google.cloud.kms.v1.KeyManagementService.CreateCryptoKey].
     
    Protobuf type google.cloud.kms.v1.CreateCryptoKeyRequest
    See Also:
    Serialized Form
    • Field Detail

      • CRYPTO_KEY_ID_FIELD_NUMBER

        public static final int CRYPTO_KEY_ID_FIELD_NUMBER
        See Also:
        Constant Field Values
      • CRYPTO_KEY_FIELD_NUMBER

        public static final int CRYPTO_KEY_FIELD_NUMBER
        See Also:
        Constant Field Values
      • SKIP_INITIAL_VERSION_CREATION_FIELD_NUMBER

        public static final int SKIP_INITIAL_VERSION_CREATION_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • 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
      • getParent

        public String getParent()
         Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing
         associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey].
         
        string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
        Specified by:
        getParent in interface CreateCryptoKeyRequestOrBuilder
        Returns:
        The parent.
      • getParentBytes

        public com.google.protobuf.ByteString getParentBytes()
         Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing
         associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey].
         
        string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
        Specified by:
        getParentBytes in interface CreateCryptoKeyRequestOrBuilder
        Returns:
        The bytes for parent.
      • getCryptoKeyId

        public String getCryptoKeyId()
         Required. It must be unique within a KeyRing and match the regular
         expression `[a-zA-Z0-9_-]{1,63}`
         
        string crypto_key_id = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getCryptoKeyId in interface CreateCryptoKeyRequestOrBuilder
        Returns:
        The cryptoKeyId.
      • getCryptoKeyIdBytes

        public com.google.protobuf.ByteString getCryptoKeyIdBytes()
         Required. It must be unique within a KeyRing and match the regular
         expression `[a-zA-Z0-9_-]{1,63}`
         
        string crypto_key_id = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getCryptoKeyIdBytes in interface CreateCryptoKeyRequestOrBuilder
        Returns:
        The bytes for cryptoKeyId.
      • hasCryptoKey

        public boolean hasCryptoKey()
         Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field
         values.
         
        .google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        hasCryptoKey in interface CreateCryptoKeyRequestOrBuilder
        Returns:
        Whether the cryptoKey field is set.
      • getCryptoKey

        public CryptoKey getCryptoKey()
         Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field
         values.
         
        .google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getCryptoKey in interface CreateCryptoKeyRequestOrBuilder
        Returns:
        The cryptoKey.
      • getSkipInitialVersionCreation

        public boolean getSkipInitialVersionCreation()
         If set to true, the request will create a
         [CryptoKey][google.cloud.kms.v1.CryptoKey] without any
         [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must
         manually call
         [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
         or
         [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion]
         before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey].
         
        bool skip_initial_version_creation = 5;
        Specified by:
        getSkipInitialVersionCreation in interface CreateCryptoKeyRequestOrBuilder
        Returns:
        The skipInitialVersionCreation.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static CreateCryptoKeyRequest parseFrom​(ByteBuffer data)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CreateCryptoKeyRequest parseFrom​(ByteBuffer data,
                                                       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CreateCryptoKeyRequest parseFrom​(com.google.protobuf.ByteString data)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CreateCryptoKeyRequest parseFrom​(com.google.protobuf.ByteString data,
                                                       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CreateCryptoKeyRequest parseFrom​(byte[] data)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CreateCryptoKeyRequest parseFrom​(byte[] data,
                                                       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • newBuilderForType

        public CreateCryptoKeyRequest.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public CreateCryptoKeyRequest.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected CreateCryptoKeyRequest.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<CreateCryptoKeyRequest> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public CreateCryptoKeyRequest getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder