# Google Certificate Authority Service V1 Client - Class PublishingOptions (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 PublishingOptions.

Options relating to the publication of each
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)'s
CA certificate and CRLs and their inclusion as extensions in issued
[Certificates](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate). The options
set here apply to certificates issued by any
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
in the [CaPool](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CaPool).

Generated from protobuf message `google.cloud.security.privateca.v1.CaPool.PublishingOptions`

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ publish_ca_cert` | `bool` Optional. When true, publishes each [CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)'s CA certificate and includes its URL in the "Authority Information Access" X.509 extension in all issued [Certificates](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate). If this is false, the CA certificate will not be published and the corresponding X.509 extension will not be written in issued certificates. |
| `↳ publish_crl` | `bool` Optional. When true, publishes each [CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)'s CRL and includes its URL in the "CRL Distribution Points" X.509 extension in all issued [Certificates](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate). If this is false, CRLs will not be published and the corresponding X.509 extension will not be written in issued certificates. CRLs will expire 7 days from their creation. However, we will rebuild daily. CRLs are also rebuilt shortly after a certificate is revoked. |
| `↳ encoding_format` | `int` Optional. Specifies the encoding format of each [CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority) resource's CA certificate and CRLs. If this is omitted, CA certificates and CRLs will be published in PEM. |

### getPublishCaCert

Optional. When true, publishes each
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)'s
CA certificate and includes its URL in the "Authority Information Access"
X.509 extension in all issued
[Certificates](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate). If this
is false, the CA certificate will not be published and the corresponding
X.509 extension will not be written in issued certificates.

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

### setPublishCaCert

Optional. When true, publishes each
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)'s
CA certificate and includes its URL in the "Authority Information Access"
X.509 extension in all issued
[Certificates](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate). If this
is false, the CA certificate will not be published and the corresponding
X.509 extension will not be written in issued certificates.

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

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

### getPublishCrl

Optional. When true, publishes each
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)'s
CRL and includes its URL in the "CRL Distribution Points" X.509 extension
in all issued
[Certificates](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate). If this
is false, CRLs will not be published and the corresponding X.509
extension will not be written in issued certificates. CRLs will expire 7
days from their creation. However, we will rebuild daily. CRLs are also
rebuilt shortly after a certificate is revoked.

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

### setPublishCrl

Optional. When true, publishes each
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)'s
CRL and includes its URL in the "CRL Distribution Points" X.509 extension
in all issued
[Certificates](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate). If this
is false, CRLs will not be published and the corresponding X.509
extension will not be written in issued certificates. CRLs will expire 7
days from their creation. However, we will rebuild daily. CRLs are also
rebuilt shortly after a certificate is revoked.

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

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

### getEncodingFormat

Optional. Specifies the encoding format of each
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
resource's CA certificate and CRLs. If this is omitted, CA certificates
and CRLs will be published in PEM.

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

### setEncodingFormat

Optional. Specifies the encoding format of each
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
resource's CA certificate and CRLs. If this is omitted, CA certificates
and CRLs will be published in PEM.

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

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