# Google Certificate Authority Service V1 Client - Class CertificateAuthority (2.4.0)

2.4.0 (latest) 2.3.0 2.2.2 2.1.1 2.0.3 1.7.3 1.5.0 1.4.2 1.3.1 1.2.2 1.1.0 1.0.3 Reference documentation and code samples for the Google Certificate Authority Service V1 Client class CertificateAuthority.

A
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
represents an individual Certificate Authority. A
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
can be used to create
[Certificates](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate).

Generated from protobuf message `google.cloud.security.privateca.v1.CertificateAuthority`

## Namespace

Google \\ Cloud \\ Security \\ PrivateCA \\ V1

## Methods

### __construct

Constructor.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `data` | `mixed` |

### getName

Identifier. The resource name for this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

Identifier. The resource name for this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getType

Required. Immutable. The
[Type](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority.Type) of
this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority.Type). |

### setType

Required. Immutable. The
[Type](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority.Type) of
this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority.Type). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getConfig

Required. Immutable. The config used to create a self-signed X.509
certificate or CSR.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateConfig|null` |   |

### hasConfig

### clearConfig

### setConfig

Required. Immutable. The config used to create a self-signed X.509
certificate or CSR.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateConfig` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLifetime

Required. Immutable. The desired lifetime of the CA certificate. Used to
create the "not_before_time" and "not_after_time" fields inside an X.509
certificate.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration|null` |   |

### hasLifetime

### clearLifetime

### setLifetime

Required. Immutable. The desired lifetime of the CA certificate. Used to
create the "not_before_time" and "not_after_time" fields inside an X.509
certificate.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getKeySpec

Required. Immutable. Used when issuing certificates for this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority).

If this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
is a self-signed CertificateAuthority, this key is also used to sign the
self-signed CA certificate. Otherwise, it is used to sign a CSR.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority.KeyVersionSpec|null` |   |

### hasKeySpec

### clearKeySpec

### setKeySpec

Required. Immutable. Used when issuing certificates for this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority).

If this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
is a self-signed CertificateAuthority, this key is also used to sign the
self-signed CA certificate. Otherwise, it is used to sign a CSR.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority.KeyVersionSpec` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSubordinateConfig

Optional. If this is a subordinate
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority),
this field will be set with the subordinate configuration, which describes
its issuers. This may be updated, but this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
must continue to validate.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `SubordinateConfig|null` |   |

### hasSubordinateConfig

### clearSubordinateConfig

### setSubordinateConfig

Optional. If this is a subordinate
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority),
this field will be set with the subordinate configuration, which describes
its issuers. This may be updated, but this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
must continue to validate.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `SubordinateConfig` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTier

Output only. The
[CaPool.Tier](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CaPool.Tier) of the
[CaPool](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CaPool) that includes this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Tier](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CaPool.Tier). |

### setTier

Output only. The
[CaPool.Tier](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CaPool.Tier) of the
[CaPool](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CaPool) that includes this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Tier](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CaPool.Tier). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getState

Output only. The
[State](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority.State) for
this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority.State). |

### setState

Output only. The
[State](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority.State) for
this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority.State). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPemCaCertificates

Output only. This
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)'s
certificate chain, including the current
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)'s
certificate. Ordered such that the root issuer is the final element
(consistent with RFC 5246). For a self-signed CA, this will only list the
current
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)'s
certificate.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setPemCaCertificates

Output only. This
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)'s
certificate chain, including the current
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)'s
certificate. Ordered such that the root issuer is the final element
(consistent with RFC 5246). For a self-signed CA, this will only list the
current
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)'s
certificate.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCaCertificateDescriptions

Output only. A structured description of this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)'s
CA certificate and its issuers. Ordered as self-to-root.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateDescription>` |   |

### setCaCertificateDescriptions

Output only. A structured description of this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)'s
CA certificate and its issuers. Ordered as self-to-root.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateDescription>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getGcsBucket

Immutable. The name of a Cloud Storage bucket where this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
will publish content, such as the CA certificate and CRLs. This must be a
bucket name, without any prefixes (such as `gs://`) or suffixes (such as
`.googleapis.com`). For example, to use a bucket named `my-bucket`, you
would simply specify `my-bucket`. If not specified, a managed bucket will
be created.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setGcsBucket

Immutable. The name of a Cloud Storage bucket where this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
will publish content, such as the CA certificate and CRLs. This must be a
bucket name, without any prefixes (such as `gs://`) or suffixes (such as
`.googleapis.com`). For example, to use a bucket named `my-bucket`, you
would simply specify `my-bucket`. If not specified, a managed bucket will
be created.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAccessUrls

Output only. URLs for accessing content published by this CA, such as the
CA certificate and CRLs.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority.AccessUrls|null` |   |

### hasAccessUrls

### clearAccessUrls

### setAccessUrls

Output only. URLs for accessing content published by this CA, such as the
CA certificate and CRLs.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority.AccessUrls` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCreateTime

Output only. The time at which this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
was created.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The time at which this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
was created.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUpdateTime

Output only. The time at which this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
was last updated.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The time at which this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
was last updated.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDeleteTime

Output only. The time at which this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
was soft deleted, if it is in the
[DELETED](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority.State#_Google_Cloud_Security_PrivateCA_V1_CertificateAuthority_State__DELETED)
state.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasDeleteTime

### clearDeleteTime

### setDeleteTime

Output only. The time at which this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
was soft deleted, if it is in the
[DELETED](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority.State#_Google_Cloud_Security_PrivateCA_V1_CertificateAuthority_State__DELETED)
state.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getExpireTime

Output only. The time at which this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
will be permanently purged, if it is in the
[DELETED](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority.State#_Google_Cloud_Security_PrivateCA_V1_CertificateAuthority_State__DELETED)
state.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasExpireTime

### clearExpireTime

### setExpireTime

Output only. The time at which this
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
will be permanently purged, if it is in the
[DELETED](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority.State#_Google_Cloud_Security_PrivateCA_V1_CertificateAuthority_State__DELETED)
state.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLabels

Optional. Labels with user-defined metadata.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setLabels

Optional. Labels with user-defined metadata.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUserDefinedAccessUrls

Optional. User-defined URLs for CA certificate and CRLs. The service does
not publish content to these URLs. It is up to the user to mirror content
to these URLs.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority.UserDefinedAccessUrls|null` |   |

### hasUserDefinedAccessUrls

### clearUserDefinedAccessUrls

### setUserDefinedAccessUrls

Optional. User-defined URLs for CA certificate and CRLs. The service does
not publish content to these URLs. It is up to the user to mirror content
to these URLs.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority.UserDefinedAccessUrls` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSatisfiesPzs

Output only. Reserved for future use.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setSatisfiesPzs

Output only. Reserved for future use.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSatisfiesPzi

Output only. Reserved for future use.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setSatisfiesPzi

Output only. Reserved for future use.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |