# Secret Manager v1 API - Class SecretPayload (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.SecretPayload)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.6.0/Google.Cloud.SecretManager.V1.SecretPayload)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.5.0/Google.Cloud.SecretManager.V1.SecretPayload)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.4.0/Google.Cloud.SecretManager.V1.SecretPayload)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.3.0/Google.Cloud.SecretManager.V1.SecretPayload)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.2.0/Google.Cloud.SecretManager.V1.SecretPayload)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.1.0/Google.Cloud.SecretManager.V1.SecretPayload)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.0.0/Google.Cloud.SecretManager.V1.SecretPayload)
- [1.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.9.0/Google.Cloud.SecretManager.V1.SecretPayload)
- [1.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.8.0/Google.Cloud.SecretManager.V1.SecretPayload)
- [1.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.7.0/Google.Cloud.SecretManager.V1.SecretPayload)
- [1.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.6.0/Google.Cloud.SecretManager.V1.SecretPayload)
- [1.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.5.0/Google.Cloud.SecretManager.V1.SecretPayload)
- [1.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.4.0/Google.Cloud.SecretManager.V1.SecretPayload)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.3.0/Google.Cloud.SecretManager.V1.SecretPayload)

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

Reference documentation and code samples for the Secret Manager v1 API class SecretPayload.

A secret payload resource in the Secret Manager API. This contains the
sensitive secret payload that is associated with a
\[SecretVersion\]\[google.cloud.secretmanager.v1.SecretVersion\].

## Inheritance

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

## Implements

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

### SecretPayload()

    public SecretPayload()

### SecretPayload(SecretPayload)

    public SecretPayload(SecretPayload other)

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

## Properties

### Data

    public ByteString Data { get; set; }

The secret data. Must be no larger than 64KiB.

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

### DataCrc32C

    public long DataCrc32C { get; set; }

Optional. If specified,
\[SecretManagerService\]\[google.cloud.secretmanager.v1.SecretManagerService\]
will verify the integrity of the received
\[data\]\[google.cloud.secretmanager.v1.SecretPayload.data\] on
\[SecretManagerService.AddSecretVersion\]\[google.cloud.secretmanager.v1.SecretManagerService.AddSecretVersion\]
calls using the crc32c checksum and store it to include in future
\[SecretManagerService.AccessSecretVersion\]\[google.cloud.secretmanager.v1.SecretManagerService.AccessSecretVersion\]
responses. If a checksum is not provided in the
\[SecretManagerService.AddSecretVersion\]\[google.cloud.secretmanager.v1.SecretManagerService.AddSecretVersion\]
request, the
\[SecretManagerService\]\[google.cloud.secretmanager.v1.SecretManagerService\]
will generate and store one for you.

The CRC32C value is encoded as a Int64 for compatibility, and can be
safely downconverted to uint32 in languages that support this type.
<https://cloud.google.com/apis/design/design_patterns#integer_types>

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

### HasDataCrc32C

    public bool HasDataCrc32C { get; }

Gets whether the "data_crc32c" field is set

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