Class PhoneNumber
PhoneNumber - Unified phone number type for inventory and purchased numbers
public sealed class PhoneNumber : IMessage<PhoneNumber>, IEquatable<PhoneNumber>, IDeepCloneable<PhoneNumber>, IBufferMessage, IMessage
- Inheritance
-
PhoneNumber
- Implements
-
IMessage<PhoneNumber>IDeepCloneable<PhoneNumber>IBufferMessageIMessage
- Inherited Members
Constructors
PhoneNumber()
public PhoneNumber()
PhoneNumber(PhoneNumber)
public PhoneNumber(PhoneNumber other)
Parameters
otherPhoneNumber
Fields
AreaCodeFieldNumber
Field number for the "area_code" field.
public const int AreaCodeFieldNumber = 4
Field Value
AssignedAtFieldNumber
Field number for the "assigned_at" field.
public const int AssignedAtFieldNumber = 13
Field Value
CapabilitiesFieldNumber
Field number for the "capabilities" field.
public const int CapabilitiesFieldNumber = 11
Field Value
CountryCodeFieldNumber
Field number for the "country_code" field.
public const int CountryCodeFieldNumber = 3
Field Value
CreatedAtFieldNumber
Field number for the "created_at" field.
public const int CreatedAtFieldNumber = 9
Field Value
E164FormatFieldNumber
Field number for the "e164_format" field.
public const int E164FormatFieldNumber = 2
Field Value
IdFieldNumber
Field number for the "id" field.
public const int IdFieldNumber = 1
Field Value
LocalityFieldNumber
Field number for the "locality" field.
public const int LocalityFieldNumber = 6
Field Value
NumberTypeFieldNumber
Field number for the "number_type" field.
public const int NumberTypeFieldNumber = 5
Field Value
RegionFieldNumber
Field number for the "region" field.
public const int RegionFieldNumber = 7
Field Value
ReleasedAtFieldNumber
Field number for the "released_at" field.
public const int ReleasedAtFieldNumber = 14
Field Value
SipDispatchRuleIdFieldNumber
Field number for the "sip_dispatch_rule_id" field.
public const int SipDispatchRuleIdFieldNumber = 15
Field Value
SipDispatchRuleIdsFieldNumber
Field number for the "sip_dispatch_rule_ids" field.
public const int SipDispatchRuleIdsFieldNumber = 16
Field Value
SpamScoreFieldNumber
Field number for the "spam_score" field.
public const int SpamScoreFieldNumber = 8
Field Value
StatusFieldNumber
Field number for the "status" field.
public const int StatusFieldNumber = 12
Field Value
UpdatedAtFieldNumber
Field number for the "updated_at" field.
public const int UpdatedAtFieldNumber = 10
Field Value
Properties
AreaCode
Area code (e.g., "415")
public string AreaCode { get; set; }
Property Value
AssignedAt
Assignment timestamp
public Timestamp AssignedAt { get; set; }
Property Value
- Timestamp
Capabilities
Available capabilities (e.g., "voice", "sms")
public RepeatedField<string> Capabilities { get; }
Property Value
- RepeatedField<string>
CountryCode
Country code (e.g., "US")
public string CountryCode { get; set; }
Property Value
CreatedAt
Creation timestamp
public Timestamp CreatedAt { get; set; }
Property Value
- Timestamp
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value
- MessageDescriptor
E164Format
Phone number in E.164 format (e.g., "+14155552671")
public string E164Format { get; set; }
Property Value
Id
Unique identifier
public string Id { get; set; }
Property Value
Locality
City/locality (e.g., "San Francisco")
public string Locality { get; set; }
Property Value
NumberType
Number type (mobile, local, toll-free, unknown)
public PhoneNumberType NumberType { get; set; }
Property Value
Parser
public static MessageParser<PhoneNumber> Parser { get; }
Property Value
- MessageParser<PhoneNumber>
Region
State/region (e.g., "CA")
public string Region { get; set; }
Property Value
ReleasedAt
Release timestamp (if applicable)
public Timestamp ReleasedAt { get; set; }
Property Value
- Timestamp
SipDispatchRuleId
Associated SIP dispatch rule ID (deprecated: use sip_dispatch_rule_ids instead)
[Obsolete]
public string SipDispatchRuleId { get; set; }
Property Value
SipDispatchRuleIds
Associated SIP dispatch rule IDs
public RepeatedField<string> SipDispatchRuleIds { get; }
Property Value
- RepeatedField<string>
SpamScore
Spam score for fraud detection
public double SpamScore { get; set; }
Property Value
Status
Current status
public PhoneNumberStatus Status { get; set; }
Property Value
UpdatedAt
Last update timestamp
public Timestamp UpdatedAt { get; set; }
Property Value
- Timestamp
Methods
CalculateSize()
Calculates the size of this message in Protocol Buffer wire format, in bytes.
public int CalculateSize()
Returns
- int
The number of bytes required to write this message to a coded output stream.
Clone()
Creates a deep clone of this object.
public PhoneNumber Clone()
Returns
- PhoneNumber
A deep clone of this object.
Equals(PhoneNumber)
public bool Equals(PhoneNumber other)
Parameters
otherPhoneNumber
Returns
Equals(object)
public override bool Equals(object other)
Parameters
otherobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
MergeFrom(CodedInputStream)
Merges the data from the specified coded input stream with the current message.
public void MergeFrom(CodedInputStream input)
Parameters
inputCodedInputStream
Remarks
See the user guide for precise merge semantics.
MergeFrom(PhoneNumber)
Merges the given message into this one.
public void MergeFrom(PhoneNumber other)
Parameters
otherPhoneNumber
Remarks
See the user guide for precise merge semantics.
ToString()
public override string ToString()
Returns
WriteTo(CodedOutputStream)
Writes the data to the given coded output stream.
public void WriteTo(CodedOutputStream output)
Parameters
outputCodedOutputStreamCoded output stream to write the data to. Must not be null.