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+ cdn "github.com/jdcloud-api/jdcloud-sdk-go/services/cdn/models"
22+ )
23+
24+ type QueryDomainsLogForJdRequest struct {
25+
26+ core.JDCloudRequest
27+
28+ /* pin (Optional) */
29+ Pin * string `json:"pin"`
30+
31+ /* 查询起始时间,UTC时间,格式为:yyyy-MM-dd'T'HH:mm:ss'Z',示例:2018-10-21T10:00:00Z (Optional) */
32+ StartTime * string `json:"startTime"`
33+
34+ /* 查询截止时间,UTC时间,格式为:yyyy-MM-dd'T'HH:mm:ss'Z',示例:2018-10-21T10:00:00Z (Optional) */
35+ EndTime * string `json:"endTime"`
36+
37+ /* 时间间隔,取值(hour,day,fiveMin),不传默认小时。 (Optional) */
38+ Interval * string `json:"interval"`
39+
40+ /* 日志类型,取值(log,zip,gz),不传默认gz。 (Optional) */
41+ LogType * string `json:"logType"`
42+ }
43+
44+ /*
45+ *
46+ * @Deprecated, not compatible when mandatory parameters changed
47+ */
48+ func NewQueryDomainsLogForJdRequest (
49+ ) * QueryDomainsLogForJdRequest {
50+
51+ return & QueryDomainsLogForJdRequest {
52+ JDCloudRequest : core.JDCloudRequest {
53+ URL : "/logsJd" ,
54+ Method : "POST" ,
55+ Header : nil ,
56+ Version : "v1" ,
57+ },
58+ }
59+ }
60+
61+ /*
62+ * param pin: pin (Optional)
63+ * param startTime: 查询起始时间,UTC时间,格式为:yyyy-MM-dd'T'HH:mm:ss'Z',示例:2018-10-21T10:00:00Z (Optional)
64+ * param endTime: 查询截止时间,UTC时间,格式为:yyyy-MM-dd'T'HH:mm:ss'Z',示例:2018-10-21T10:00:00Z (Optional)
65+ * param interval: 时间间隔,取值(hour,day,fiveMin),不传默认小时。 (Optional)
66+ * param logType: 日志类型,取值(log,zip,gz),不传默认gz。 (Optional)
67+ */
68+ func NewQueryDomainsLogForJdRequestWithAllParams (
69+ pin * string ,
70+ startTime * string ,
71+ endTime * string ,
72+ interval * string ,
73+ logType * string ,
74+ ) * QueryDomainsLogForJdRequest {
75+
76+ return & QueryDomainsLogForJdRequest {
77+ JDCloudRequest : core.JDCloudRequest {
78+ URL : "/logsJd" ,
79+ Method : "POST" ,
80+ Header : nil ,
81+ Version : "v1" ,
82+ },
83+ Pin : pin ,
84+ StartTime : startTime ,
85+ EndTime : endTime ,
86+ Interval : interval ,
87+ LogType : logType ,
88+ }
89+ }
90+
91+ /* This constructor has better compatible ability when API parameters changed */
92+ func NewQueryDomainsLogForJdRequestWithoutParam () * QueryDomainsLogForJdRequest {
93+
94+ return & QueryDomainsLogForJdRequest {
95+ JDCloudRequest : core.JDCloudRequest {
96+ URL : "/logsJd" ,
97+ Method : "POST" ,
98+ Header : nil ,
99+ Version : "v1" ,
100+ },
101+ }
102+ }
103+
104+ /* param pin: pin(Optional) */
105+ func (r * QueryDomainsLogForJdRequest ) SetPin (pin string ) {
106+ r .Pin = & pin
107+ }
108+ /* param startTime: 查询起始时间,UTC时间,格式为:yyyy-MM-dd'T'HH:mm:ss'Z',示例:2018-10-21T10:00:00Z(Optional) */
109+ func (r * QueryDomainsLogForJdRequest ) SetStartTime (startTime string ) {
110+ r .StartTime = & startTime
111+ }
112+ /* param endTime: 查询截止时间,UTC时间,格式为:yyyy-MM-dd'T'HH:mm:ss'Z',示例:2018-10-21T10:00:00Z(Optional) */
113+ func (r * QueryDomainsLogForJdRequest ) SetEndTime (endTime string ) {
114+ r .EndTime = & endTime
115+ }
116+ /* param interval: 时间间隔,取值(hour,day,fiveMin),不传默认小时。(Optional) */
117+ func (r * QueryDomainsLogForJdRequest ) SetInterval (interval string ) {
118+ r .Interval = & interval
119+ }
120+ /* param logType: 日志类型,取值(log,zip,gz),不传默认gz。(Optional) */
121+ func (r * QueryDomainsLogForJdRequest ) SetLogType (logType string ) {
122+ r .LogType = & logType
123+ }
124+
125+
126+ // GetRegionId returns path parameter 'regionId' if exist,
127+ // otherwise return empty string
128+ func (r QueryDomainsLogForJdRequest ) GetRegionId () string {
129+ return ""
130+ }
131+
132+ type QueryDomainsLogForJdResponse struct {
133+ RequestID string `json:"requestId"`
134+ Error core.ErrorResponse `json:"error"`
135+ Result QueryDomainsLogForJdResult `json:"result"`
136+ }
137+
138+ type QueryDomainsLogForJdResult struct {
139+ Logs []cdn.DomainsLog `json:"logs"`
140+ }
0 commit comments