-
Notifications
You must be signed in to change notification settings - Fork 12
/
AlibabaSeakingAuthmachineapiAPIRequest.go
126 lines (107 loc) · 3.72 KB
/
AlibabaSeakingAuthmachineapiAPIRequest.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
package seaking
import (
"net/url"
"sync"
"github.com/bububa/opentaobao/model"
)
// AlibabaSeakingAuthmachineapiAPIRequest 机翻Api授权 API请求
// alibaba.seaking.authmachineapi
//
// 机翻Api授权
type AlibabaSeakingAuthmachineapiAPIRequest struct {
model.Params
// erp名称
_identifyType string
// erp用户id
_identifier string
// 店铺所在平台
_subIdentifyType string
// 店铺id(ae为cn开头的店铺id, lazada为邮箱)
_subIdentifier string
}
// NewAlibabaSeakingAuthmachineapiRequest 初始化AlibabaSeakingAuthmachineapiAPIRequest对象
func NewAlibabaSeakingAuthmachineapiRequest() *AlibabaSeakingAuthmachineapiAPIRequest {
return &AlibabaSeakingAuthmachineapiAPIRequest{
Params: model.NewParams(4),
}
}
// Reset IRequest interface 方法, 清空结构体
func (r *AlibabaSeakingAuthmachineapiAPIRequest) Reset() {
r._identifyType = ""
r._identifier = ""
r._subIdentifyType = ""
r._subIdentifier = ""
r.Params.ToZero()
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r AlibabaSeakingAuthmachineapiAPIRequest) GetApiMethodName() string {
return "alibaba.seaking.authmachineapi"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r AlibabaSeakingAuthmachineapiAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r AlibabaSeakingAuthmachineapiAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetIdentifyType is IdentifyType Setter
// erp名称
func (r *AlibabaSeakingAuthmachineapiAPIRequest) SetIdentifyType(_identifyType string) error {
r._identifyType = _identifyType
r.Set("identify_type", _identifyType)
return nil
}
// GetIdentifyType IdentifyType Getter
func (r AlibabaSeakingAuthmachineapiAPIRequest) GetIdentifyType() string {
return r._identifyType
}
// SetIdentifier is Identifier Setter
// erp用户id
func (r *AlibabaSeakingAuthmachineapiAPIRequest) SetIdentifier(_identifier string) error {
r._identifier = _identifier
r.Set("identifier", _identifier)
return nil
}
// GetIdentifier Identifier Getter
func (r AlibabaSeakingAuthmachineapiAPIRequest) GetIdentifier() string {
return r._identifier
}
// SetSubIdentifyType is SubIdentifyType Setter
// 店铺所在平台
func (r *AlibabaSeakingAuthmachineapiAPIRequest) SetSubIdentifyType(_subIdentifyType string) error {
r._subIdentifyType = _subIdentifyType
r.Set("sub_identify_type", _subIdentifyType)
return nil
}
// GetSubIdentifyType SubIdentifyType Getter
func (r AlibabaSeakingAuthmachineapiAPIRequest) GetSubIdentifyType() string {
return r._subIdentifyType
}
// SetSubIdentifier is SubIdentifier Setter
// 店铺id(ae为cn开头的店铺id, lazada为邮箱)
func (r *AlibabaSeakingAuthmachineapiAPIRequest) SetSubIdentifier(_subIdentifier string) error {
r._subIdentifier = _subIdentifier
r.Set("sub_identifier", _subIdentifier)
return nil
}
// GetSubIdentifier SubIdentifier Getter
func (r AlibabaSeakingAuthmachineapiAPIRequest) GetSubIdentifier() string {
return r._subIdentifier
}
var poolAlibabaSeakingAuthmachineapiAPIRequest = sync.Pool{
New: func() any {
return NewAlibabaSeakingAuthmachineapiRequest()
},
}
// GetAlibabaSeakingAuthmachineapiRequest 从 sync.Pool 获取 AlibabaSeakingAuthmachineapiAPIRequest
func GetAlibabaSeakingAuthmachineapiAPIRequest() *AlibabaSeakingAuthmachineapiAPIRequest {
return poolAlibabaSeakingAuthmachineapiAPIRequest.Get().(*AlibabaSeakingAuthmachineapiAPIRequest)
}
// ReleaseAlibabaSeakingAuthmachineapiAPIRequest 将 AlibabaSeakingAuthmachineapiAPIRequest 放入 sync.Pool
func ReleaseAlibabaSeakingAuthmachineapiAPIRequest(v *AlibabaSeakingAuthmachineapiAPIRequest) {
v.Reset()
poolAlibabaSeakingAuthmachineapiAPIRequest.Put(v)
}