# Secret Manager v1beta2 API - Class SecretVersion (1.0.0-beta04)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [1.0.0-beta04 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.SecretVersion)
- [1.0.0-beta03](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/1.0.0-beta03/Google.Cloud.SecretManager.V1Beta2.SecretVersion)

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

Reference documentation and code samples for the Secret Manager v1beta2 API class SecretVersion.

A secret version resource in the Secret Manager API.

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[SecretVersion](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.SecretVersion), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[SecretVersion](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.SecretVersion), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[SecretVersion](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.SecretVersion), [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.SecretManager.V1Beta2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2)

## Assembly

Google.Cloud.SecretManager.V1Beta2.dll

## Constructors

### SecretVersion()

    public SecretVersion()

### SecretVersion(SecretVersion)

    public SecretVersion(SecretVersion other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.SecretVersion` |

## Properties

### ClientSpecifiedPayloadChecksum

    public bool ClientSpecifiedPayloadChecksum { get; set; }

Output only. True if payload checksum specified in
\[SecretPayload\]\[google.cloud.secretmanager.v1beta2.SecretPayload\] object
has been received by
\[SecretManagerService\]\[google.cloud.secretmanager.v1beta2.SecretManagerService\]
on
\[SecretManagerService.AddSecretVersion\]\[google.cloud.secretmanager.v1beta2.SecretManagerService.AddSecretVersion\].

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

### CreateTime

    public Timestamp CreateTime { get; set; }

Output only. The time at which the
\[SecretVersion\]\[google.cloud.secretmanager.v1beta2.SecretVersion\] was
created.

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

### CustomerManagedEncryption

    public CustomerManagedEncryptionStatus CustomerManagedEncryption { get; set; }

Output only. The customer-managed encryption status of the
\[SecretVersion\]\[google.cloud.secretmanager.v1beta2.SecretVersion\]. Only
populated if customer-managed encryption is used and
\[Secret\]\[google.cloud.secretmanager.v1beta2.Secret\] is a Regionalised
Secret.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.CustomerManagedEncryptionStatus` |   |

### DestroyTime

    public Timestamp DestroyTime { get; set; }

Output only. The time this
\[SecretVersion\]\[google.cloud.secretmanager.v1beta2.SecretVersion\] was
destroyed. Only present if
\[state\]\[google.cloud.secretmanager.v1beta2.SecretVersion.state\] is
\[DESTROYED\]\[google.cloud.secretmanager.v1beta2.SecretVersion.State.DESTROYED\].

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

### Etag

    public string Etag { get; set; }

Output only. Etag of the currently stored
\[SecretVersion\]\[google.cloud.secretmanager.v1beta2.SecretVersion\].

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

### Name

    public string Name { get; set; }

Output only. The resource name of the
\[SecretVersion\]\[google.cloud.secretmanager.v1beta2.SecretVersion\] in the
format `projects/*/secrets/*/versions/*`.

\[SecretVersion\]\[google.cloud.secretmanager.v1beta2.SecretVersion\] IDs in a
\[Secret\]\[google.cloud.secretmanager.v1beta2.Secret\] start at 1 and are
incremented for each subsequent version of the secret.

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

### ReplicationStatus

    public ReplicationStatus ReplicationStatus { get; set; }

The replication status of the
\[SecretVersion\]\[google.cloud.secretmanager.v1beta2.SecretVersion\].

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.ReplicationStatus` |   |

### ScheduledDestroyTime

    public Timestamp ScheduledDestroyTime { get; set; }

Optional. Output only. Scheduled destroy time for secret version.
This is a part of the Delayed secret version destroy feature. For a
Secret with a valid version destroy TTL, when a secert version is
destroyed, version is moved to disabled state and it is scheduled for
destruction Version is destroyed only after the scheduled_destroy_time.

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

### SecretVersionName

    public SecretVersionName SecretVersionName { get; set; }

[SecretVersionName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.SecretVersionName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.SecretVersion#Google_Cloud_SecretManager_V1Beta2_SecretVersion_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.SecretVersionName` |   |

### State

    public SecretVersion.Types.State State { get; set; }

Output only. The current state of the
\[SecretVersion\]\[google.cloud.secretmanager.v1beta2.SecretVersion\].

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.SecretVersionhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.SecretVersion.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.SecretVersion.Types.State` |   |