chengkun
2025-06-05 4080b5997b38ca84b3b203c7101dcadb97b76925
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<?php
/*
 * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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.
 */
namespace TencentCloud\Sms\V20210111\Models;
use TencentCloud\Common\AbstractModel;
 
/**
 * SendSms请求参数结构体
 *
 * @method array getPhoneNumberSet() 获取下发手机号码,采用 E.164 标准,格式为+[国家或地区码][手机号],单次请求最多支持200个手机号且要求全为境内手机号或全为境外手机号。
例如:+8618501234444, 其中前面有一个+号 ,86为国家码,18501234444为手机号。
注:发送国内短信格式还支持0086、86或无任何国家或地区码的11位手机号码,前缀默认为+86。
 * @method void setPhoneNumberSet(array $PhoneNumberSet) 设置下发手机号码,采用 E.164 标准,格式为+[国家或地区码][手机号],单次请求最多支持200个手机号且要求全为境内手机号或全为境外手机号。
例如:+8618501234444, 其中前面有一个+号 ,86为国家码,18501234444为手机号。
注:发送国内短信格式还支持0086、86或无任何国家或地区码的11位手机号码,前缀默认为+86。
 * @method string getSmsSdkAppId() 获取短信 SdkAppId,在 [短信控制台](https://console.cloud.tencent.com/smsv2/app-manage)  添加应用后生成的实际 SdkAppId,示例如1400006666。
 * @method void setSmsSdkAppId(string $SmsSdkAppId) 设置短信 SdkAppId,在 [短信控制台](https://console.cloud.tencent.com/smsv2/app-manage)  添加应用后生成的实际 SdkAppId,示例如1400006666。
 * @method string getTemplateId() 获取模板 ID,必须填写已审核通过的模板 ID。模板 ID 可前往 [国内短信](https://console.cloud.tencent.com/smsv2/csms-template) 或 [国际/港澳台短信](https://console.cloud.tencent.com/smsv2/isms-template) 的正文模板管理查看,若向境外手机号发送短信,仅支持使用国际/港澳台短信模板。
 * @method void setTemplateId(string $TemplateId) 设置模板 ID,必须填写已审核通过的模板 ID。模板 ID 可前往 [国内短信](https://console.cloud.tencent.com/smsv2/csms-template) 或 [国际/港澳台短信](https://console.cloud.tencent.com/smsv2/isms-template) 的正文模板管理查看,若向境外手机号发送短信,仅支持使用国际/港澳台短信模板。
 * @method string getSignName() 获取短信签名内容,使用 UTF-8 编码,必须填写已审核通过的签名,例如:腾讯云,签名信息可前往 [国内短信](https://console.cloud.tencent.com/smsv2/csms-sign) 或 [国际/港澳台短信](https://console.cloud.tencent.com/smsv2/isms-sign) 的签名管理查看。
<dx-alert infotype="notice" title="注意"><ul><li>发送国内短信该参数必填,且需填写签名内容而非签名ID。
</li><li>发送国际/港澳台短信该参数非必填。</li></ul></dx-alert>
 * @method void setSignName(string $SignName) 设置短信签名内容,使用 UTF-8 编码,必须填写已审核通过的签名,例如:腾讯云,签名信息可前往 [国内短信](https://console.cloud.tencent.com/smsv2/csms-sign) 或 [国际/港澳台短信](https://console.cloud.tencent.com/smsv2/isms-sign) 的签名管理查看。
<dx-alert infotype="notice" title="注意"><ul><li>发送国内短信该参数必填,且需填写签名内容而非签名ID。
</li><li>发送国际/港澳台短信该参数非必填。</li></ul></dx-alert>
 * @method array getTemplateParamSet() 获取模板参数,若无模板参数,则设置为空。
<dx-alert infotype="notice" title="注意">模板参数的个数需要与 TemplateId 对应模板的变量个数保持一致。</dx-alert>
 * @method void setTemplateParamSet(array $TemplateParamSet) 设置模板参数,若无模板参数,则设置为空。
<dx-alert infotype="notice" title="注意">模板参数的个数需要与 TemplateId 对应模板的变量个数保持一致。</dx-alert>
 * @method string getExtendCode() 获取短信码号扩展号,默认未开通,如需开通请联系 [腾讯云短信小助手](https://cloud.tencent.com/document/product/382/3773#.E6.8A.80.E6.9C.AF.E4.BA.A4.E6.B5.81)。
 * @method void setExtendCode(string $ExtendCode) 设置短信码号扩展号,默认未开通,如需开通请联系 [腾讯云短信小助手](https://cloud.tencent.com/document/product/382/3773#.E6.8A.80.E6.9C.AF.E4.BA.A4.E6.B5.81)。
 * @method string getSessionContext() 获取用户的 session 内容,可以携带用户侧 ID 等上下文信息,server 会原样返回。注意长度需小于512字节。
 * @method void setSessionContext(string $SessionContext) 设置用户的 session 内容,可以携带用户侧 ID 等上下文信息,server 会原样返回。注意长度需小于512字节。
 * @method string getSenderId() 获取国内短信无需填写该项;国际/港澳台短信已申请独立 SenderId 需要填写该字段,默认使用公共 SenderId,无需填写该字段。
注:月度使用量达到指定量级可申请独立 SenderId 使用,详情请联系 [腾讯云短信小助手](https://cloud.tencent.com/document/product/382/3773#.E6.8A.80.E6.9C.AF.E4.BA.A4.E6.B5.81)。
 * @method void setSenderId(string $SenderId) 设置国内短信无需填写该项;国际/港澳台短信已申请独立 SenderId 需要填写该字段,默认使用公共 SenderId,无需填写该字段。
注:月度使用量达到指定量级可申请独立 SenderId 使用,详情请联系 [腾讯云短信小助手](https://cloud.tencent.com/document/product/382/3773#.E6.8A.80.E6.9C.AF.E4.BA.A4.E6.B5.81)。
 */
class SendSmsRequest extends AbstractModel
{
    /**
     * @var array 下发手机号码,采用 E.164 标准,格式为+[国家或地区码][手机号],单次请求最多支持200个手机号且要求全为境内手机号或全为境外手机号。
例如:+8618501234444, 其中前面有一个+号 ,86为国家码,18501234444为手机号。
注:发送国内短信格式还支持0086、86或无任何国家或地区码的11位手机号码,前缀默认为+86。
     */
    public $PhoneNumberSet;
 
    /**
     * @var string 短信 SdkAppId,在 [短信控制台](https://console.cloud.tencent.com/smsv2/app-manage)  添加应用后生成的实际 SdkAppId,示例如1400006666。
     */
    public $SmsSdkAppId;
 
    /**
     * @var string 模板 ID,必须填写已审核通过的模板 ID。模板 ID 可前往 [国内短信](https://console.cloud.tencent.com/smsv2/csms-template) 或 [国际/港澳台短信](https://console.cloud.tencent.com/smsv2/isms-template) 的正文模板管理查看,若向境外手机号发送短信,仅支持使用国际/港澳台短信模板。
     */
    public $TemplateId;
 
    /**
     * @var string 短信签名内容,使用 UTF-8 编码,必须填写已审核通过的签名,例如:腾讯云,签名信息可前往 [国内短信](https://console.cloud.tencent.com/smsv2/csms-sign) 或 [国际/港澳台短信](https://console.cloud.tencent.com/smsv2/isms-sign) 的签名管理查看。
<dx-alert infotype="notice" title="注意"><ul><li>发送国内短信该参数必填,且需填写签名内容而非签名ID。
</li><li>发送国际/港澳台短信该参数非必填。</li></ul></dx-alert>
     */
    public $SignName;
 
    /**
     * @var array 模板参数,若无模板参数,则设置为空。
<dx-alert infotype="notice" title="注意">模板参数的个数需要与 TemplateId 对应模板的变量个数保持一致。</dx-alert>
     */
    public $TemplateParamSet;
 
    /**
     * @var string 短信码号扩展号,默认未开通,如需开通请联系 [腾讯云短信小助手](https://cloud.tencent.com/document/product/382/3773#.E6.8A.80.E6.9C.AF.E4.BA.A4.E6.B5.81)。
     */
    public $ExtendCode;
 
    /**
     * @var string 用户的 session 内容,可以携带用户侧 ID 等上下文信息,server 会原样返回。注意长度需小于512字节。
     */
    public $SessionContext;
 
    /**
     * @var string 国内短信无需填写该项;国际/港澳台短信已申请独立 SenderId 需要填写该字段,默认使用公共 SenderId,无需填写该字段。
注:月度使用量达到指定量级可申请独立 SenderId 使用,详情请联系 [腾讯云短信小助手](https://cloud.tencent.com/document/product/382/3773#.E6.8A.80.E6.9C.AF.E4.BA.A4.E6.B5.81)。
     */
    public $SenderId;
 
