# Certificate Authority Service V1beta1 API - Class Google::Cloud::Security::PrivateCA::V1beta1::PublicKey (v0.18.0)

0.18.0 (latest) 0.17.1 0.16.0 0.15.1 0.14.0 0.13.0 0.12.1 0.11.0 0.10.0 0.9.1 0.8.2 0.7.0 0.6.1 0.5.0 0.4.0 0.3.6 Reference documentation and code samples for the Certificate Authority Service V1beta1 API class Google::Cloud::Security::PrivateCA::V1beta1::PublicKey.

A [PublicKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1beta1/latest/Google-Cloud-Security-PrivateCA-V1beta1-PublicKey "Google::Cloud::Security::PrivateCA::V1beta1::PublicKey (class)") describes a public key.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #key

    def key() -> ::String

**Returns**

- (::String) --- Required. A public key. Padding and encoding varies by 'KeyType' and is described along with the KeyType values.

### #key=

    def key=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. A public key. Padding and encoding varies by 'KeyType' and is described along with the KeyType values.
**Returns**

- (::String) --- Required. A public key. Padding and encoding varies by 'KeyType' and is described along with the KeyType values.

### #type

    def type() -> ::Google::Cloud::Security::PrivateCA::V1beta1::PublicKey::KeyType

**Returns**

- ([::Google::Cloud::Security::PrivateCA::V1beta1::PublicKey::KeyType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1beta1/latest/Google-Cloud-Security-PrivateCA-V1beta1-PublicKey-KeyType)) --- Required. The type of public key.

### #type=

    def type=(value) -> ::Google::Cloud::Security::PrivateCA::V1beta1::PublicKey::KeyType

**Parameter**

- **value** ([::Google::Cloud::Security::PrivateCA::V1beta1::PublicKey::KeyType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1beta1/latest/Google-Cloud-Security-PrivateCA-V1beta1-PublicKey-KeyType)) --- Required. The type of public key.
**Returns**

- ([::Google::Cloud::Security::PrivateCA::V1beta1::PublicKey::KeyType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1beta1/latest/Google-Cloud-Security-PrivateCA-V1beta1-PublicKey-KeyType)) --- Required. The type of public key.