1.0.0-beta25 (latest) 1.0.0-beta24

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

Reference documentation and code samples for the Discovery Engine v1beta API class Principal.

Principal identifier of a user or a group.

## Inheritance

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

## Implements

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

## Assembly

Google.Cloud.DiscoveryEngine.V1Beta.dll

## Constructors

### Principal()

    public Principal()

### Principal(Principal)

    public Principal(Principal other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Principal` |

## Properties

### ExternalEntityId

    public string ExternalEntityId { get; set; }

For 3P application identities which are not present in the customer
identity provider.

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

### GroupId

    public string GroupId { get; set; }

Group identifier.
For Google Workspace user account, group_id should be the google
workspace group email.
For non-google identity provider user account, group_id is the mapped
group identifier configured during the workforcepool config.

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

### HasExternalEntityId

    public bool HasExternalEntityId { get; }

Gets whether the "external_entity_id" field is set

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

### HasGroupId

    public bool HasGroupId { get; }

Gets whether the "group_id" field is set

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

### HasUserId

    public bool HasUserId { get; }

Gets whether the "user_id" field is set

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

### PrincipalCase

    public Principal.PrincipalOneofCase PrincipalCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Principalhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Principal.PrincipalOneofCase` |   |

### UserId

    public string UserId { get; set; }

User identifier.
For Google Workspace user account, user_id should be the google workspace
user email.
For non-google identity provider user account, user_id is the mapped user
identifier configured during the workforcepool config.

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