    /**
     * @param array $PhoneNumberSet 下发手机号码,采用 E.164 标准,格式为+[国家或地区码][手机号],单次请求最多支持200个手机号且要求全为境内手机号或全为境外手机号。
例如:+8618501234444, 其中前面有一个+号 ,86为国家码,18501234444为手机号。
注:发送国内短信格式还支持0086、86或无任何国家或地区码的11位手机号码,前缀默认为+86。
     * @param string $SmsSdkAppId 短信 SdkAppId,在 [短信控制台](https://console.cloud.tencent.com/smsv2/app-manage)  添加应用后生成的实际 SdkAppId,示例如1400006666。
     * @param string $TemplateId 模板 ID,必须填写已审核通过的模板 ID。模板 ID 可前往 [国内短信](https://console.cloud.tencent.com/smsv2/csms-template) 或 [国际/港澳台短信](https://console.cloud.tencent.com/smsv2/isms-template) 的正文模板管理查看,若向境外手机号发送短信,仅支持使用国际/港澳台短信模板。
     * @param string $SignName 短信签名内容,使用 UTF-8 编码,必须填写已审核通过的签名,例如:腾讯云,签名信息可前往 [国内短信](https://console.cloud.tencent.com/smsv2/csms-sign) 或 [国际/港澳台短信](https://console.cloud.tencent.com/smsv2/isms-sign) 的签名管理查看。
<dx-alert infotype="notice" title="注意"><ul><li>发送国内短信该参数必填,且需填写签名内容而非签名ID。
</li><li>发送国际/港澳台短信该参数非必填。</li></ul></dx-alert>
     * @param array $TemplateParamSet 模板参数,若无模板参数,则设置为空。
<dx-alert infotype="notice" title="注意">模板参数的个数需要与 TemplateId 对应模板的变量个数保持一致。</dx-alert>
     * @param string $ExtendCode 短信码号扩展号,默认未开通,如需开通请联系 [腾讯云短信小助手](https://cloud.tencent.com/document/product/382/3773#.E6.8A.80.E6.9C.AF.E4.BA.A4.E6.B5.81)。
     * @param string $SessionContext 用户的 session 内容,可以携带用户侧 ID 等上下文信息,server 会原样返回。注意长度需小于512字节。
     * @param string $SenderId 国内短信无需填写该项;国际/港澳台短信已申请独立 SenderId 需要填写该字段,默认使用公共 SenderId,无需填写该字段。
注:月度使用量达到指定量级可申请独立 SenderId 使用,详情请联系 [腾讯云短信小助手](https://cloud.tencent.com/document/product/382/3773#.E6.8A.80.E6.9C.AF.E4.BA.A4.E6.B5.81)。
     */
    function __construct()
    {
 
    }
 
    /**
     * For internal only. DO NOT USE IT.
     */
    public function deserialize($param)
    {
        if ($param === null) {
            return;
        }
        if (array_key_exists("PhoneNumberSet",$param) and $param["PhoneNumberSet"] !== null) {
            $this->PhoneNumberSet = $param["PhoneNumberSet"];
        }
 
        if (array_key_exists("SmsSdkAppId",$param) and $param["SmsSdkAppId"] !== null) {
            $this->SmsSdkAppId = $param["SmsSdkAppId"];
        }
 
        if (array_key_exists("TemplateId",$param) and $param["TemplateId"] !== null) {
            $this->TemplateId = $param["TemplateId"];
        }
 
        if (array_key_exists("SignName",$param) and $param["SignName"] !== null) {
            $this->SignName = $param["SignName"];
        }
 
        if (array_key_exists("TemplateParamSet",$param) and $param["TemplateParamSet"] !== null) {
            $this->TemplateParamSet = $param["TemplateParamSet"];
        }
 
        if (array_key_exists("ExtendCode",$param) and $param["ExtendCode"] !== null) {
            $this->ExtendCode = $param["ExtendCode"];
        }
 
        if (array_key_exists("SessionContext",$param) and $param["SessionContext"] !== null) {
            $this->SessionContext = $param["SessionContext"];
        }
 
        if (array_key_exists("SenderId",$param) and $param["SenderId"] !== null) {
            $this->SenderId = $param["SenderId"];
        }
    }
}