github.com/twilio/twilio-go@v1.20.1/rest/chat/v2/model_chat_v2_message.go (about) 1 /* 2 * This code was generated by 3 * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 * 7 * Twilio - Chat 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 // ChatV2Message struct for ChatV2Message 22 type ChatV2Message struct { 23 // The unique string that we created to identify the Message resource. 24 Sid *string `json:"sid,omitempty"` 25 // The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Message resource. 26 AccountSid *string `json:"account_sid,omitempty"` 27 // The JSON string that stores application-specific data. If attributes have not been set, `{}` is returned. 28 Attributes *string `json:"attributes,omitempty"` 29 // The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) the Message resource is associated with. 30 ServiceSid *string `json:"service_sid,omitempty"` 31 // The SID of the [Channel](https://www.twilio.com/docs/chat/channels) that the message was sent to. 32 To *string `json:"to,omitempty"` 33 // The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Message resource belongs to. 34 ChannelSid *string `json:"channel_sid,omitempty"` 35 // The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. 36 DateCreated *time.Time `json:"date_created,omitempty"` 37 // The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. 38 DateUpdated *time.Time `json:"date_updated,omitempty"` 39 // The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable. 40 LastUpdatedBy *string `json:"last_updated_by,omitempty"` 41 // Whether the message has been edited since it was created. 42 WasEdited *bool `json:"was_edited,omitempty"` 43 // The [Identity](https://www.twilio.com/docs/chat/identity) of the message's author. The default value is `system`. 44 From *string `json:"from,omitempty"` 45 // The content of the message. 46 Body *string `json:"body,omitempty"` 47 // The index of the message within the [Channel](https://www.twilio.com/docs/chat/channels). Indices may skip numbers, but will always be in order of when the message was received. 48 Index *int `json:"index,omitempty"` 49 // The Message type. Can be: `text` or `media`. 50 Type *string `json:"type,omitempty"` 51 // An object that describes the Message's media, if the message contains media. The object contains these fields: `content_type` with the MIME type of the media, `filename` with the name of the media, `sid` with the SID of the Media resource, and `size` with the media object's file size in bytes. If the Message has no media, this value is `null`. 52 Media *interface{} `json:"media,omitempty"` 53 // The absolute URL of the Message resource. 54 Url *string `json:"url,omitempty"` 55 }