github.com/twilio/twilio-go@v1.20.1/rest/trunking/v1/model_trunking_v1_phone_number.go (about)

     1  /*
     2   * This code was generated by
     3   * ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
     4   *  |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
     5   *  |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \
     6   *
     7   * Twilio - Trunking
     8   * This is the public Twilio REST API.
     9   *
    10   * NOTE: This class is auto generated by OpenAPI Generator.
    11   * https://openapi-generator.tech
    12   * Do not edit the class manually.
    13   */
    14  
    15  package openapi
    16  
    17  import (
    18  	"time"
    19  )
    20  
    21  // TrunkingV1PhoneNumber struct for TrunkingV1PhoneNumber
    22  type TrunkingV1PhoneNumber struct {
    23  	// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the PhoneNumber resource.
    24  	AccountSid          *string `json:"account_sid,omitempty"`
    25  	AddressRequirements *string `json:"address_requirements,omitempty"`
    26  	// The API version used to start a new TwiML session.
    27  	ApiVersion *string `json:"api_version,omitempty"`
    28  	// Whether the phone number is new to the Twilio platform. Can be: `true` or `false`.
    29  	Beta *bool `json:"beta,omitempty"`
    30  	// The set of Boolean properties that indicate whether a phone number can receive calls or messages.  Capabilities are  `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`.
    31  	Capabilities *map[string]interface{} `json:"capabilities,omitempty"`
    32  	// The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
    33  	DateCreated *time.Time `json:"date_created,omitempty"`
    34  	// The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
    35  	DateUpdated *time.Time `json:"date_updated,omitempty"`
    36  	// The string that you assigned to describe the resource.
    37  	FriendlyName *string `json:"friendly_name,omitempty"`
    38  	// The URLs of related resources.
    39  	Links *map[string]interface{} `json:"links,omitempty"`
    40  	// The phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number.
    41  	PhoneNumber *string `json:"phone_number,omitempty"`
    42  	// The unique string that we created to identify the PhoneNumber resource.
    43  	Sid *string `json:"sid,omitempty"`
    44  	// The SID of the application that handles SMS messages sent to the phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application.
    45  	SmsApplicationSid *string `json:"sms_application_sid,omitempty"`
    46  	// The HTTP method we use to call `sms_fallback_url`. Can be: `GET` or `POST`.
    47  	SmsFallbackMethod *string `json:"sms_fallback_method,omitempty"`
    48  	// The URL that we call using the `sms_fallback_method` when an error occurs while retrieving or executing the TwiML from `sms_url`.
    49  	SmsFallbackUrl *string `json:"sms_fallback_url,omitempty"`
    50  	// The HTTP method we use to call `sms_url`. Can be: `GET` or `POST`.
    51  	SmsMethod *string `json:"sms_method,omitempty"`
    52  	// The URL we call using the `sms_method` when the phone number receives an incoming SMS message.
    53  	SmsUrl *string `json:"sms_url,omitempty"`
    54  	// The URL we call using the `status_callback_method` to send status information to your application.
    55  	StatusCallback *string `json:"status_callback,omitempty"`
    56  	// The HTTP method we use to call `status_callback`. Can be: `GET` or `POST`.
    57  	StatusCallbackMethod *string `json:"status_callback_method,omitempty"`
    58  	// The SID of the Trunk that handles calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice URLs and voice applications and use those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
    59  	TrunkSid *string `json:"trunk_sid,omitempty"`
    60  	// The absolute URL of the resource.
    61  	Url *string `json:"url,omitempty"`
    62  	// The SID of the application that handles calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice URLs and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
    63  	VoiceApplicationSid *string `json:"voice_application_sid,omitempty"`
    64  	// Whether we look up the caller's caller-ID name from the CNAM database ($0.01 per look up). Can be: `true` or `false`.
    65  	VoiceCallerIdLookup *bool `json:"voice_caller_id_lookup,omitempty"`
    66  	// The HTTP method that we use to call `voice_fallback_url`. Can be: `GET` or `POST`.
    67  	VoiceFallbackMethod *string `json:"voice_fallback_method,omitempty"`
    68  	// The URL that we call using the `voice_fallback_method` when an error occurs retrieving or executing the TwiML requested by `url`.
    69  	VoiceFallbackUrl *string `json:"voice_fallback_url,omitempty"`
    70  	// The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`.
    71  	VoiceMethod *string `json:"voice_method,omitempty"`
    72  	// The URL we call using the `voice_method` when the phone number receives a call. The `voice_url` is not be used if a `voice_application_sid` or a `trunk_sid` is set.
    73  	VoiceUrl *string `json:"voice_url,omitempty"`
    74  }