public sealed class PhoneNumberName : IResourceName, IEquatable<PhoneNumberName>
Reference documentation and code samples for the Google Cloud Dialogflow v2beta1 API class PhoneNumberName.
Resource name for the PhoneNumber
resource.
Namespace
Google.Cloud.Dialogflow.V2Beta1Assembly
Google.Cloud.Dialogflow.V2Beta1.dll
Constructors
PhoneNumberName(string, string)
public PhoneNumberName(string projectId, string phoneNumberId)
Constructs a new instance of a PhoneNumberName class from the component parts of pattern
projects/{project}/phoneNumbers/{phone_number}
Parameters | |
---|---|
Name | Description |
projectId |
string The |
phoneNumberId |
string The |
Properties
IsKnownPattern
public bool IsKnownPattern { get; }
Whether this instance contains a resource name with a known pattern.
Property Value | |
---|---|
Type | Description |
bool |
LocationId
public string LocationId { get; }
The Location
ID. May be null
, depending on which resource name is contained by this instance.
Property Value | |
---|---|
Type | Description |
string |
PhoneNumberId
public string PhoneNumberId { get; }
The PhoneNumber
ID. May be null
, depending on which resource name is contained by this
instance.
Property Value | |
---|---|
Type | Description |
string |
ProjectId
public string ProjectId { get; }
The Project
ID. May be null
, depending on which resource name is contained by this instance.
Property Value | |
---|---|
Type | Description |
string |
Type
public PhoneNumberName.ResourceNameType Type { get; }
The PhoneNumberName.ResourceNameType of the contained resource name.
Property Value | |
---|---|
Type | Description |
PhoneNumberNameResourceNameType |
UnparsedResource
public UnparsedResourceName UnparsedResource { get; }
The contained UnparsedResourceName. Only non-null
if this instance contains an
unparsed resource name.
Property Value | |
---|---|
Type | Description |
UnparsedResourceName |
Methods
Format(string, string)
public static string Format(string projectId, string phoneNumberId)
Formats the IDs into the string representation of this PhoneNumberName with pattern
projects/{project}/phoneNumbers/{phone_number}
.
Parameters | |
---|---|
Name | Description |
projectId |
string The |
phoneNumberId |
string The |
Returns | |
---|---|
Type | Description |
string |
The string representation of this PhoneNumberName with pattern
|
FormatProjectLocationPhoneNumber(string, string, string)
public static string FormatProjectLocationPhoneNumber(string projectId, string locationId, string phoneNumberId)
Formats the IDs into the string representation of this PhoneNumberName with pattern
projects/{project}/locations/{location}/phoneNumbers/{phone_number}
.
Parameters | |
---|---|
Name | Description |
projectId |
string The |
locationId |
string The |
phoneNumberId |
string The |
Returns | |
---|---|
Type | Description |
string |
The string representation of this PhoneNumberName with pattern
|
FormatProjectPhoneNumber(string, string)
public static string FormatProjectPhoneNumber(string projectId, string phoneNumberId)
Formats the IDs into the string representation of this PhoneNumberName with pattern
projects/{project}/phoneNumbers/{phone_number}
.
Parameters | |
---|---|
Name | Description |
projectId |
string The |
phoneNumberId |
string The |
Returns | |
---|---|
Type | Description |
string |
The string representation of this PhoneNumberName with pattern
|
FromProjectLocationPhoneNumber(string, string, string)
public static PhoneNumberName FromProjectLocationPhoneNumber(string projectId, string locationId, string phoneNumberId)
Creates a PhoneNumberName with the pattern
projects/{project}/locations/{location}/phoneNumbers/{phone_number}
.
Parameters | |
---|---|
Name | Description |
projectId |
string The |
locationId |
string The |
phoneNumberId |
string The |
Returns | |
---|---|
Type | Description |
PhoneNumberName |
A new instance of PhoneNumberName constructed from the provided ids. |
FromProjectPhoneNumber(string, string)
public static PhoneNumberName FromProjectPhoneNumber(string projectId, string phoneNumberId)
Creates a PhoneNumberName with the pattern projects/{project}/phoneNumbers/{phone_number}
.
Parameters | |
---|---|
Name | Description |
projectId |
string The |
phoneNumberId |
string The |
Returns | |
---|---|
Type | Description |
PhoneNumberName |
A new instance of PhoneNumberName constructed from the provided ids. |
FromUnparsed(UnparsedResourceName)
public static PhoneNumberName FromUnparsed(UnparsedResourceName unparsedResourceName)
Creates a PhoneNumberName containing an unparsed resource name.
Parameter | |
---|---|
Name | Description |
unparsedResourceName |
UnparsedResourceName The unparsed resource name. Must not be |
Returns | |
---|---|
Type | Description |
PhoneNumberName |
A new instance of PhoneNumberName containing the provided
|
GetHashCode()
public override int GetHashCode()
Returns a hash code for this resource name.
Returns | |
---|---|
Type | Description |
int |
Parse(string)
public static PhoneNumberName Parse(string phoneNumberName)
Parses the given resource name string into a new PhoneNumberName instance.
Parameter | |
---|---|
Name | Description |
phoneNumberName |
string The resource name in string form. Must not be |
Returns | |
---|---|
Type | Description |
PhoneNumberName |
The parsed PhoneNumberName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/phoneNumbers/{phone_number}
projects/{project}/locations/{location}/phoneNumbers/{phone_number}
Parse(string, bool)
public static PhoneNumberName Parse(string phoneNumberName, bool allowUnparsed)
Parses the given resource name string into a new PhoneNumberName instance; optionally allowing an unparseable resource name.
Parameters | |
---|---|
Name | Description |
phoneNumberName |
string The resource name in string form. Must not be |
allowUnparsed |
bool If |
Returns | |
---|---|
Type | Description |
PhoneNumberName |
The parsed PhoneNumberName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/phoneNumbers/{phone_number}
projects/{project}/locations/{location}/phoneNumbers/{phone_number}
allowUnparsed
is true
.
ToString()
public override string ToString()
The string representation of the resource name.
Returns | |
---|---|
Type | Description |
string |
The string representation of the resource name. |
TryParse(string, out PhoneNumberName)
public static bool TryParse(string phoneNumberName, out PhoneNumberName result)
Tries to parse the given resource name string into a new PhoneNumberName instance.
Parameters | |
---|---|
Name | Description |
phoneNumberName |
string The resource name in string form. Must not be |
result |
PhoneNumberName When this method returns, the parsed PhoneNumberName, or |
Returns | |
---|---|
Type | Description |
bool |
|
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/phoneNumbers/{phone_number}
projects/{project}/locations/{location}/phoneNumbers/{phone_number}
TryParse(string, bool, out PhoneNumberName)
public static bool TryParse(string phoneNumberName, bool allowUnparsed, out PhoneNumberName result)
Tries to parse the given resource name string into a new PhoneNumberName instance; optionally allowing an unparseable resource name.
Parameters | |
---|---|
Name | Description |
phoneNumberName |
string The resource name in string form. Must not be |
allowUnparsed |
bool If |
result |
PhoneNumberName When this method returns, the parsed PhoneNumberName, or |
Returns | |
---|---|
Type | Description |
bool |
|
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/phoneNumbers/{phone_number}
projects/{project}/locations/{location}/phoneNumbers/{phone_number}
allowUnparsed
is true
.
Operators
operator ==(PhoneNumberName, PhoneNumberName)
public static bool operator ==(PhoneNumberName a, PhoneNumberName b)
Determines whether two specified resource names have the same value.
Parameters | |
---|---|
Name | Description |
a |
PhoneNumberName The first resource name to compare, or null. |
b |
PhoneNumberName The second resource name to compare, or null. |
Returns | |
---|---|
Type | Description |
bool |
true if the value of |
operator !=(PhoneNumberName, PhoneNumberName)
public static bool operator !=(PhoneNumberName a, PhoneNumberName b)
Determines whether two specified resource names have different values.
Parameters | |
---|---|
Name | Description |
a |
PhoneNumberName The first resource name to compare, or null. |
b |
PhoneNumberName The second resource name to compare, or null. |
Returns | |
---|---|
Type | Description |
bool |
true if the value of |