# Secret Manager v1 API - Class SecretVersion (2.7.0)

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

- [2.7.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.6.0/Google.Cloud.SecretManager.V1.SecretVersion)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.5.0/Google.Cloud.SecretManager.V1.SecretVersion)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.4.0/Google.Cloud.SecretManager.V1.SecretVersion)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.3.0/Google.Cloud.SecretManager.V1.SecretVersion)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.2.0/Google.Cloud.SecretManager.V1.SecretVersion)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.1.0/Google.Cloud.SecretManager.V1.SecretVersion)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.0.0/Google.Cloud.SecretManager.V1.SecretVersion)
- [1.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.9.0/Google.Cloud.SecretManager.V1.SecretVersion)
- [1.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.8.0/Google.Cloud.SecretManager.V1.SecretVersion)
- [1.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.7.0/Google.Cloud.SecretManager.V1.SecretVersion)
- [1.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.6.0/Google.Cloud.SecretManager.V1.SecretVersion)
- [1.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.5.0/Google.Cloud.SecretManager.V1.SecretVersion)
- [1.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.4.0/Google.Cloud.SecretManager.V1.SecretVersion)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.3.0/Google.Cloud.SecretManager.V1.SecretVersion)

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

Reference documentation and code samples for the Secret Manager v1 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.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[SecretVersion](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.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.V1/latest/Google.Cloud.SecretManager.V1.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.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1)

## Assembly

Google.Cloud.SecretManager.V1.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.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion` |

## Properties

### ClientSpecifiedPayloadChecksum

    public bool ClientSpecifiedPayloadChecksum { get; set; }

Output only. True if payload checksum specified in
\[SecretPayload\]\[google.cloud.secretmanager.v1.SecretPayload\] object has
been received by
\[SecretManagerService\]\[google.cloud.secretmanager.v1.SecretManagerService\]
on
\[SecretManagerService.AddSecretVersion\]\[google.cloud.secretmanager.v1.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.v1.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.v1.SecretVersion\]. Only
populated if customer-managed encryption is used and
\[Secret\]\[google.cloud.secretmanager.v1.Secret\] is a regionalized secret.

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

### DestroyTime

    public Timestamp DestroyTime { get; set; }

Output only. The time this
\[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] was destroyed.
Only present if \[state\]\[google.cloud.secretmanager.v1.SecretVersion.state\]
is
\[DESTROYED\]\[google.cloud.secretmanager.v1.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.v1.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.v1.SecretVersion\] in the format
`projects/*/secrets/*/versions/*`.

\[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\] IDs in a
\[Secret\]\[google.cloud.secretmanager.v1.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.v1.SecretVersion\].

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.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.V1/latest/Google.Cloud.SecretManager.V1.SecretVersionName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.SecretVersion#Google_Cloud_SecretManager_V1_SecretVersion_Name) resource name property.

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

### State

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

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

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