/
TaobaoBaodianServerSdkConfigGetAPIRequest.go
126 lines (107 loc) · 3.41 KB
/
TaobaoBaodianServerSdkConfigGetAPIRequest.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 baodian
import (
"net/url"
"sync"
"github.com/bububa/opentaobao/model"
)
// TaobaoBaodianServerSdkConfigGetAPIRequest 获取宝点SDK的配置项(已迁移) API请求
// taobao.baodian.server.sdk.config.get
//
// 获取SDK各种配置项(已迁移)
type TaobaoBaodianServerSdkConfigGetAPIRequest struct {
model.Params
// appKey
_appkey string
// 渠道
_channel string
// sdk版本号
_sdkVer string
// 与后端约定
_type int64
}
// NewTaobaoBaodianServerSdkConfigGetRequest 初始化TaobaoBaodianServerSdkConfigGetAPIRequest对象
func NewTaobaoBaodianServerSdkConfigGetRequest() *TaobaoBaodianServerSdkConfigGetAPIRequest {
return &TaobaoBaodianServerSdkConfigGetAPIRequest{
Params: model.NewParams(4),
}
}
// Reset IRequest interface 方法, 清空结构体
func (r *TaobaoBaodianServerSdkConfigGetAPIRequest) Reset() {
r._appkey = ""
r._channel = ""
r._sdkVer = ""
r._type = 0
r.Params.ToZero()
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r TaobaoBaodianServerSdkConfigGetAPIRequest) GetApiMethodName() string {
return "taobao.baodian.server.sdk.config.get"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r TaobaoBaodianServerSdkConfigGetAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r TaobaoBaodianServerSdkConfigGetAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetAppkey is Appkey Setter
// appKey
func (r *TaobaoBaodianServerSdkConfigGetAPIRequest) SetAppkey(_appkey string) error {
r._appkey = _appkey
r.Set("appkey", _appkey)
return nil
}
// GetAppkey Appkey Getter
func (r TaobaoBaodianServerSdkConfigGetAPIRequest) GetAppkey() string {
return r._appkey
}
// SetChannel is Channel Setter
// 渠道
func (r *TaobaoBaodianServerSdkConfigGetAPIRequest) SetChannel(_channel string) error {
r._channel = _channel
r.Set("channel", _channel)
return nil
}
// GetChannel Channel Getter
func (r TaobaoBaodianServerSdkConfigGetAPIRequest) GetChannel() string {
return r._channel
}
// SetSdkVer is SdkVer Setter
// sdk版本号
func (r *TaobaoBaodianServerSdkConfigGetAPIRequest) SetSdkVer(_sdkVer string) error {
r._sdkVer = _sdkVer
r.Set("sdk_ver", _sdkVer)
return nil
}
// GetSdkVer SdkVer Getter
func (r TaobaoBaodianServerSdkConfigGetAPIRequest) GetSdkVer() string {
return r._sdkVer
}
// SetType is Type Setter
// 与后端约定
func (r *TaobaoBaodianServerSdkConfigGetAPIRequest) SetType(_type int64) error {
r._type = _type
r.Set("type", _type)
return nil
}
// GetType Type Getter
func (r TaobaoBaodianServerSdkConfigGetAPIRequest) GetType() int64 {
return r._type
}
var poolTaobaoBaodianServerSdkConfigGetAPIRequest = sync.Pool{
New: func() any {
return NewTaobaoBaodianServerSdkConfigGetRequest()
},
}
// GetTaobaoBaodianServerSdkConfigGetRequest 从 sync.Pool 获取 TaobaoBaodianServerSdkConfigGetAPIRequest
func GetTaobaoBaodianServerSdkConfigGetAPIRequest() *TaobaoBaodianServerSdkConfigGetAPIRequest {
return poolTaobaoBaodianServerSdkConfigGetAPIRequest.Get().(*TaobaoBaodianServerSdkConfigGetAPIRequest)
}
// ReleaseTaobaoBaodianServerSdkConfigGetAPIRequest 将 TaobaoBaodianServerSdkConfigGetAPIRequest 放入 sync.Pool
func ReleaseTaobaoBaodianServerSdkConfigGetAPIRequest(v *TaobaoBaodianServerSdkConfigGetAPIRequest) {
v.Reset()
poolTaobaoBaodianServerSdkConfigGetAPIRequest.Put(v)
}