-
Notifications
You must be signed in to change notification settings - Fork 9
/
AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIRequest.go
141 lines (121 loc) · 4.36 KB
/
AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIRequest.go
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
package tmallgenie
import (
"net/url"
"github.com/bububa/opentaobao/model"
)
// AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIRequest 电信iot自动授权 API请求
// alibaba.ailabs.tmallgenie.third.telecom.autoauth
//
// 电信iot自动授权
type AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIRequest struct {
model.Params
// 调用链id,用于全链路跟踪
_traceId string
// 电信音箱平台分配给合作方的合作伙伴ID
_ctPartnerId string
// 合作方音箱唯一标识,该标识传值为音箱CTEI。
_deviceId string
// 访问令牌,用于校验接口调用者身份,做到不可否认性
_token string
// 请求时间,格式:yyyy-MM-dd HH:mm:ss
_time string
// 电信家居平台用户标识加密字符串
_tyAccount string
// 扩展参数,由厂家根据业务自定义内容
_extraParam string
}
// NewAlibabaAilabsTmallgenieThirdTelecomAutoauthRequest 初始化AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIRequest对象
func NewAlibabaAilabsTmallgenieThirdTelecomAutoauthRequest() *AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIRequest {
return &AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIRequest{
Params: model.NewParams(),
}
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIRequest) GetApiMethodName() string {
return "alibaba.ailabs.tmallgenie.third.telecom.autoauth"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIRequest) GetApiParams() url.Values {
params := url.Values{}
for k, v := range r.GetRawParams() {
params.Set(k, v.String())
}
return params
}
// SetTraceId is TraceId Setter
// 调用链id,用于全链路跟踪
func (r *AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIRequest) SetTraceId(_traceId string) error {
r._traceId = _traceId
r.Set("trace_id", _traceId)
return nil
}
// GetTraceId TraceId Getter
func (r AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIRequest) GetTraceId() string {
return r._traceId
}
// SetCtPartnerId is CtPartnerId Setter
// 电信音箱平台分配给合作方的合作伙伴ID
func (r *AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIRequest) SetCtPartnerId(_ctPartnerId string) error {
r._ctPartnerId = _ctPartnerId
r.Set("ct_partner_id", _ctPartnerId)
return nil
}
// GetCtPartnerId CtPartnerId Getter
func (r AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIRequest) GetCtPartnerId() string {
return r._ctPartnerId
}
// SetDeviceId is DeviceId Setter
// 合作方音箱唯一标识,该标识传值为音箱CTEI。
func (r *AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIRequest) SetDeviceId(_deviceId string) error {
r._deviceId = _deviceId
r.Set("device_id", _deviceId)
return nil
}
// GetDeviceId DeviceId Getter
func (r AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIRequest) GetDeviceId() string {
return r._deviceId
}
// SetToken is Token Setter
// 访问令牌,用于校验接口调用者身份,做到不可否认性
func (r *AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIRequest) SetToken(_token string) error {
r._token = _token
r.Set("token", _token)
return nil
}
// GetToken Token Getter
func (r AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIRequest) GetToken() string {
return r._token
}
// SetTime is Time Setter
// 请求时间,格式:yyyy-MM-dd HH:mm:ss
func (r *AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIRequest) SetTime(_time string) error {
r._time = _time
r.Set("time", _time)
return nil
}
// GetTime Time Getter
func (r AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIRequest) GetTime() string {
return r._time
}
// SetTyAccount is TyAccount Setter
// 电信家居平台用户标识加密字符串
func (r *AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIRequest) SetTyAccount(_tyAccount string) error {
r._tyAccount = _tyAccount
r.Set("ty_account", _tyAccount)
return nil
}
// GetTyAccount TyAccount Getter
func (r AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIRequest) GetTyAccount() string {
return r._tyAccount
}
// SetExtraParam is ExtraParam Setter
// 扩展参数,由厂家根据业务自定义内容
func (r *AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIRequest) SetExtraParam(_extraParam string) error {
r._extraParam = _extraParam
r.Set("extra_param", _extraParam)
return nil
}
// GetExtraParam ExtraParam Getter
func (r AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIRequest) GetExtraParam() string {
return r._extraParam
}