# Google Cloud Dialogflow v2beta1 API - Class PhoneNumber (1.0.0-beta30)

1.0.0-beta30 (latest) 1.0.0-beta29

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

Reference documentation and code samples for the Google Cloud Dialogflow v2beta1 API class PhoneNumber.

Represents a phone number.
`PhoneNumber` resources enable phone calls to be answered by Dialogflow
services and are added to a project through a
\[PhoneNumberOrder\]\[google.cloud.dialogflow.v2beta1.PhoneNumberOrder\].

## Inheritance

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

## Implements

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

## Assembly

Google.Cloud.Dialogflow.V2Beta1.dll

## Constructors

### PhoneNumber()

    public PhoneNumber()

### PhoneNumber(PhoneNumber)

    public PhoneNumber(PhoneNumber other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.PhoneNumber` |

## Properties

### AllowedSipTrunks

    public PhoneNumber.Types.AllowedSipTrunks AllowedSipTrunks { get; set; }

Optional. Only allow calls from the specified SIP trunks.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.PhoneNumberhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.PhoneNumber.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.PhoneNumber.Types.AllowedSipTrunks` |   |

### ConversationProfile

    public string ConversationProfile { get; set; }

Optional. The conversation profile calls to this `PhoneNumber` should use.
The project ID here should be the same as the one in
\[name\]\[google.cloud.dialogflow.v2beta1.PhoneNumber.name\].
Format: `projects/<Project ID>/conversationProfiles/<ConversationProfile
ID>`.
Format: `projects/<Project ID>/locations/<Location
ID>/conversationProfiles/<ConversationProfile ID>`.

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

### InboundRestrictionCase

    public PhoneNumber.InboundRestrictionOneofCase InboundRestrictionCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.PhoneNumberhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.PhoneNumber.InboundRestrictionOneofCase` |   |

### LifecycleState

    public PhoneNumber.Types.LifecycleState LifecycleState { get; set; }

Output only. The state of the `PhoneNumber`. Defaults to `ACTIVE`.
`PhoneNumber` objects set to `DELETE_REQUESTED` always decline incoming
calls and can be removed completely within 30 days.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.PhoneNumberhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.PhoneNumber.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.PhoneNumber.Types.LifecycleState` |   |

### Name

    public string Name { get; set; }

Optional. The unique identifier of this phone number.
Required for
\[PhoneNumbers.UpdatePhoneNumber\]\[google.cloud.dialogflow.v2beta1.PhoneNumbers.UpdatePhoneNumber\]
method. Format: `projects/<Project ID>/phoneNumbers/<PhoneNumber ID>`.
Format: `projects/<Project ID>/locations/<Location
ID>/phoneNumbers/<PhoneNumber ID>`.

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

### PhoneNumberName

    public PhoneNumberName PhoneNumberName { get; set; }

[PhoneNumberName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.PhoneNumberName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.PhoneNumber#Google_Cloud_Dialogflow_V2Beta1_PhoneNumber_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.PhoneNumberName` |   |

### PhoneNumber_

    public string PhoneNumber_ { get; set; }

Output only. Phone number in [E.164](https://en.wikipedia.org/wiki/E.164)
format. An example of a correctly formatted phone number: +15556767888.

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

### PurgeTime

    public Timestamp PurgeTime { get; set; }

Output only. The time at which this resource will be purged.

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