DescribeActionLog.go raw
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/go-acme/jdcloud-sdk-go/core"
21 domainservice "github.com/go-acme/jdcloud-sdk-go/services/domainservice/models"
22 )
23
24 type DescribeActionLogRequest struct {
25 core.JDCloudRequest
26
27 /* 地域ID */
28 RegionId string `json:"regionId"`
29
30 /* 分页参数,页的序号,默认是1 */
31 PageNumber int `json:"pageNumber"`
32
33 /* 分页参数,每页含有的结果的数目,默认是10 */
34 PageSize int `json:"pageSize"`
35
36 /* 记录的起始时间,格式:UTC时间例如2017-11-10T23:00:00Z */
37 StartTime string `json:"startTime"`
38
39 /* 记录的终止时间,格式:UTC时间例如2017-11-10T23:00:00Z */
40 EndTime string `json:"endTime"`
41
42 /* 日志需要匹配的关键词 (Optional) */
43 KeyWord *string `json:"keyWord"`
44
45 /* 日志里面的结果是成功还是失败 (Optional) */
46 Success *bool `json:"success"`
47
48 /* 日志的类型 (Optional) */
49 Type *int `json:"type"`
50 }
51
52 /*
53 * param regionId: 地域ID (Required)
54 * param pageNumber: 分页参数,页的序号,默认是1 (Required)
55 * param pageSize: 分页参数,每页含有的结果的数目,默认是10 (Required)
56 * param startTime: 记录的起始时间,格式:UTC时间例如2017-11-10T23:00:00Z (Required)
57 * param endTime: 记录的终止时间,格式:UTC时间例如2017-11-10T23:00:00Z (Required)
58 *
59 * @Deprecated, not compatible when mandatory parameters changed
60 */
61 func NewDescribeActionLogRequest(
62 regionId string,
63 pageNumber int,
64 pageSize int,
65 startTime string,
66 endTime string,
67 ) *DescribeActionLogRequest {
68
69 return &DescribeActionLogRequest{
70 JDCloudRequest: core.JDCloudRequest{
71 URL: "/regions/{regionId}/actionLog",
72 Method: "GET",
73 Header: nil,
74 Version: "v2",
75 },
76 RegionId: regionId,
77 PageNumber: pageNumber,
78 PageSize: pageSize,
79 StartTime: startTime,
80 EndTime: endTime,
81 }
82 }
83
84 /*
85 * param regionId: 地域ID (Required)
86 * param pageNumber: 分页参数,页的序号,默认是1 (Required)
87 * param pageSize: 分页参数,每页含有的结果的数目,默认是10 (Required)
88 * param startTime: 记录的起始时间,格式:UTC时间例如2017-11-10T23:00:00Z (Required)
89 * param endTime: 记录的终止时间,格式:UTC时间例如2017-11-10T23:00:00Z (Required)
90 * param keyWord: 日志需要匹配的关键词 (Optional)
91 * param success: 日志里面的结果是成功还是失败 (Optional)
92 * param type_: 日志的类型 (Optional)
93 */
94 func NewDescribeActionLogRequestWithAllParams(
95 regionId string,
96 pageNumber int,
97 pageSize int,
98 startTime string,
99 endTime string,
100 keyWord *string,
101 success *bool,
102 type_ *int,
103 ) *DescribeActionLogRequest {
104
105 return &DescribeActionLogRequest{
106 JDCloudRequest: core.JDCloudRequest{
107 URL: "/regions/{regionId}/actionLog",
108 Method: "GET",
109 Header: nil,
110 Version: "v2",
111 },
112 RegionId: regionId,
113 PageNumber: pageNumber,
114 PageSize: pageSize,
115 StartTime: startTime,
116 EndTime: endTime,
117 KeyWord: keyWord,
118 Success: success,
119 Type: type_,
120 }
121 }
122
123 /* This constructor has better compatible ability when API parameters changed */
124 func NewDescribeActionLogRequestWithoutParam() *DescribeActionLogRequest {
125
126 return &DescribeActionLogRequest{
127 JDCloudRequest: core.JDCloudRequest{
128 URL: "/regions/{regionId}/actionLog",
129 Method: "GET",
130 Header: nil,
131 Version: "v2",
132 },
133 }
134 }
135
136 /* param regionId: 地域ID(Required) */
137 func (r *DescribeActionLogRequest) SetRegionId(regionId string) {
138 r.RegionId = regionId
139 }
140
141 /* param pageNumber: 分页参数,页的序号,默认是1(Required) */
142 func (r *DescribeActionLogRequest) SetPageNumber(pageNumber int) {
143 r.PageNumber = pageNumber
144 }
145
146 /* param pageSize: 分页参数,每页含有的结果的数目,默认是10(Required) */
147 func (r *DescribeActionLogRequest) SetPageSize(pageSize int) {
148 r.PageSize = pageSize
149 }
150
151 /* param startTime: 记录的起始时间,格式:UTC时间例如2017-11-10T23:00:00Z(Required) */
152 func (r *DescribeActionLogRequest) SetStartTime(startTime string) {
153 r.StartTime = startTime
154 }
155
156 /* param endTime: 记录的终止时间,格式:UTC时间例如2017-11-10T23:00:00Z(Required) */
157 func (r *DescribeActionLogRequest) SetEndTime(endTime string) {
158 r.EndTime = endTime
159 }
160
161 /* param keyWord: 日志需要匹配的关键词(Optional) */
162 func (r *DescribeActionLogRequest) SetKeyWord(keyWord string) {
163 r.KeyWord = &keyWord
164 }
165
166 /* param success: 日志里面的结果是成功还是失败(Optional) */
167 func (r *DescribeActionLogRequest) SetSuccess(success bool) {
168 r.Success = &success
169 }
170
171 /* param type_: 日志的类型(Optional) */
172 func (r *DescribeActionLogRequest) SetType(type_ int) {
173 r.Type = &type_
174 }
175
176 // GetRegionId returns path parameter 'regionId' if exist,
177 // otherwise return empty string
178 func (r DescribeActionLogRequest) GetRegionId() string {
179 return r.RegionId
180 }
181
182 type DescribeActionLogResponse struct {
183 RequestID string `json:"requestId"`
184 Error core.ErrorResponse `json:"error"`
185 Result DescribeActionLogResult `json:"result"`
186 }
187
188 type DescribeActionLogResult struct {
189 DataList []domainservice.Actionlog `json:"dataList"`
190 CurrentCount int `json:"currentCount"`
191 TotalCount int `json:"totalCount"`
192 TotalPage int `json:"totalPage"`
193 }
194