Show / Hide Table of Contents

Class CustomEmojiName

Resource name for the CustomEmoji resource.

Inheritance
object
CustomEmojiName
Implements
IResourceName
IEquatable<CustomEmojiName>
Inherited Members
object.GetType()
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 CustomEmoji ID. Must not be null or empty.

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
IResourceName.IsKnownPattern

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 CustomEmoji ID. Must not be null or empty.

Returns
Type Description
string

The string representation of this CustomEmojiName with pattern customEmojis/{custom_emoji} .

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 CustomEmoji ID. Must not be null or empty.

Returns
Type Description
string

The string representation of this CustomEmojiName with pattern customEmojis/{custom_emoji} .

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 CustomEmoji ID. Must not be null or empty.

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 null.

Returns
Type Description
CustomEmojiName

A new instance of CustomEmojiName containing the provided unparsedResourceName.

GetHashCode()

Returns a hash code for this resource name.

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
object.GetHashCode()

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 null.

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 null.

bool allowUnparsed

If true will successfully store an unparseable resource name into the UnparsedResource property; otherwise will throw an ArgumentException if an unparseable resource name is specified.

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}
Or may be in any format if 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
object.ToString()
Implements
IResourceName.ToString()

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 null.

CustomEmojiName result

When this method returns, the parsed CustomEmojiName, or null if parsing failed.

Returns
Type Description
bool

true if the name was parsed successfully; false otherwise.

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 null.

bool allowUnparsed

If true will successfully store an unparseable resource name into the UnparsedResource property; otherwise will throw an ArgumentException if an unparseable resource name is specified.

CustomEmojiName result

When this method returns, the parsed CustomEmojiName, or null if parsing failed.

Returns
Type Description
bool

true if the name was parsed successfully; false otherwise.

Remarks

To parse successfully, the resource name must be formatted as one of the following:

  • customEmojis/{custom_emoji}
Or may be in any format if 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 a is the same as the value of b; otherwise, false.

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 a is different from the value of b; otherwise, false.

In this article
Back to top Generated by DocFX