1+ // Copyright 2018 JDCLOUD.COM
2+ //
3+ // Licensed under the Apache License, Version 2.0 (the "License");
4+ // you may not use this file except in compliance with the License.
5+ // You may obtain a copy of the License at
6+ //
7+ // http://www.apache.org/licenses/LICENSE-2.0
8+ //
9+ // Unless required by applicable law or agreed to in writing, software
10+ // distributed under the License is distributed on an "AS IS" BASIS,
11+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ // See the License for the specific language governing permissions and
13+ // limitations under the License.
14+ //
15+ // NOTE: This class is auto generated by the jdcloud code generator program.
16+
17+ package apis
18+
19+ import (
20+ "github.com/jdcloud-api/jdcloud-sdk-go/core"
21+ )
22+
23+ type SpeedLimitRequest struct {
24+
25+ core.JDCloudRequest
26+
27+ /* 用户域名 */
28+ Domain string `json:"domain"`
29+
30+ /* 限速值,单位为KB/s,取值范围[1,20480] (Optional) */
31+ LimitRate * int `json:"limitRate"`
32+ }
33+
34+ /*
35+ * param domain: 用户域名 (Required)
36+ *
37+ * @Deprecated, not compatible when mandatory parameters changed
38+ */
39+ func NewSpeedLimitRequest (
40+ domain string ,
41+ ) * SpeedLimitRequest {
42+
43+ return & SpeedLimitRequest {
44+ JDCloudRequest : core.JDCloudRequest {
45+ URL : "/domain/{domain}/speedLimit" ,
46+ Method : "POST" ,
47+ Header : nil ,
48+ Version : "v1" ,
49+ },
50+ Domain : domain ,
51+ }
52+ }
53+
54+ /*
55+ * param domain: 用户域名 (Required)
56+ * param limitRate: 限速值,单位为KB/s,取值范围[1,20480] (Optional)
57+ */
58+ func NewSpeedLimitRequestWithAllParams (
59+ domain string ,
60+ limitRate * int ,
61+ ) * SpeedLimitRequest {
62+
63+ return & SpeedLimitRequest {
64+ JDCloudRequest : core.JDCloudRequest {
65+ URL : "/domain/{domain}/speedLimit" ,
66+ Method : "POST" ,
67+ Header : nil ,
68+ Version : "v1" ,
69+ },
70+ Domain : domain ,
71+ LimitRate : limitRate ,
72+ }
73+ }
74+
75+ /* This constructor has better compatible ability when API parameters changed */
76+ func NewSpeedLimitRequestWithoutParam () * SpeedLimitRequest {
77+
78+ return & SpeedLimitRequest {
79+ JDCloudRequest : core.JDCloudRequest {
80+ URL : "/domain/{domain}/speedLimit" ,
81+ Method : "POST" ,
82+ Header : nil ,
83+ Version : "v1" ,
84+ },
85+ }
86+ }
87+
88+ /* param domain: 用户域名(Required) */
89+ func (r * SpeedLimitRequest ) SetDomain (domain string ) {
90+ r .Domain = domain
91+ }
92+
93+ /* param limitRate: 限速值,单位为KB/s,取值范围[1,20480](Optional) */
94+ func (r * SpeedLimitRequest ) SetLimitRate (limitRate int ) {
95+ r .LimitRate = & limitRate
96+ }
97+
98+ // GetRegionId returns path parameter 'regionId' if exist,
99+ // otherwise return empty string
100+ func (r SpeedLimitRequest ) GetRegionId () string {
101+ return ""
102+ }
103+
104+ type SpeedLimitResponse struct {
105+ RequestID string `json:"requestId"`
106+ Error core.ErrorResponse `json:"error"`
107+ Result SpeedLimitResult `json:"result"`
108+ }
109+
110+ type SpeedLimitResult struct {
111+ }
0 commit comments