# Secret Manager v1beta2 API - Class GetSecretRequest (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.GetSecretRequest)
- [1.0.0-beta03](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/1.0.0-beta03/Google.Cloud.SecretManager.V1Beta2.GetSecretRequest)

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

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

Request message for
\[SecretManagerService.GetSecret\]\[google.cloud.secretmanager.v1beta2.SecretManagerService.GetSecret\].

## Inheritance

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

## Implements

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

### GetSecretRequest()

    public GetSecretRequest()

### GetSecretRequest(GetSecretRequest)

    public GetSecretRequest(GetSecretRequest other)

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

## Properties

### Name

    public string Name { get; set; }

Required. The resource name of the
\[Secret\]\[google.cloud.secretmanager.v1beta2.Secret\], in the format
`projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.

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

### SecretName

    public SecretName SecretName { get; set; }

[SecretName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.SecretName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.GetSecretRequest#Google_Cloud_SecretManager_V1Beta2_GetSecretRequest_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.SecretName` |   |