Class CustomEmojiName
Resource name for the CustomEmoji
resource.
Inherited Members
Namespace: Google.Apps.Chat.V1
Assembly: Google.Apps.Chat.V1.dll
Syntax
public sealed class CustomEmojiName : IResourceName, IEquatable<CustomEmojiName>
Constructors
CustomEmojiName(string)
Constructs a new instance of a CustomEmojiName class from the component parts of pattern
customEmojis/{custom_emoji}
Declaration
public CustomEmojiName(string customEmojiId)
Parameters
Type | Name | Description |
---|---|---|
string | customEmojiId | The |
Properties
CustomEmojiId
The CustomEmoji
ID. Will not be null
, unless this instance contains an unparsed resource name.
Declaration
public string CustomEmojiId { get; }
Property Value
Type | Description |
---|---|
string |
IsKnownPattern
Whether this instance contains a resource name with a known pattern.
Declaration
public bool IsKnownPattern { get; }
Property Value
Type | Description |
---|---|
bool |
Implements
Type
The CustomEmojiName.ResourceNameType of the contained resource name.
Declaration
public CustomEmojiName.ResourceNameType Type { get; }
Property Value
Type | Description |
---|---|
CustomEmojiName.ResourceNameType |
UnparsedResource
The contained UnparsedResourceName. Only non-null
if this instance contains an
unparsed resource name.
Declaration
public UnparsedResourceName UnparsedResource { get; }
Property Value
Type | Description |
---|---|
UnparsedResourceName |
Methods
Format(string)
Formats the IDs into the string representation of this CustomEmojiName with pattern
customEmojis/{custom_emoji}
.
Declaration
public static string Format(string customEmojiId)
Parameters
Type | Name | Description |
---|---|---|
string | customEmojiId | The |
Returns
Type | Description |
---|---|
string | The string representation of this CustomEmojiName with pattern |
FormatCustomEmoji(string)
Formats the IDs into the string representation of this CustomEmojiName with pattern
customEmojis/{custom_emoji}
.
Declaration
public static string FormatCustomEmoji(string customEmojiId)
Parameters
Type | Name | Description |
---|---|---|
string | customEmojiId | The |
Returns
Type | Description |
---|---|
string | The string representation of this CustomEmojiName with pattern |
FromCustomEmoji(string)
Creates a CustomEmojiName with the pattern customEmojis/{custom_emoji}
.
Declaration
public static CustomEmojiName FromCustomEmoji(string customEmojiId)
Parameters
Type | Name | Description |
---|---|---|
string | customEmojiId | The |
Returns
Type | Description |
---|---|
CustomEmojiName | A new instance of CustomEmojiName constructed from the provided ids. |
FromUnparsed(UnparsedResourceName)
Creates a CustomEmojiName containing an unparsed resource name.
Declaration
public static CustomEmojiName FromUnparsed(UnparsedResourceName unparsedResourceName)
Parameters
Type | Name | Description |
---|---|---|
UnparsedResourceName | unparsedResourceName | The unparsed resource name. Must not be |
Returns
Type | Description |
---|---|
CustomEmojiName | A new instance of CustomEmojiName containing the provided
|
GetHashCode()
Returns a hash code for this resource name.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int |
Overrides
Parse(string)
Parses the given resource name string into a new CustomEmojiName instance.
Declaration
public static CustomEmojiName Parse(string customEmojiName)
Parameters
Type | Name | Description |
---|---|---|
string | customEmojiName | The resource name in string form. Must not be |
Returns
Type | Description |
---|---|
CustomEmojiName | The parsed CustomEmojiName if successful. |
Remarks
To parse successfully, the resource name must be formatted as one of the following:
customEmojis/{custom_emoji}
Parse(string, bool)
Parses the given resource name string into a new CustomEmojiName instance; optionally allowing an unparseable resource name.
Declaration
public static CustomEmojiName Parse(string customEmojiName, bool allowUnparsed)
Parameters
Type | Name | Description |
---|---|---|
string | customEmojiName | The resource name in string form. Must not be |
bool | allowUnparsed | If |
Returns
Type | Description |
---|---|
CustomEmojiName | The parsed CustomEmojiName if successful. |
Remarks
To parse successfully, the resource name must be formatted as one of the following:
customEmojis/{custom_emoji}
allowUnparsed
is true
.
ToString()
The string representation of the resource name.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The string representation of the resource name. |
Overrides
Implements
TryParse(string, out CustomEmojiName)
Tries to parse the given resource name string into a new CustomEmojiName instance.
Declaration
public static bool TryParse(string customEmojiName, out CustomEmojiName result)
Parameters
Type | Name | Description |
---|---|---|
string | customEmojiName | The resource name in string form. Must not be |
CustomEmojiName | result | When this method returns, the parsed CustomEmojiName, or |
Returns
Type | Description |
---|---|
bool |
|
Remarks
To parse successfully, the resource name must be formatted as one of the following:
customEmojis/{custom_emoji}
TryParse(string, bool, out CustomEmojiName)
Tries to parse the given resource name string into a new CustomEmojiName instance; optionally allowing an unparseable resource name.
Declaration
public static bool TryParse(string customEmojiName, bool allowUnparsed, out CustomEmojiName result)
Parameters
Type | Name | Description |
---|---|---|
string | customEmojiName | The resource name in string form. Must not be |
bool | allowUnparsed | If |
CustomEmojiName | result | When this method returns, the parsed CustomEmojiName, or |
Returns
Type | Description |
---|---|
bool |
|
Remarks
To parse successfully, the resource name must be formatted as one of the following:
customEmojis/{custom_emoji}
allowUnparsed
is true
.
Operators
operator ==(CustomEmojiName, CustomEmojiName)
Determines whether two specified resource names have the same value.
Declaration
public static bool operator ==(CustomEmojiName a, CustomEmojiName b)
Parameters
Type | Name | Description |
---|---|---|
CustomEmojiName | a | The first resource name to compare, or null. |
CustomEmojiName | b | The second resource name to compare, or null. |
Returns
Type | Description |
---|---|
bool | true if the value of |
operator !=(CustomEmojiName, CustomEmojiName)
Determines whether two specified resource names have different values.
Declaration
public static bool operator !=(CustomEmojiName a, CustomEmojiName b)
Parameters
Type | Name | Description |
---|---|---|
CustomEmojiName | a | The first resource name to compare, or null. |
CustomEmojiName | b | The second resource name to compare, or null. |
Returns
Type | Description |
---|---|
bool | true if the value of |