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 BatchIpBlackListRequest struct {
24+
25+ core.JDCloudRequest
26+
27+ /* 域名列表。最多30个 (Optional) */
28+ Domains []string `json:"domains"`
29+
30+ /* ip列表。最多50个 (Optional) */
31+ IpList []string `json:"ipList"`
32+
33+ /* 封禁时长,单位分钟。默认1440 (Optional) */
34+ ForbidTime * int64 `json:"forbidTime"`
35+
36+ /* forbid or resume.代表封禁和解封。 (Optional) */
37+ Action * string `json:"action"`
38+ }
39+
40+ /*
41+ *
42+ * @Deprecated, not compatible when mandatory parameters changed
43+ */
44+ func NewBatchIpBlackListRequest (
45+ ) * BatchIpBlackListRequest {
46+
47+ return & BatchIpBlackListRequest {
48+ JDCloudRequest : core.JDCloudRequest {
49+ URL : "/batchIpBlackList" ,
50+ Method : "POST" ,
51+ Header : nil ,
52+ Version : "v1" ,
53+ },
54+ }
55+ }
56+
57+ /*
58+ * param domains: 域名列表。最多30个 (Optional)
59+ * param ipList: ip列表。最多50个 (Optional)
60+ * param forbidTime: 封禁时长,单位分钟。默认1440 (Optional)
61+ * param action: forbid or resume.代表封禁和解封。 (Optional)
62+ */
63+ func NewBatchIpBlackListRequestWithAllParams (
64+ domains []string ,
65+ ipList []string ,
66+ forbidTime * int64 ,
67+ action * string ,
68+ ) * BatchIpBlackListRequest {
69+
70+ return & BatchIpBlackListRequest {
71+ JDCloudRequest : core.JDCloudRequest {
72+ URL : "/batchIpBlackList" ,
73+ Method : "POST" ,
74+ Header : nil ,
75+ Version : "v1" ,
76+ },
77+ Domains : domains ,
78+ IpList : ipList ,
79+ ForbidTime : forbidTime ,
80+ Action : action ,
81+ }
82+ }
83+
84+ /* This constructor has better compatible ability when API parameters changed */
85+ func NewBatchIpBlackListRequestWithoutParam () * BatchIpBlackListRequest {
86+
87+ return & BatchIpBlackListRequest {
88+ JDCloudRequest : core.JDCloudRequest {
89+ URL : "/batchIpBlackList" ,
90+ Method : "POST" ,
91+ Header : nil ,
92+ Version : "v1" ,
93+ },
94+ }
95+ }
96+
97+ /* param domains: 域名列表。最多30个(Optional) */
98+ func (r * BatchIpBlackListRequest ) SetDomains (domains []string ) {
99+ r .Domains = domains
100+ }
101+ /* param ipList: ip列表。最多50个(Optional) */
102+ func (r * BatchIpBlackListRequest ) SetIpList (ipList []string ) {
103+ r .IpList = ipList
104+ }
105+ /* param forbidTime: 封禁时长,单位分钟。默认1440(Optional) */
106+ func (r * BatchIpBlackListRequest ) SetForbidTime (forbidTime int64 ) {
107+ r .ForbidTime = & forbidTime
108+ }
109+ /* param action: forbid or resume.代表封禁和解封。(Optional) */
110+ func (r * BatchIpBlackListRequest ) SetAction (action string ) {
111+ r .Action = & action
112+ }
113+
114+
115+ // GetRegionId returns path parameter 'regionId' if exist,
116+ // otherwise return empty string
117+ func (r BatchIpBlackListRequest ) GetRegionId () string {
118+ return ""
119+ }
120+
121+ type BatchIpBlackListResponse struct {
122+ RequestID string `json:"requestId"`
123+ Error core.ErrorResponse `json:"error"`
124+ Result BatchIpBlackListResult `json:"result"`
125+ }
126+
127+ type BatchIpBlackListResult struct {
128+ }
0 commit comments