pub struct PhoneNumber {Show 19 fields
pub id: String,
pub name: String,
pub e164_format: String,
pub country_code: String,
pub area_code: String,
pub number_type: i32,
pub locality: String,
pub region: String,
pub spam_score: f64,
pub created_at: Option<Timestamp>,
pub updated_at: Option<Timestamp>,
pub capabilities: Vec<String>,
pub status: i32,
pub inbound_status: i32,
pub outbound_status: i32,
pub assigned_at: Option<Timestamp>,
pub released_at: Option<Timestamp>,
pub sip_dispatch_rule_id: String,
pub sip_dispatch_rule_ids: Vec<String>,
}Expand description
PhoneNumber - Unified phone number type for inventory and purchased numbers
Fields§
§id: StringUnique identifier
name: StringHuman-readable name/label for the phone number
e164_format: StringPhone number in E.164 format (e.g., “+14155552671”)
country_code: StringCountry code (e.g., “US”)
area_code: StringArea code (e.g., “415”)
number_type: i32Number type (mobile, local, toll-free, unknown)
locality: StringCity/locality (e.g., “San Francisco”)
region: StringState/region (e.g., “CA”)
spam_score: f64Spam score for fraud detection
created_at: Option<Timestamp>Creation timestamp
updated_at: Option<Timestamp>Last update timestamp
capabilities: Vec<String>Available capabilities (e.g., “voice”, “sms”)
status: i32Current status
inbound_status: i32Inbound calling status
outbound_status: i32Outbound calling status
assigned_at: Option<Timestamp>Assignment timestamp
released_at: Option<Timestamp>Release timestamp (if applicable)
sip_dispatch_rule_id: StringAssociated SIP dispatch rule ID (deprecated: use sip_dispatch_rule_ids instead)
sip_dispatch_rule_ids: Vec<String>Associated SIP dispatch rule IDs
Implementations§
Source§impl PhoneNumber
impl PhoneNumber
Sourcepub fn number_type(&self) -> PhoneNumberType
pub fn number_type(&self) -> PhoneNumberType
Returns the enum value of number_type, or the default if the field is set to an invalid enum value.
Sourcepub fn set_number_type(&mut self, value: PhoneNumberType)
pub fn set_number_type(&mut self, value: PhoneNumberType)
Sets number_type to the provided enum value.
Sourcepub fn status(&self) -> PhoneNumberStatus
pub fn status(&self) -> PhoneNumberStatus
Returns the enum value of status, or the default if the field is set to an invalid enum value.
Sourcepub fn set_status(&mut self, value: PhoneNumberStatus)
pub fn set_status(&mut self, value: PhoneNumberStatus)
Sets status to the provided enum value.
Sourcepub fn inbound_status(&self) -> PhoneNumberInboundStatus
pub fn inbound_status(&self) -> PhoneNumberInboundStatus
Returns the enum value of inbound_status, or the default if the field is set to an invalid enum value.
Sourcepub fn set_inbound_status(&mut self, value: PhoneNumberInboundStatus)
pub fn set_inbound_status(&mut self, value: PhoneNumberInboundStatus)
Sets inbound_status to the provided enum value.
Sourcepub fn outbound_status(&self) -> PhoneNumberOutboundStatus
pub fn outbound_status(&self) -> PhoneNumberOutboundStatus
Returns the enum value of outbound_status, or the default if the field is set to an invalid enum value.
Sourcepub fn set_outbound_status(&mut self, value: PhoneNumberOutboundStatus)
pub fn set_outbound_status(&mut self, value: PhoneNumberOutboundStatus)
Sets outbound_status to the provided enum value.
Trait Implementations§
Source§impl Clone for PhoneNumber
impl Clone for PhoneNumber
Source§impl Debug for PhoneNumber
impl Debug for PhoneNumber
Source§impl Default for PhoneNumber
impl Default for PhoneNumber
§impl<'de> Deserialize<'de> for PhoneNumber
impl<'de> Deserialize<'de> for PhoneNumber
§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl Message for PhoneNumber
impl Message for PhoneNumber
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.