tencentcloud-sdk-nodejs-intl-en
Version:
1,881 lines (1,578 loc) • 124 kB
JavaScript
/*
* Copyright (c) 2018 Tencent. 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License 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.
*/
const AbstractModel = require("../../common/abstract_model");
/**
* Email sending task data
* @class
*/
class SendTaskData extends AbstractModel {
constructor(){
super();
/**
* Task ID
* @type {number || null}
*/
this.TaskId = null;
/**
* Sender address
* @type {string || null}
*/
this.FromEmailAddress = null;
/**
* Recipient group ID
* @type {number || null}
*/
this.ReceiverId = null;
/**
* Task status. `1`: to start; `5`: sending; `6`: sending suspended today; `7`: sending error; `10`: sent
* @type {number || null}
*/
this.TaskStatus = null;
/**
* Task type. `1`: immediate; `2`: scheduled; `3`: recurring
* @type {number || null}
*/
this.TaskType = null;
/**
* Number of emails requested to be sent
* @type {number || null}
*/
this.RequestCount = null;
/**
* Number of emails sent
* @type {number || null}
*/
this.SendCount = null;
/**
* Number of emails cached
* @type {number || null}
*/
this.CacheCount = null;
/**
* Task creation time
* @type {string || null}
*/
this.CreateTime = null;
/**
* Task update time
* @type {string || null}
*/
this.UpdateTime = null;
/**
* Email subject
* @type {string || null}
*/
this.Subject = null;
/**
* Template and template data.
* @type {Template || null}
*/
this.Template = null;
/**
* Parameters of a recurring task
Note: This field may return `null`, indicating that no valid value can be found.
* @type {CycleEmailParam || null}
*/
this.CycleParam = null;
/**
* Parameters of a scheduled task
Note: This field may return `null`, indicating that no valid value can be found.
* @type {TimedEmailParam || null}
*/
this.TimedParam = null;
/**
* Task exception information.
* @type {string || null}
*/
this.ErrMsg = null;
/**
* Recipient group name
* @type {string || null}
*/
this.ReceiversName = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TaskId = 'TaskId' in params ? params.TaskId : null;
this.FromEmailAddress = 'FromEmailAddress' in params ? params.FromEmailAddress : null;
this.ReceiverId = 'ReceiverId' in params ? params.ReceiverId : null;
this.TaskStatus = 'TaskStatus' in params ? params.TaskStatus : null;
this.TaskType = 'TaskType' in params ? params.TaskType : null;
this.RequestCount = 'RequestCount' in params ? params.RequestCount : null;
this.SendCount = 'SendCount' in params ? params.SendCount : null;
this.CacheCount = 'CacheCount' in params ? params.CacheCount : null;
this.CreateTime = 'CreateTime' in params ? params.CreateTime : null;
this.UpdateTime = 'UpdateTime' in params ? params.UpdateTime : null;
this.Subject = 'Subject' in params ? params.Subject : null;
if (params.Template) {
let obj = new Template();
obj.deserialize(params.Template)
this.Template = obj;
}
if (params.CycleParam) {
let obj = new CycleEmailParam();
obj.deserialize(params.CycleParam)
this.CycleParam = obj;
}
if (params.TimedParam) {
let obj = new TimedEmailParam();
obj.deserialize(params.TimedParam)
this.TimedParam = obj;
}
this.ErrMsg = 'ErrMsg' in params ? params.ErrMsg : null;
this.ReceiversName = 'ReceiversName' in params ? params.ReceiversName : null;
}
}
/**
* Template information, including template ID, template variable parameters, etc.
* @class
*/
class Template extends AbstractModel {
constructor(){
super();
/**
* Template ID. If you don’t have any template, please create one.
* @type {number || null}
*/
this.TemplateID = null;
/**
* Variable parameters in the template. Please use `json.dump` to format the JSON object into a string type. The object is a set of key-value pairs. Each key denotes a variable, which is represented by {{key}}. The key will be replaced with the corresponding value (represented by {{value}}) when sending the email.
Note: The parameter value cannot be data of a complex type such as HTML.
Example: {"name":"xxx","age":"xx"}
* @type {string || null}
*/
this.TemplateData = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TemplateID = 'TemplateID' in params ? params.TemplateID : null;
this.TemplateData = 'TemplateData' in params ? params.TemplateData : null;
}
}
/**
* ListAddressUnsubscribeConfig request structure.
* @class
*/
class ListAddressUnsubscribeConfigRequest extends AbstractModel {
constructor(){
super();
/**
* Offset.
* @type {number || null}
*/
this.Offset = null;
/**
* specifies the maximum number of entries to retrieve, with a cap of 100.
* @type {string || null}
*/
this.Limit = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Offset = 'Offset' in params ? params.Offset : null;
this.Limit = 'Limit' in params ? params.Limit : null;
}
}
/**
* Describes sender information.
* @class
*/
class EmailSender extends AbstractModel {
constructor(){
super();
/**
* Sender address.
* @type {string || null}
*/
this.EmailAddress = null;
/**
* Sender alias.
* @type {string || null}
*/
this.EmailSenderName = null;
/**
* Creation time.
* @type {number || null}
*/
this.CreatedTimestamp = null;
/**
* smtp password type. 0=not set. 1=already set up.
* @type {number || null}
*/
this.SmtpPwdType = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.EmailAddress = 'EmailAddress' in params ? params.EmailAddress : null;
this.EmailSenderName = 'EmailSenderName' in params ? params.EmailSenderName : null;
this.CreatedTimestamp = 'CreatedTimestamp' in params ? params.CreatedTimestamp : null;
this.SmtpPwdType = 'SmtpPwdType' in params ? params.SmtpPwdType : null;
}
}
/**
* BatchSendEmail response structure.
* @class
*/
class BatchSendEmailResponse extends AbstractModel {
constructor(){
super();
/**
* <p>Send task ID</p>
* @type {number || null}
*/
this.TaskId = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TaskId = 'TaskId' in params ? params.TaskId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DeleteEmailIdentity request structure.
* @class
*/
class DeleteEmailIdentityRequest extends AbstractModel {
constructor(){
super();
/**
* Sender domain.
* @type {string || null}
*/
this.EmailIdentity = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.EmailIdentity = 'EmailIdentity' in params ? params.EmailIdentity : null;
}
}
/**
* CreateCustomBlacklist response structure.
* @class
*/
class CreateCustomBlacklistResponse extends AbstractModel {
constructor(){
super();
/**
* Total number of recipients.
* @type {number || null}
*/
this.TotalCount = null;
/**
* Actual uploaded quantity.
* @type {number || null}
*/
this.ValidCount = null;
/**
* Data too long quantity.
* @type {number || null}
*/
this.TooLongCount = null;
/**
* Repetition count.
* @type {number || null}
*/
this.RepeatCount = null;
/**
* Incorrect format count.
* @type {number || null}
*/
this.InvalidCount = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TotalCount = 'TotalCount' in params ? params.TotalCount : null;
this.ValidCount = 'ValidCount' in params ? params.ValidCount : null;
this.TooLongCount = 'TooLongCount' in params ? params.TooLongCount : null;
this.RepeatCount = 'RepeatCount' in params ? params.RepeatCount : null;
this.InvalidCount = 'InvalidCount' in params ? params.InvalidCount : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* UpdateAddressUnsubscribeConfig response structure.
* @class
*/
class UpdateAddressUnsubscribeConfigResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* CreateReceiver request structure.
* @class
*/
class CreateReceiverRequest extends AbstractModel {
constructor(){
super();
/**
* Recipient group name
* @type {string || null}
*/
this.ReceiversName = null;
/**
* Recipient group description
* @type {string || null}
*/
this.Desc = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.ReceiversName = 'ReceiversName' in params ? params.ReceiversName : null;
this.Desc = 'Desc' in params ? params.Desc : null;
}
}
/**
* Template content, which must include at least one of TEXT and HTML. A combination of TEXT and HTML is recommended.
* @class
*/
class TemplateContent extends AbstractModel {
constructor(){
super();
/**
* HTML code after base64 encoding.
* @type {string || null}
*/
this.Html = null;
/**
* Text content after base64 encoding.
* @type {string || null}
*/
this.Text = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Html = 'Html' in params ? params.Html : null;
this.Text = 'Text' in params ? params.Text : null;
}
}
/**
* Email blocklist structure describes the blocked email address, blocklist time, and reason.
* @class
*/
class BlackEmailAddress extends AbstractModel {
constructor(){
super();
/**
* Time when the email address is blocklisted.
* @type {string || null}
*/
this.BounceTime = null;
/**
* Blocklisted email address.
* @type {string || null}
*/
this.EmailAddress = null;
/**
* Reason for being blacklisted.
* @type {string || null}
*/
this.IspDesc = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.BounceTime = 'BounceTime' in params ? params.BounceTime : null;
this.EmailAddress = 'EmailAddress' in params ? params.EmailAddress : null;
this.IspDesc = 'IspDesc' in params ? params.IspDesc : null;
}
}
/**
* Email content, which can be plain text (TEXT), pure code (HTML), or a combination of TEXT and HTML (recommended).
* @class
*/
class Simple extends AbstractModel {
constructor(){
super();
/**
* HTML code after base64 encoding. To ensure correct display, this parameter should include all code information and cannot contain external CSS.
* @type {string || null}
*/
this.Html = null;
/**
* Plain text content after base64 encoding. If HTML is not involved, the plain text will be displayed in the email. Otherwise, this parameter represents the plain text style of the email.
* @type {string || null}
*/
this.Text = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Html = 'Html' in params ? params.Html : null;
this.Text = 'Text' in params ? params.Text : null;
}
}
/**
* CreateEmailAddress request structure.
* @class
*/
class CreateEmailAddressRequest extends AbstractModel {
constructor(){
super();
/**
* Your sender address. (You can create up to 10 sender addresses for each domain.)
* @type {string || null}
*/
this.EmailAddress = null;
/**
* Sender name.
* @type {string || null}
*/
this.EmailSenderName = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.EmailAddress = 'EmailAddress' in params ? params.EmailAddress : null;
this.EmailSenderName = 'EmailSenderName' in params ? params.EmailSenderName : null;
}
}
/**
* CreateReceiverDetail request structure.
* @class
*/
class CreateReceiverDetailRequest extends AbstractModel {
constructor(){
super();
/**
* Recipient group ID
* @type {number || null}
*/
this.ReceiverId = null;
/**
* Email address
* @type {Array.<string> || null}
*/
this.Emails = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.ReceiverId = 'ReceiverId' in params ? params.ReceiverId : null;
this.Emails = 'Emails' in params ? params.Emails : null;
}
}
/**
* UpdateEmailTemplate response structure.
* @class
*/
class UpdateEmailTemplateResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* CreateReceiverDetailWithData request structure.
* @class
*/
class CreateReceiverDetailWithDataRequest extends AbstractModel {
constructor(){
super();
/**
* Recipient list ID.
* @type {number || null}
*/
this.ReceiverId = null;
/**
* Recipient mailbox and template parameters in array format. limit on the number of recipients not exceeding 20000.
* @type {Array.<ReceiverInputData> || null}
*/
this.Datas = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.ReceiverId = 'ReceiverId' in params ? params.ReceiverId : null;
if (params.Datas) {
this.Datas = new Array();
for (let z in params.Datas) {
let obj = new ReceiverInputData();
obj.deserialize(params.Datas[z]);
this.Datas.push(obj);
}
}
}
}
/**
* Time parameter required to create a scheduled sending task, such as the start time
* @class
*/
class TimedEmailParam extends AbstractModel {
constructor(){
super();
/**
* Start time of a scheduled sending task
* @type {string || null}
*/
this.BeginTime = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.BeginTime = 'BeginTime' in params ? params.BeginTime : null;
}
}
/**
* Describes the domain name, record type, expected value, and currently configured value of DNS records.
* @class
*/
class DNSAttributes extends AbstractModel {
constructor(){
super();
/**
* Record types: CNAME, A, TXT, and MX.
* @type {string || null}
*/
this.Type = null;
/**
* Domain name.
* @type {string || null}
*/
this.SendDomain = null;
/**
* Expected value.
* @type {string || null}
*/
this.ExpectedValue = null;
/**
* Currently configured value.
* @type {string || null}
*/
this.CurrentValue = null;
/**
* Approved or not. The default value is `false`.
* @type {boolean || null}
*/
this.Status = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Type = 'Type' in params ? params.Type : null;
this.SendDomain = 'SendDomain' in params ? params.SendDomain : null;
this.ExpectedValue = 'ExpectedValue' in params ? params.ExpectedValue : null;
this.CurrentValue = 'CurrentValue' in params ? params.CurrentValue : null;
this.Status = 'Status' in params ? params.Status : null;
}
}
/**
* Describes the email sending status
* @class
*/
class SendEmailStatus extends AbstractModel {
constructor(){
super();
/**
* The `MessageId` field returned by the `SendEmail` API
* @type {string || null}
*/
this.MessageId = null;
/**
* Recipient email address
* @type {string || null}
*/
this.ToEmailAddress = null;
/**
* Sender email address
* @type {string || null}
*/
this.FromEmailAddress = null;
/**
* Tencent Cloud processing status
0: Successful.
1001: Internal system exception.
1002: Internal system exception.
1003: Internal system exception.
1003: Internal system exception.
1004: Email sending timed out.
1005: Internal system exception.
1006: You have sent too many emails to the same address in a short period.
1007: The email address is in the blocklist.
1008: The sender domain is rejected by the recipient.
1009: Internal system exception.
1010: The daily email sending limit is exceeded.
1011: You have no permission to send custom content. Use a template.
1013: The sender domain is unsubscribed from by the recipient.
2001: No results were found.
3007: The template ID is invalid or the template is unavailable.
3008: The sender domain is temporarily blocked by the recipient domain.
3009: You have no permission to use this template.
3010: The format of the `TemplateData` field is incorrect.
3014: The email cannot be sent because the sender domain is not verified.
3020: The recipient email address is in the blocklist.
3024: Failed to precheck the email address format.
3030: Email sending is restricted temporarily due to a high bounce rate.
3033: The account has insufficient balance or overdue payment.
* @type {number || null}
*/
this.SendStatus = null;
/**
* Recipient processing status
0: Tencent Cloud has accepted the request and added it to the send queue.
1: The email is delivered successfully. `DeliverTime` indicates the time when the email is delivered successfully.
2: The email is discarded. `DeliverMessage` indicates the reason for discarding.
3: The recipient's ESP rejects the email, probably because the email address does not exist or due to other reasons.
8: The email is delayed by the ESP. `DeliverMessage` indicates the reason for delay.
* @type {number || null}
*/
this.DeliverStatus = null;
/**
* Description of the recipient processing status
* @type {string || null}
*/
this.DeliverMessage = null;
/**
* Timestamp when the request arrives at Tencent Cloud
* @type {number || null}
*/
this.RequestTime = null;
/**
* Timestamp when Tencent Cloud delivers the email
* @type {number || null}
*/
this.DeliverTime = null;
/**
* Whether the recipient has opened the email
* @type {boolean || null}
*/
this.UserOpened = null;
/**
* Whether the recipient has clicked the links in the email
* @type {boolean || null}
*/
this.UserClicked = null;
/**
* Whether the recipient has unsubscribed from the email sent by the sender
* @type {boolean || null}
*/
this.UserUnsubscribed = null;
/**
* Whether the recipient has reported the sender
* @type {boolean || null}
*/
this.UserComplainted = null;
/**
* Whether the user reports the sender.
* @type {boolean || null}
*/
this.UserComplained = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.MessageId = 'MessageId' in params ? params.MessageId : null;
this.ToEmailAddress = 'ToEmailAddress' in params ? params.ToEmailAddress : null;
this.FromEmailAddress = 'FromEmailAddress' in params ? params.FromEmailAddress : null;
this.SendStatus = 'SendStatus' in params ? params.SendStatus : null;
this.DeliverStatus = 'DeliverStatus' in params ? params.DeliverStatus : null;
this.DeliverMessage = 'DeliverMessage' in params ? params.DeliverMessage : null;
this.RequestTime = 'RequestTime' in params ? params.RequestTime : null;
this.DeliverTime = 'DeliverTime' in params ? params.DeliverTime : null;
this.UserOpened = 'UserOpened' in params ? params.UserOpened : null;
this.UserClicked = 'UserClicked' in params ? params.UserClicked : null;
this.UserUnsubscribed = 'UserUnsubscribed' in params ? params.UserUnsubscribed : null;
this.UserComplainted = 'UserComplainted' in params ? params.UserComplainted : null;
this.UserComplained = 'UserComplained' in params ? params.UserComplained : null;
}
}
/**
* ListAddressUnsubscribeConfig response structure.
* @class
*/
class ListAddressUnsubscribeConfigResponse extends AbstractModel {
constructor(){
super();
/**
* Address-Level unsubscribe configuration.
* @type {Array.<AddressUnsubscribeConfigData> || null}
*/
this.AddressUnsubscribeConfigList = null;
/**
* Total number.
* @type {number || null}
*/
this.Total = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.AddressUnsubscribeConfigList) {
this.AddressUnsubscribeConfigList = new Array();
for (let z in params.AddressUnsubscribeConfigList) {
let obj = new AddressUnsubscribeConfigData();
obj.deserialize(params.AddressUnsubscribeConfigList[z]);
this.AddressUnsubscribeConfigList.push(obj);
}
}
this.Total = 'Total' in params ? params.Total : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* SendEmail request structure.
* @class
*/
class SendEmailRequest extends AbstractModel {
constructor(){
super();
/**
* <p>Sender's email address. If no alias is used, enter the sender's email address directly, for example: noreply@mail.qcloud.com. To use a sender alias, follow this format (note that a space must be used between the alias and the email address): alias+space+<email address>. The alias cannot contain a colon (:).</p>
* @type {string || null}
*/
this.FromEmailAddress = null;
/**
* <p>Email Subject</p><p>When using templates to send, support using template variable parameters for population.</p>
* @type {string || null}
*/
this.Subject = null;
/**
* <p>Recipient email address, supports up to 50 recipients in mass sending. Note: The email content displays all recipient addresses. For non-mass sending, call the API multiple times to send.<br>At least one of the three parameters Destination/Cc/Bcc must exist.</p>
* @type {Array.<string> || null}
*/
this.Destination = null;
/**
* <p>The "reply" email address of the mail. Can be filled with a mailbox address where you can receive emails, which can be a personal mailbox. If left empty, the recipient's reply mail will fail to send.</p>
* @type {string || null}
*/
this.ReplyToAddresses = null;
/**
* <p>Email address of CC recipients, supports up to 20 carbon copies.</p>
* @type {Array.<string> || null}
*/
this.Cc = null;
/**
* <p>Bcc email address, supports up to 20 carbon copies. Bcc and Destination must be unique.</p>
* @type {Array.<string> || null}
*/
this.Bcc = null;
/**
* <p>Fill in the template parameters when sending with a template.</p><blockquote class="rno-document-tips rno-document-tips-notice"> <div class="rno-document-tips-body"> <i class="rno-document-tip-icon"></i> <div class="rno-document-tip-title">Note</div> <div class="rno-document-tip-desc"><p>This field must be specified if you have not applied for special configuration</p></div> </div></blockquote>
* @type {Template || null}
*/
this.Template = null;
/**
* <p>Abandoned</p><blockquote class="rno-document-tips rno-document-tips-notice"> <div class="rno-document-tips-body"> <i class="rno-document-tip-icon"></i> <div class="rno-document-tip-title">Description</div> <div class="rno-document-tip-desc"><p>Only customers who historically applied for special configuration require the use of this. If you have not applied for special configuration, this field does not exist.</p></div> </div></blockquote>
* @type {Simple || null}
*/
this.Simple = null;
/**
* <p>To send an attachment, fill in the relevant parameters. The Tencent Cloud API request supports a maximum of 8M request packet. The attachment content is expected to expand by 1.5 times after Base64 encoding. The total size of all attachments should not exceed 4M. The API will return an error if the overall request exceeds 8M.</p>
* @type {Array.<Attachment> || null}
*/
this.Attachments = null;
/**
* Unsubscription link options 0: do not add unsubscription link 1: english 2: simplified chinese 3: traditional chinese 4: spanish 5: french 6: german 7: japanese 8: korean 9: arabic 10: thai 11: indonesian.
* @type {string || null}
*/
this.Unsubscribe = null;
/**
* <p>Mail trigger type 0: Non-trigger class, default type, select this type for marketing email, non-instant mail. 1: Trigger class, instant delivery mail such as verification code. If the mail exceeds a certain size, the system will automatically select a non-trigger type channel.</p>
* @type {number || null}
*/
this.TriggerType = null;
/**
* <p>Message-Id field in the smtp header</p>
* @type {string || null}
*/
this.SmtpMessageId = null;
/**
* <p>Other fields that can be set in the smtp header</p>
* @type {string || null}
*/
this.SmtpHeaders = null;
/**
* <p>The from field in the smtp header. The domain name should be consistent with the FromEmailAddress.</p>
* @type {string || null}
*/
this.HeaderFrom = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.FromEmailAddress = 'FromEmailAddress' in params ? params.FromEmailAddress : null;
this.Subject = 'Subject' in params ? params.Subject : null;
this.Destination = 'Destination' in params ? params.Destination : null;
this.ReplyToAddresses = 'ReplyToAddresses' in params ? params.ReplyToAddresses : null;
this.Cc = 'Cc' in params ? params.Cc : null;
this.Bcc = 'Bcc' in params ? params.Bcc : null;
if (params.Template) {
let obj = new Template();
obj.deserialize(params.Template)
this.Template = obj;
}
if (params.Simple) {
let obj = new Simple();
obj.deserialize(params.Simple)
this.Simple = obj;
}
if (params.Attachments) {
this.Attachments = new Array();
for (let z in params.Attachments) {
let obj = new Attachment();
obj.deserialize(params.Attachments[z]);
this.Attachments.push(obj);
}
}
this.Unsubscribe = 'Unsubscribe' in params ? params.Unsubscribe : null;
this.TriggerType = 'TriggerType' in params ? params.TriggerType : null;
this.SmtpMessageId = 'SmtpMessageId' in params ? params.SmtpMessageId : null;
this.SmtpHeaders = 'SmtpHeaders' in params ? params.SmtpHeaders : null;
this.HeaderFrom = 'HeaderFrom' in params ? params.HeaderFrom : null;
}
}
/**
* UpdateEmailIdentity request structure.
* @class
*/
class UpdateEmailIdentityRequest extends AbstractModel {
constructor(){
super();
/**
* <p>Domain name for request verification</p>
* @type {string || null}
*/
this.EmailIdentity = null;
/**
* <p>Match the new and old APIs in the console</p>
* @type {boolean || null}
*/
this.NewAPI = null;
/**
* <p>dkim digits</p><p>Enumeration value:</p><ul><li>0: 1024</li><li>1: 2048</li><li>2: Dual signature</li></ul>
* @type {number || null}
*/
this.DKIMOption = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.EmailIdentity = 'EmailIdentity' in params ? params.EmailIdentity : null;
this.NewAPI = 'NewAPI' in params ? params.NewAPI : null;
this.DKIMOption = 'DKIMOption' in params ? params.DKIMOption : null;
}
}
/**
* DeleteEmailIdentity response structure.
* @class
*/
class DeleteEmailIdentityResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DeleteBlackList request structure.
* @class
*/
class DeleteBlackListRequest extends AbstractModel {
constructor(){
super();
/**
* List of email addresses to be unblocklisted. Enter at least one address.
* @type {Array.<string> || null}
*/
this.EmailAddressList = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.EmailAddressList = 'EmailAddressList' in params ? params.EmailAddressList : null;
}
}
/**
* DeleteEmailTemplate response structure.
* @class
*/
class DeleteEmailTemplateResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ListCustomBlacklist request structure.
* @class
*/
class ListCustomBlacklistRequest extends AbstractModel {
constructor(){
super();
/**
* Offset, int, starts from 0.
* @type {number || null}
*/
this.Offset = null;
/**
* Number limit, int, no more than 100.
* @type {number || null}
*/
this.Limit = null;
/**
* Filter the state of the blocklist. valid values: 0 (expired), 1 (active), 2 (all).
* @type {number || null}
*/
this.Status = null;
/**
* Email address in blocklist.
* @type {string || null}
*/
this.Email = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Offset = 'Offset' in params ? params.Offset : null;
this.Limit = 'Limit' in params ? params.Limit : null;
this.Status = 'Status' in params ? params.Status : null;
this.Email = 'Email' in params ? params.Email : null;
}
}
/**
* DeleteEmailTemplate request structure.
* @class
*/
class DeleteEmailTemplateRequest extends AbstractModel {
constructor(){
super();
/**
* Template ID
* @type {number || null}
*/
this.TemplateID = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TemplateID = 'TemplateID' in params ? params.TemplateID : null;
}
}
/**
* Reported spam data.
* @class
*/
class AbuseReport extends AbstractModel {
constructor(){
super();
/**
* <p>Send time</p>
* @type {string || null}
*/
this.DeliverTime = null;
/**
* <p>Sender address</p>
* @type {string || null}
*/
this.OriginalMailFrom = null;
/**
* <p>Receive email address</p>
* @type {string || null}
*/
this.OriginalRcptTo = null;
/**
* <p>Sender domain name</p>
* @type {string || null}
*/
this.FromDomain = null;
/**
* <p>Complaint time</p>
* @type {string || null}
*/
this.ComplainTime = null;
/**
* <p>Recipient domain name</p>
* @type {string || null}
*/
this.Mta = null;
/**
* <p>Source ip</p>
* @type {string || null}
*/
this.SourceIp = null;
/**
* <p>Data time</p>
* @type {string || null}
*/
this.InsertTime = null;
/**
* <p>Template ID</p>
* @type {string || null}
*/
this.TemplateId = null;
/**
* <p>bulkId</p>
* @type {string || null}
*/
this.BulkId = null;
/**
* <p>Message-Id of the mail</p>
* @type {string || null}
*/
this.MessageId = null;
/**
* <p>Complaint time</p>
* @type {string || null}
*/
this.AbuseTime = null;
/**
* <p>Email Subject</p>
* @type {string || null}
*/
this.Subject = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DeliverTime = 'DeliverTime' in params ? params.DeliverTime : null;
this.OriginalMailFrom = 'OriginalMailFrom' in params ? params.OriginalMailFrom : null;
this.OriginalRcptTo = 'OriginalRcptTo' in params ? params.OriginalRcptTo : null;
this.FromDomain = 'FromDomain' in params ? params.FromDomain : null;
this.ComplainTime = 'ComplainTime' in params ? params.ComplainTime : null;
this.Mta = 'Mta' in params ? params.Mta : null;
this.SourceIp = 'SourceIp' in params ? params.SourceIp : null;
this.InsertTime = 'InsertTime' in params ? params.InsertTime : null;
this.TemplateId = 'TemplateId' in params ? params.TemplateId : null;
this.BulkId = 'BulkId' in params ? params.BulkId : null;
this.MessageId = 'MessageId' in params ? params.MessageId : null;
this.AbuseTime = 'AbuseTime' in params ? params.AbuseTime : null;
this.Subject = 'Subject' in params ? params.Subject : null;
}
}
/**
* ListEmailTemplates request structure.
* @class
*/
class ListEmailTemplatesRequest extends AbstractModel {
constructor(){
super();
/**
* Number of templates to get. This parameter is used for pagination.
* @type {number || null}
*/
this.Limit = null;
/**
* Template offset to get. This parameter is used for pagination.
* @type {number || null}
*/
this.Offset = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Limit = 'Limit' in params ? params.Limit : null;
this.Offset = 'Offset' in params ? params.Offset : null;
}
}
/**
* GetAbuseReport response structure.
* @class
*/
class GetAbuseReportResponse extends AbstractModel {
constructor(){
super();
/**
* Log data.
* @type {Array.<AbuseReport> || null}
*/
this.Data = null;
/**
* Total quantity.
* @type {number || null}
*/
this.TotalCount = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.Data) {
this.Data = new Array();
for (let z in params.Data) {
let obj = new AbuseReport();
obj.deserialize(params.Data[z]);
this.Data.push(obj);
}
}
this.TotalCount = 'TotalCount' in params ? params.TotalCount : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Recipient details input parameter, including recipient email and template parameter.
* @class
*/
class ReceiverInputData extends AbstractModel {
constructor(){
super();
/**
* Recipient email.
* @type {string || null}
*/
this.Email = null;
/**
* For variable parameters in template, please use json.dump to format the json object into string type. the object is a set of Key-value pairs. each Key represents a variable in template. variable usage in template is represented by {{Key}}. the appropriate value will be replaced with {{value}} when sent.
Note: the parameter value cannot be data of complex type such as html. the entire JSON structure of TemplateData has a length limit of 800 bytes.
* @type {string || null}
*/
this.TemplateData = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Email = 'Email' in params ? params.Email : null;
this.TemplateData = 'TemplateData' in params ? params.TemplateData : null;
}
}
/**
* Recipient list details.
* @class
*/
class ReceiverDetail extends AbstractModel {
constructor(){
super();
/**
* Recipient's address.
* @type {string || null}
*/
this.Email = null;
/**
* Creation time.
* @type {string || null}
*/
this.CreateTime = null;
/**
* Template parameter.
* @type {string || null}
*/
this.TemplateData = null;
/**
* Invalid reason.
* @type {string || null}
*/
this.Reason = null;
/**
* 1: valid; 2: invalid.
* @type {number || null}
*/
this.Status = null;
/**
* Recipient address id.
* @type {number || null}
*/
this.EmailId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Email = 'Email' in params ? params.Email : null;
this.CreateTime = 'CreateTime' in params ? params.CreateTime : null;
this.TemplateData = 'TemplateData' in params ? params.TemplateData : null;
this.Reason = 'Reason' in params ? params.Reason : null;
this.Status = 'Status' in params ? params.Status : null;
this.EmailId = 'EmailId' in params ? params.EmailId : null;
}
}
/**
* ListBlackEmailAddress response structure.
* @class
*/
class ListBlackEmailAddressResponse extends AbstractModel {
constructor(){
super();
/**
* List of blocklisted addresses.
* @type {Array.<BlackEmailAddress> || null}
*/
this.BlackList = null;
/**
* Total number of blocklisted addresses.
* @type {number || null}
*/
this.TotalCount = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.BlackList) {
this.BlackList = new Array();
for (let z in params.BlackList) {
let obj = new BlackEmailAddress();
obj.deserialize(params.BlackList[z]);
this.BlackList.push(obj);
}
}
this.TotalCount = 'TotalCount' in params ? params.TotalCount : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ListEmailIdentities response structure.
* @class
*/
class ListEmailIdentitiesResponse extends AbstractModel {
constructor(){
super();
/**
* List of sender domains.
* @type {Array.<EmailIdentity> || null}
*/
this.EmailIdentities = null;
/**
* Maximum reputation level
* @type {number || null}
*/
this.MaxReputationLevel = null;
/**
* Maximum number of emails sent per domain name
* @type {number || null}
*/
this.MaxDailyQuota = null;
/**
* Total number.
* @type {number || null}
*/
this.Total = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.EmailIdentities) {
this.EmailIdentities = new Array();
for (let z in params.EmailIdentities) {
let obj = new EmailIdentity();
obj.deserialize(params.EmailIdentities[z]);
this.EmailIdentities.push(obj);
}
}
this.MaxReputationLevel = 'MaxReputationLevel' in params ? params.MaxReputationLevel : null;
this.MaxDailyQuota = 'MaxDailyQuota' in params ? params.MaxDailyQuota : null;
this.Total = 'Total' in params ? params.Total : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* UpdateCustomBlackList request structure.
* @class
*/
class UpdateCustomBlackListRequest extends AbstractModel {
constructor(){
super();
/**
* Blocklist id that needs to change.
* @type {number || null}
*/
this.Id = null;
/**
* After modification email address.
* @type {string || null}
*/
this.Email = null;
/**
* Expiration time. if left empty, it indicates permanent validity.
* @type {string || null}
*/
this.ExpireDate = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Id = 'Id' in params ? params.Id : null;
this.Email = 'Email' in params ? params.Email : null;
this.ExpireDate = 'ExpireDate' in params ? params.ExpireDate : null;
}
}
/**
* UpdateEmailSmtpPassWord request structure.
* @class
*/
class UpdateEmailSmtpPassWordRequest extends AbstractModel {
constructor(){
super();
/**
* SMTP password. Length limit: 64.
* @type {string || null}
*/
this.Password = null;
/**
* Email address. Length limit: 128.
* @type {string || null}
*/
this.EmailAddress = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Password = 'Password' in params ? params.Password : null;
this.EmailAddress = 'EmailAddress' in params ? params.EmailAddress : null;
}
}
/**
* DeleteCustomBlackList request structure.
* @class
*/
class DeleteCustomBlackListRequest extends AbstractModel {
constructor(){
super();
/**
* Email address that needs to be deleted.
* @type {Array.<string> || null}
*/
this.Emails = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Emails = 'Emails' in params ? params.Emails : null;
}
}
/**
* UpdateAddressUnsubscribeConfig request structure.
* @class
*/
class UpdateAddressUnsubscribeConfigRequest extends AbstractModel {
constructor(){
super();
/**
* Sender address.
* @type {string || null}
*/
this.Address = null;
/**
* Unsubscribe link option. 0: Do not add unsubscribe