Skip to content

Commit 3adb026

Browse files
publish jdcloud-sdk-go version 0.0.14
1 parent 1be5536 commit 3adb026

45 files changed

Lines changed: 4056 additions & 665 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

services/starshield/ChangeLog.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# 更新历史 #
2-
API版本:0.0.12
2+
API版本:0.0.14
33

44
| 发布时间 | 版本号 | 更新 | 说明 |
55
| ---------- | ------ | ------------- | -------------- |
6+
| 2024-09-10 | 0.0.14 | 防火墙引擎升级,提供新版防火墙管理接口 ||
7+
| 2024-04-03 | 0.0.13 | 提供botDateHistogram接口 ||
68
| 2023-08-07 | 0.0.12 | 套餐包详情增加相关参数 ||
79
| 2023-07-03 | 0.0.11 | 调整证书删除、域名删除、域配置编辑接口的入参,调整证书包列表接口返参 ||
810
| 2023-05-15 | 0.0.10 | 数据概览返参指定具体Number类型:Number->Double ||
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
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+
starshield "github.com/jdcloud-api/jdcloud-sdk-go/services/starshield/models"
22+
)
23+
24+
type BotDateHistogramRequest struct {
25+
26+
core.JDCloudRequest
27+
28+
/* 域名标识 */
29+
ZoneId string `json:"zoneId"`
30+
31+
/* 开始时间 */
32+
Since string `json:"since"`
33+
34+
/* 结束时间 */
35+
Until string `json:"until"`
36+
37+
/* (Optional) */
38+
Filters []starshield.BotFilter `json:"filters"`
39+
}
40+
41+
/*
42+
* param zoneId: 域名标识 (Required)
43+
* param since: 开始时间 (Required)
44+
* param until: 结束时间 (Required)
45+
*
46+
* @Deprecated, not compatible when mandatory parameters changed
47+
*/
48+
func NewBotDateHistogramRequest(
49+
zoneId string,
50+
since string,
51+
until string,
52+
) *BotDateHistogramRequest {
53+
54+
return &BotDateHistogramRequest{
55+
JDCloudRequest: core.JDCloudRequest{
56+
URL: "/zones/{zoneId}/analyticsBotDateHistogram",
57+
Method: "GET",
58+
Header: nil,
59+
Version: "v1",
60+
},
61+
ZoneId: zoneId,
62+
Since: since,
63+
Until: until,
64+
}
65+
}
66+
67+
/*
68+
* param zoneId: 域名标识 (Required)
69+
* param since: 开始时间 (Required)
70+
* param until: 结束时间 (Required)
71+
* param filters: (Optional)
72+
*/
73+
func NewBotDateHistogramRequestWithAllParams(
74+
zoneId string,
75+
since string,
76+
until string,
77+
filters []starshield.BotFilter,
78+
) *BotDateHistogramRequest {
79+
80+
return &BotDateHistogramRequest{
81+
JDCloudRequest: core.JDCloudRequest{
82+
URL: "/zones/{zoneId}/analyticsBotDateHistogram",
83+
Method: "GET",
84+
Header: nil,
85+
Version: "v1",
86+
},
87+
ZoneId: zoneId,
88+
Since: since,
89+
Until: until,
90+
Filters: filters,
91+
}
92+
}
93+
94+
/* This constructor has better compatible ability when API parameters changed */
95+
func NewBotDateHistogramRequestWithoutParam() *BotDateHistogramRequest {
96+
97+
return &BotDateHistogramRequest{
98+
JDCloudRequest: core.JDCloudRequest{
99+
URL: "/zones/{zoneId}/analyticsBotDateHistogram",
100+
Method: "GET",
101+
Header: nil,
102+
Version: "v1",
103+
},
104+
}
105+
}
106+
107+
/* param zoneId: 域名标识(Required) */
108+
func (r *BotDateHistogramRequest) SetZoneId(zoneId string) {
109+
r.ZoneId = zoneId
110+
}
111+
/* param since: 开始时间(Required) */
112+
func (r *BotDateHistogramRequest) SetSince(since string) {
113+
r.Since = since
114+
}
115+
/* param until: 结束时间(Required) */
116+
func (r *BotDateHistogramRequest) SetUntil(until string) {
117+
r.Until = until
118+
}
119+
/* param filters: (Optional) */
120+
func (r *BotDateHistogramRequest) SetFilters(filters []starshield.BotFilter) {
121+
r.Filters = filters
122+
}
123+
124+
125+
// GetRegionId returns path parameter 'regionId' if exist,
126+
// otherwise return empty string
127+
func (r BotDateHistogramRequest) GetRegionId() string {
128+
return ""
129+
}
130+
131+
type BotDateHistogramResponse struct {
132+
RequestID string `json:"requestId"`
133+
Error core.ErrorResponse `json:"error"`
134+
Result BotDateHistogramResult `json:"result"`
135+
}
136+
137+
type BotDateHistogramResult struct {
138+
DataSeries []starshield.RequestBotGroup `json:"dataSeries"`
139+
TimeSeries []int `json:"timeSeries"`
140+
}
Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
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+
starshield "github.com/jdcloud-api/jdcloud-sdk-go/services/starshield/models"
22+
)
23+
24+
type CreateRuleRequest struct {
25+
26+
core.JDCloudRequest
27+
28+
/* */
29+
Zone_id string `json:"zone_id"`
30+
31+
/* */
32+
Ruleset_id string `json:"ruleset_id"`
33+
34+
/* 是否开启规则,有效值true/false。 (Optional) */
35+
Enabled *bool `json:"enabled"`
36+
37+
/* 规则的描述。 (Optional) */
38+
Description *string `json:"description"`
39+
40+
/* 表达式。 (Optional) */
41+
Expression *string `json:"expression"`
42+
43+
/* 当表达式匹配时,采取的措施。有效值block(阻止)/challenge(交互式质询)/js_challenge(JS质询)/managed_challenge(托管质询)/log(记录)/rewrite/skip(跳过)/execute。 (Optional) */
44+
Action *string `json:"action"`
45+
46+
/* (Optional) */
47+
Action_parameters *starshield.Action_parameters `json:"action_parameters"`
48+
49+
/* (Optional) */
50+
Ratelimit *starshield.Ratelimit `json:"ratelimit"`
51+
}
52+
53+
/*
54+
* param zone_id: (Required)
55+
* param ruleset_id: (Required)
56+
*
57+
* @Deprecated, not compatible when mandatory parameters changed
58+
*/
59+
func NewCreateRuleRequest(
60+
zone_id string,
61+
ruleset_id string,
62+
) *CreateRuleRequest {
63+
64+
return &CreateRuleRequest{
65+
JDCloudRequest: core.JDCloudRequest{
66+
URL: "/zones/{zone_id}/rulesets/{ruleset_id}/rules",
67+
Method: "POST",
68+
Header: nil,
69+
Version: "v1",
70+
},
71+
Zone_id: zone_id,
72+
Ruleset_id: ruleset_id,
73+
}
74+
}
75+
76+
/*
77+
* param zone_id: (Required)
78+
* param ruleset_id: (Required)
79+
* param enabled: 是否开启规则,有效值true/false。 (Optional)
80+
* param description: 规则的描述。 (Optional)
81+
* param expression: 表达式。 (Optional)
82+
* param action: 当表达式匹配时,采取的措施。有效值block(阻止)/challenge(交互式质询)/js_challenge(JS质询)/managed_challenge(托管质询)/log(记录)/rewrite/skip(跳过)/execute。 (Optional)
83+
* param action_parameters: (Optional)
84+
* param ratelimit: (Optional)
85+
*/
86+
func NewCreateRuleRequestWithAllParams(
87+
zone_id string,
88+
ruleset_id string,
89+
enabled *bool,
90+
description *string,
91+
expression *string,
92+
action *string,
93+
action_parameters *starshield.Action_parameters,
94+
ratelimit *starshield.Ratelimit,
95+
) *CreateRuleRequest {
96+
97+
return &CreateRuleRequest{
98+
JDCloudRequest: core.JDCloudRequest{
99+
URL: "/zones/{zone_id}/rulesets/{ruleset_id}/rules",
100+
Method: "POST",
101+
Header: nil,
102+
Version: "v1",
103+
},
104+
Zone_id: zone_id,
105+
Ruleset_id: ruleset_id,
106+
Enabled: enabled,
107+
Description: description,
108+
Expression: expression,
109+
Action: action,
110+
Action_parameters: action_parameters,
111+
Ratelimit: ratelimit,
112+
}
113+
}
114+
115+
/* This constructor has better compatible ability when API parameters changed */
116+
func NewCreateRuleRequestWithoutParam() *CreateRuleRequest {
117+
118+
return &CreateRuleRequest{
119+
JDCloudRequest: core.JDCloudRequest{
120+
URL: "/zones/{zone_id}/rulesets/{ruleset_id}/rules",
121+
Method: "POST",
122+
Header: nil,
123+
Version: "v1",
124+
},
125+
}
126+
}
127+
128+
/* param zone_id: (Required) */
129+
func (r *CreateRuleRequest) SetZone_id(zone_id string) {
130+
r.Zone_id = zone_id
131+
}
132+
/* param ruleset_id: (Required) */
133+
func (r *CreateRuleRequest) SetRuleset_id(ruleset_id string) {
134+
r.Ruleset_id = ruleset_id
135+
}
136+
/* param enabled: 是否开启规则,有效值true/false。(Optional) */
137+
func (r *CreateRuleRequest) SetEnabled(enabled bool) {
138+
r.Enabled = &enabled
139+
}
140+
/* param description: 规则的描述。(Optional) */
141+
func (r *CreateRuleRequest) SetDescription(description string) {
142+
r.Description = &description
143+
}
144+
/* param expression: 表达式。(Optional) */
145+
func (r *CreateRuleRequest) SetExpression(expression string) {
146+
r.Expression = &expression
147+
}
148+
/* param action: 当表达式匹配时,采取的措施。有效值block(阻止)/challenge(交互式质询)/js_challenge(JS质询)/managed_challenge(托管质询)/log(记录)/rewrite/skip(跳过)/execute。(Optional) */
149+
func (r *CreateRuleRequest) SetAction(action string) {
150+
r.Action = &action
151+
}
152+
/* param action_parameters: (Optional) */
153+
func (r *CreateRuleRequest) SetAction_parameters(action_parameters *starshield.Action_parameters) {
154+
r.Action_parameters = action_parameters
155+
}
156+
/* param ratelimit: (Optional) */
157+
func (r *CreateRuleRequest) SetRatelimit(ratelimit *starshield.Ratelimit) {
158+
r.Ratelimit = ratelimit
159+
}
160+
161+
162+
// GetRegionId returns path parameter 'regionId' if exist,
163+
// otherwise return empty string
164+
func (r CreateRuleRequest) GetRegionId() string {
165+
return ""
166+
}
167+
168+
type CreateRuleResponse struct {
169+
RequestID string `json:"requestId"`
170+
Error core.ErrorResponse `json:"error"`
171+
Result CreateRuleResult `json:"result"`
172+
}
173+
174+
type CreateRuleResult struct {
175+
Data starshield.RuleSet `json:"data"`
176+
}

0 commit comments

Comments
 (0)