github.com/twilio/twilio-go@v1.20.1/rest/api/v2010/model_api_v2010_message.go (about)

     1  /*
     2   * This code was generated by
     3   * ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
     4   *  |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
     5   *  |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \
     6   *
     7   * Twilio - Api
     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  // ApiV2010Message struct for ApiV2010Message
    18  type ApiV2010Message struct {
    19  	// The text content of the message
    20  	Body *string `json:"body,omitempty"`
    21  	// The number of segments that make up the complete message. SMS message bodies that exceed the [character limit](https://www.twilio.com/docs/glossary/what-sms-character-limit) are segmented and charged as multiple messages. Note: For messages sent via a Messaging Service, `num_segments` is initially `0`, since a sender hasn't yet been assigned.
    22  	NumSegments *string `json:"num_segments,omitempty"`
    23  	Direction   *string `json:"direction,omitempty"`
    24  	// The sender's phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/quickstart), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/en-us/messaging/channels/sms/short-codes), or  [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). For incoming messages, this is the number or channel address of the sender. For outgoing messages, this value is a Twilio phone number, alphanumeric sender ID, short code, or channel address from which the message is sent.
    25  	From *string `json:"from,omitempty"`
    26  	// The recipient's phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format) or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g. `whatsapp:+15552229999`)
    27  	To *string `json:"to,omitempty"`
    28  	// The [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3) timestamp (in GMT) of when the Message resource was last updated
    29  	DateUpdated *string `json:"date_updated,omitempty"`
    30  	// The amount billed for the message in the currency specified by `price_unit`. The `price` is populated after the message has been sent/received, and may not be immediately availalble. View the [Pricing page](https://www.twilio.com/en-us/pricing) for more details.
    31  	Price *string `json:"price,omitempty"`
    32  	// The description of the `error_code` if the Message `status` is `failed` or `undelivered`. If no error was encountered, the value is `null`.
    33  	ErrorMessage *string `json:"error_message,omitempty"`
    34  	// The URI of the Message resource, relative to `https://api.twilio.com`.
    35  	Uri *string `json:"uri,omitempty"`
    36  	// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with the Message resource
    37  	AccountSid *string `json:"account_sid,omitempty"`
    38  	// The number of media files associated with the Message resource.
    39  	NumMedia *string `json:"num_media,omitempty"`
    40  	Status   *string `json:"status,omitempty"`
    41  	// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) associated with the Message resource. The value is `null` if a Messaging Service was not used.
    42  	MessagingServiceSid *string `json:"messaging_service_sid,omitempty"`
    43  	// The unique, Twilio-provided string that identifies the Message resource.
    44  	Sid *string `json:"sid,omitempty"`
    45  	// The [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3) timestamp (in GMT) of when the Message was sent. For an outgoing message, this is when Twilio sent the message. For an incoming message, this is when Twilio sent the HTTP request to your incoming message webhook URL.
    46  	DateSent *string `json:"date_sent,omitempty"`
    47  	// The [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3) timestamp (in GMT) of when the Message resource was created
    48  	DateCreated *string `json:"date_created,omitempty"`
    49  	// The [error code](https://www.twilio.com/docs/api/errors) returned if the Message `status` is `failed` or `undelivered`. If no error was encountered, the value is `null`.
    50  	ErrorCode *int `json:"error_code,omitempty"`
    51  	// The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format (e.g. `usd`, `eur`, `jpy`).
    52  	PriceUnit *string `json:"price_unit,omitempty"`
    53  	// The API version used to process the Message
    54  	ApiVersion *string `json:"api_version,omitempty"`
    55  	// A list of related resources identified by their URIs relative to `https://api.twilio.com`
    56  	SubresourceUris *map[string]interface{} `json:"subresource_uris,omitempty"`
    57  }