Class PhoneNumber.Types.ShortCode (2.10.0)

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

An object representing a short code, which is a phone number that is typically much shorter than regular phone numbers and can be used to address messages in MMS and SMS systems, as well as for abbreviated dialing (e.g. "Text 611 to see how many minutes you have remaining on your plan.").

Short codes are restricted to a region and are not internationally dialable, which means the same short code can exist in different regions, with different usage and pricing, even if those regions share the same country calling code (e.g. US and CA).

Inheritance

object > PhoneNumber.Types.ShortCode

Namespace

Google.Type

Assembly

Google.Api.CommonProtos.dll

Constructors

ShortCode()

public ShortCode()

ShortCode(ShortCode)

public ShortCode(PhoneNumber.Types.ShortCode other)
Parameter
Name Description
other PhoneNumberTypesShortCode

Fields

NumberFieldNumber

public const int NumberFieldNumber = 2

Field number for the "number" field.

Field Value
Type Description
int

RegionCodeFieldNumber

public const int RegionCodeFieldNumber = 1

Field number for the "region_code" field.

Field Value
Type Description
int

Properties

Descriptor

public static MessageDescriptor Descriptor { get; }
Property Value
Type Description
MessageDescriptor

Number

public string Number { get; set; }

Required. The short code digits, without a leading plus ('+') or country calling code, e.g. "611".

Property Value
Type Description
string

Parser

public static MessageParser<PhoneNumber.Types.ShortCode> Parser { get; }
Property Value
Type Description
MessageParserPhoneNumberTypesShortCode

RegionCode

public string RegionCode { get; set; }

Required. The BCP-47 region code of the location where calls to this short code can be made, such as "US" and "BB".

Reference(s):

Property Value
Type Description
string

Methods

CalculateSize()

public int CalculateSize()
Returns
Type Description
int

Clone()

public PhoneNumber.Types.ShortCode Clone()
Returns
Type Description
PhoneNumberTypesShortCode

Equals(ShortCode)

public bool Equals(PhoneNumber.Types.ShortCode other)
Parameter
Name Description
other PhoneNumberTypesShortCode
Returns
Type Description
bool

Equals(object)

public override bool Equals(object other)
Parameter
Name Description
other object
Returns
Type Description
bool
Overrides

GetHashCode()

public override int GetHashCode()
Returns
Type Description
int
Overrides

MergeFrom(CodedInputStream)

public void MergeFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream

MergeFrom(ShortCode)

public void MergeFrom(PhoneNumber.Types.ShortCode other)
Parameter
Name Description
other PhoneNumberTypesShortCode

ToString()

public override string ToString()
Returns
Type Description
string
Overrides

WriteTo(CodedOutputStream)

public void WriteTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream