/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the pinpoint-sms-voice-v2-2022-03-31.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.PinpointSMSVoiceV2.Model { /// /// Container for the parameters to the SendTextMessage operation. /// Creates a new text message and sends it to a recipient's phone number. /// /// /// /// SMS throughput limits are measured in Message Parts per Second (MPS). Your MPS limit /// depends on the destination country of your messages, as well as the type of phone /// number (origination number) that you use to send the message. For more information, /// see Message /// Parts per Second (MPS) limits in the Amazon Pinpoint User Guide. /// /// public partial class SendTextMessageRequest : AmazonPinpointSMSVoiceV2Request { private string _configurationSetName; private Dictionary _context = new Dictionary(); private Dictionary _destinationCountryParameters = new Dictionary(); private string _destinationPhoneNumber; private bool? _dryRun; private string _keyword; private string _maxPrice; private string _messageBody; private MessageType _messageType; private string _originationIdentity; private int? _timeToLive; /// /// Gets and sets the property ConfigurationSetName. /// /// The name of the configuration set to use. This can be either the ConfigurationSetName /// or ConfigurationSetArn. /// /// [AWSProperty(Min=1, Max=256)] public string ConfigurationSetName { get { return this._configurationSetName; } set { this._configurationSetName = value; } } // Check to see if ConfigurationSetName property is set internal bool IsSetConfigurationSetName() { return this._configurationSetName != null; } /// /// Gets and sets the property Context. /// /// You can specify custom data in this field. If you do, that data is logged to the event /// destination. /// /// [AWSProperty(Min=0, Max=5)] public Dictionary Context { get { return this._context; } set { this._context = value; } } // Check to see if Context property is set internal bool IsSetContext() { return this._context != null && this._context.Count > 0; } /// /// Gets and sets the property DestinationCountryParameters. /// /// This field is used for any country-specific registration requirements. Currently, /// this setting is only used when you send messages to recipients in India using a sender /// ID. For more information see Special /// requirements for sending SMS messages to recipients in India. /// /// [AWSProperty(Min=0, Max=10)] public Dictionary DestinationCountryParameters { get { return this._destinationCountryParameters; } set { this._destinationCountryParameters = value; } } // Check to see if DestinationCountryParameters property is set internal bool IsSetDestinationCountryParameters() { return this._destinationCountryParameters != null && this._destinationCountryParameters.Count > 0; } /// /// Gets and sets the property DestinationPhoneNumber. /// /// The destination phone number in E.164 format. /// /// [AWSProperty(Required=true, Min=1, Max=20)] public string DestinationPhoneNumber { get { return this._destinationPhoneNumber; } set { this._destinationPhoneNumber = value; } } // Check to see if DestinationPhoneNumber property is set internal bool IsSetDestinationPhoneNumber() { return this._destinationPhoneNumber != null; } /// /// Gets and sets the property DryRun. /// /// When set to true, the message is checked and validated, but isn't sent to the end /// recipient. /// /// public bool DryRun { get { return this._dryRun.GetValueOrDefault(); } set { this._dryRun = value; } } // Check to see if DryRun property is set internal bool IsSetDryRun() { return this._dryRun.HasValue; } /// /// Gets and sets the property Keyword. /// /// When you register a short code in the US, you must specify a program name. If you /// don’t have a US short code, omit this attribute. /// /// [AWSProperty(Min=1, Max=30)] public string Keyword { get { return this._keyword; } set { this._keyword = value; } } // Check to see if Keyword property is set internal bool IsSetKeyword() { return this._keyword != null; } /// /// Gets and sets the property MaxPrice. /// /// The maximum amount that you want to spend, in US dollars, per each text message part. /// A text message can contain multiple parts. /// /// [AWSProperty(Min=2, Max=8)] public string MaxPrice { get { return this._maxPrice; } set { this._maxPrice = value; } } // Check to see if MaxPrice property is set internal bool IsSetMaxPrice() { return this._maxPrice != null; } /// /// Gets and sets the property MessageBody. /// /// The body of the text message. /// /// [AWSProperty(Min=1, Max=1600)] public string MessageBody { get { return this._messageBody; } set { this._messageBody = value; } } // Check to see if MessageBody property is set internal bool IsSetMessageBody() { return this._messageBody != null; } /// /// Gets and sets the property MessageType. /// /// The type of message. Valid values are TRANSACTIONAL for messages that are critical /// or time-sensitive and PROMOTIONAL for messages that aren't critical or time-sensitive. /// /// public MessageType MessageType { get { return this._messageType; } set { this._messageType = value; } } // Check to see if MessageType property is set internal bool IsSetMessageType() { return this._messageType != null; } /// /// Gets and sets the property OriginationIdentity. /// /// The origination identity of the message. This can be either the PhoneNumber, PhoneNumberId, /// PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn. /// /// [AWSProperty(Min=1, Max=256)] public string OriginationIdentity { get { return this._originationIdentity; } set { this._originationIdentity = value; } } // Check to see if OriginationIdentity property is set internal bool IsSetOriginationIdentity() { return this._originationIdentity != null; } /// /// Gets and sets the property TimeToLive. /// /// How long the text message is valid for. By default this is 72 hours. /// /// [AWSProperty(Min=5, Max=259200)] public int TimeToLive { get { return this._timeToLive.GetValueOrDefault(); } set { this._timeToLive = value; } } // Check to see if TimeToLive property is set internal bool IsSetTimeToLive() { return this._timeToLive.HasValue; } } }