# Certificate Authority v1 API - Class Certificate (3.12.0)

3.12.0 (latest) 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.3.0 2.2.0 2.1.0 2.0.0 1.0.0

    public sealed class Certificate : IMessage<Certificate>, IEquatable<Certificate>, IDeepCloneable<Certificate>, IBufferMessage, IMessage

Reference documentation and code samples for the Certificate Authority v1 API class Certificate.

A \[Certificate\]\[google.cloud.security.privateca.v1.Certificate\] corresponds
to a signed X.509 certificate issued by a
\[CertificateAuthority\]\[google.cloud.security.privateca.v1.CertificateAuthority\].

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> Certificate

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Certificate](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.Certificate), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Certificate](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.Certificate), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Certificate](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.Certificate), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Security.PrivateCA.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1)

## Assembly

Google.Cloud.Security.PrivateCA.V1.dll

## Constructors

### Certificate()

    public Certificate()

### Certificate(Certificate)

    public Certificate(Certificate other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.Certificate` |

## Properties

### CertificateConfigCase

    public Certificate.CertificateConfigOneofCase CertificateConfigCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.Certificatehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.Certificate.CertificateConfigOneofCase` |   |

### CertificateDescription

    public CertificateDescription CertificateDescription { get; set; }

Output only. A structured description of the issued X.509 certificate.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateDescription` |   |

### CertificateName

    public CertificateName CertificateName { get; set; }

[CertificateName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.Certificate#Google_Cloud_Security_PrivateCA_V1_Certificate_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateName` |   |

### CertificateTemplate

    public string CertificateTemplate { get; set; }

Immutable. The resource name for a
\[CertificateTemplate\]\[google.cloud.security.privateca.v1.CertificateTemplate\]
used to issue this certificate, in the format
`projects/*/locations/*/certificateTemplates/*`.
If this is specified, the caller must have the necessary permission to
use this template. If this is omitted, no template will be used.
This template must be in the same location as the
\[Certificate\]\[google.cloud.security.privateca.v1.Certificate\].

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### CertificateTemplateAsCertificateTemplateName

    public CertificateTemplateName CertificateTemplateAsCertificateTemplateName { get; set; }

[CertificateTemplateName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateTemplateName)-typed view over the [CertificateTemplate](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.Certificate#Google_Cloud_Security_PrivateCA_V1_Certificate_CertificateTemplate) resource name
property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateTemplateName` |   |

### Config

    public CertificateConfig Config { get; set; }

Immutable. A description of the certificate and key that does not require
X.509 or ASN.1.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateConfig` |   |

### CreateTime

    public Timestamp CreateTime { get; set; }

Output only. The time at which this
\[Certificate\]\[google.cloud.security.privateca.v1.Certificate\] was created.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### HasPemCsr

    public bool HasPemCsr { get; }

Gets whether the "pem_csr" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### IssuerCertificateAuthority

    public string IssuerCertificateAuthority { get; set; }

Output only. The resource name of the issuing
\[CertificateAuthority\]\[google.cloud.security.privateca.v1.CertificateAuthority\]
in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### IssuerCertificateAuthorityAsCertificateAuthorityName

    public CertificateAuthorityName IssuerCertificateAuthorityAsCertificateAuthorityName { get; set; }

[CertificateAuthorityName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateAuthorityName)-typed view over the [IssuerCertificateAuthority](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.Certificate#Google_Cloud_Security_PrivateCA_V1_Certificate_IssuerCertificateAuthority) resource
name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateAuthorityName` |   |

### Labels

    public MapField<string, string> Labels { get; }

Optional. Labels with user-defined metadata.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.MapField-2.htmlhttps://learn.microsoft.com/dotnet/api/system.stringhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### Lifetime

    public Duration Lifetime { get; set; }

Required. Immutable. The desired lifetime of a certificate. Used to create
the "not_before_time" and "not_after_time" fields inside an X.509
certificate. Note that the lifetime may be truncated if it would extend
past the life of any certificate authority in the issuing chain.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Duration.html` |   |

### Name

    public string Name { get; set; }

Identifier. The resource name for this
\[Certificate\]\[google.cloud.security.privateca.v1.Certificate\] in the format
`projects/*/locations/*/caPools/*/certificates/*`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### PemCertificate

    public string PemCertificate { get; set; }

Output only. The pem-encoded, signed X.509 certificate.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### PemCertificateChain

    public RepeatedField<string> PemCertificateChain { get; }

Output only. The chain that may be used to verify the X.509 certificate.
Expected to be in issuer-to-root order according to RFC 5246.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### PemCsr

    public string PemCsr { get; set; }

Immutable. A pem-encoded X.509 certificate signing request (CSR).

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### RequestedNotBeforeTime

    public Timestamp RequestedNotBeforeTime { get; set; }

Optional. The requested
\[not_before_time\]\[google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription.not_before_time\]
of this \[Certificate\]\[google.cloud.security.privateca.v1.Certificate\]. This
field may only be set if the
\[CaPool.IssuancePolicy.allow_requester_specified_not_before_time\]\[google.cloud.security.privateca.v1.CaPool.IssuancePolicy.allow_requester_specified_not_before_time\]
field is set to true for the issuing
\[CaPool\]\[google.cloud.security.privateca.v1.CaPool\].

If this field is specified, the certificate will be issued with this
'not_before_time'. If this is not specified, the 'not_before_time' will be
set to the issuance time or issuance time minus
\[backdate_duration\]\[google.cloud.security.privateca.v1.CaPool.IssuancePolicy.backdate_duration\]
depending on the \[CaPool\]\[google.cloud.security.privateca.v1.CaPool\]
configuration.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### RevocationDetails

    public Certificate.Types.RevocationDetails RevocationDetails { get; set; }

Output only. Details regarding the revocation of this
\[Certificate\]\[google.cloud.security.privateca.v1.Certificate\]. This
\[Certificate\]\[google.cloud.security.privateca.v1.Certificate\] is considered
revoked if and only if this field is present.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.Certificatehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.Certificate.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.Certificate.Types.RevocationDetails` |   |

### SubjectMode

    public SubjectRequestMode SubjectMode { get; set; }

Immutable. Specifies how the
\[Certificate\]\[google.cloud.security.privateca.v1.Certificate\]'s identity
fields are to be decided. If this is omitted, the `DEFAULT` subject mode
will be used.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.SubjectRequestMode` |   |

### UpdateTime

    public Timestamp UpdateTime { get; set; }

Output only. The time at which this
\[Certificate\]\[google.cloud.security.privateca.v1.Certificate\] was updated.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |