github.com/twilio/twilio-go@v1.20.1/rest/notify/v1/model_notify_v1_notification.go (about)

     1  /*
     2   * This code was generated by
     3   * ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
     4   *  |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
     5   *  |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \
     6   *
     7   * Twilio - Notify
     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  // NotifyV1Notification struct for NotifyV1Notification
    22  type NotifyV1Notification struct {
    23  	// The unique string that we created to identify the Notification resource.
    24  	Sid *string `json:"sid,omitempty"`
    25  	// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Notification resource.
    26  	AccountSid *string `json:"account_sid,omitempty"`
    27  	// The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) the resource is associated with.
    28  	ServiceSid *string `json:"service_sid,omitempty"`
    29  	// The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
    30  	DateCreated *time.Time `json:"date_created,omitempty"`
    31  	// The list of `identity` values of the Users to notify. We will attempt to deliver notifications only to Bindings with an identity in this list.
    32  	Identities *[]string `json:"identities,omitempty"`
    33  	// The tags that select the Bindings to notify. Notifications will be attempted only to Bindings that have all of the tags listed in this property.
    34  	Tags *[]string `json:"tags,omitempty"`
    35  	// The list of Segments to notify. The [Segment](https://www.twilio.com/docs/notify/api/segment-resource) resource is deprecated. Use the `tags` property, instead.
    36  	Segments *[]string `json:"segments,omitempty"`
    37  	Priority *string   `json:"priority,omitempty"`
    38  	// How long, in seconds, the notification is valid. Can be an integer between 0 and 2,419,200, which is 4 weeks, the default and the maximum supported time to live (TTL). Delivery should be attempted if the device is offline until the TTL elapses. Zero means that the notification delivery is attempted immediately, only once, and is not stored for future delivery. SMS does not support this property.
    39  	Ttl *int `json:"ttl,omitempty"`
    40  	// The notification title. For FCM and GCM, this translates to the `data.twi_title` value. For APNS, this translates to the `aps.alert.title` value. SMS does not support this property. This field is not visible on iOS phones and tablets but appears on Apple Watch and Android devices.
    41  	Title *string `json:"title,omitempty"`
    42  	// The notification text. For FCM and GCM, translates to `data.twi_body`. For APNS, translates to `aps.alert.body`. For SMS, translates to `body`. SMS requires either this `body` value, or `media_urls` attribute defined in the `sms` parameter of the notification.
    43  	Body *string `json:"body,omitempty"`
    44  	// The name of the sound to be played for the notification. For FCM and GCM, this Translates to `data.twi_sound`.  For APNS, this translates to `aps.sound`.  SMS does not support this property.
    45  	Sound *string `json:"sound,omitempty"`
    46  	// The actions to display for the notification. For APNS, translates to the `aps.category` value. For GCM, translates to the `data.twi_action` value. For SMS, this parameter is not supported and is omitted from deliveries to those channels.
    47  	Action *string `json:"action,omitempty"`
    48  	// The custom key-value pairs of the notification's payload. For FCM and GCM, this value translates to `data` in the FCM and GCM payloads. FCM and GCM [reserve certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref) that cannot be used in those channels. For APNS, attributes of `data` are inserted into the APNS payload as custom properties outside of the `aps` dictionary. In all channels, we reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed and are rejected as 400 Bad request with no delivery attempted. For SMS, this parameter is not supported and is omitted from deliveries to those channels.
    49  	Data *interface{} `json:"data,omitempty"`
    50  	// The APNS-specific payload that overrides corresponding attributes in the generic payload for APNS Bindings. This property maps to the APNS `Payload` item, therefore the `aps` key must be used to change standard attributes. Adds custom key-value pairs to the root of the dictionary. See the [APNS documentation](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html) for more details. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed.
    51  	Apn *interface{} `json:"apn,omitempty"`
    52  	// The GCM-specific payload that overrides corresponding attributes in the generic payload for GCM Bindings.  This property maps to the root JSON dictionary. Target parameters `to`, `registration_ids`, and `notification_key` are not allowed. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed.
    53  	Gcm *interface{} `json:"gcm,omitempty"`
    54  	// The FCM-specific payload that overrides corresponding attributes in the generic payload for FCM Bindings. This property maps to the root JSON dictionary. See the [FCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream) for more details. Target parameters `to`, `registration_ids`, `condition`, and `notification_key` are not allowed in this parameter. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. FCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref), which cannot be used in that channel.
    55  	Fcm *interface{} `json:"fcm,omitempty"`
    56  	// The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings.  Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/api/message-resource) resource.  These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`.  The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array.
    57  	Sms *interface{} `json:"sms,omitempty"`
    58  	// Deprecated.
    59  	FacebookMessenger *interface{} `json:"facebook_messenger,omitempty"`
    60  	// Deprecated.
    61  	Alexa *interface{} `json:"alexa,omitempty"`
    62  }