DescribeMonitorAlarm.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 DescribeMonitorAlarmRequest struct {
25 core.JDCloudRequest
26
27 /* 实例所属的地域ID */
28 RegionId string `json:"regionId"`
29
30 /* 域名ID,请使用describeDomains接口获取。 */
31 DomainId string `json:"domainId"`
32
33 /* 当前页数,起始值为1,默认为1 (Optional) */
34 PageIndex *int `json:"pageIndex"`
35
36 /* 分页查询时设置的每页行数 (Optional) */
37 PageSize *int `json:"pageSize"`
38
39 /* 关键字 (Optional) */
40 SearchValue *string `json:"searchValue"`
41 }
42
43 /*
44 * param regionId: 实例所属的地域ID (Required)
45 * param domainId: 域名ID,请使用describeDomains接口获取。 (Required)
46 *
47 * @Deprecated, not compatible when mandatory parameters changed
48 */
49 func NewDescribeMonitorAlarmRequest(
50 regionId string,
51 domainId string,
52 ) *DescribeMonitorAlarmRequest {
53
54 return &DescribeMonitorAlarmRequest{
55 JDCloudRequest: core.JDCloudRequest{
56 URL: "/regions/{regionId}/domain/{domainId}/monitorAlarm",
57 Method: "GET",
58 Header: nil,
59 Version: "v2",
60 },
61 RegionId: regionId,
62 DomainId: domainId,
63 }
64 }
65
66 /*
67 * param regionId: 实例所属的地域ID (Required)
68 * param domainId: 域名ID,请使用describeDomains接口获取。 (Required)
69 * param pageIndex: 当前页数,起始值为1,默认为1 (Optional)
70 * param pageSize: 分页查询时设置的每页行数 (Optional)
71 * param searchValue: 关键字 (Optional)
72 */
73 func NewDescribeMonitorAlarmRequestWithAllParams(
74 regionId string,
75 domainId string,
76 pageIndex *int,
77 pageSize *int,
78 searchValue *string,
79 ) *DescribeMonitorAlarmRequest {
80
81 return &DescribeMonitorAlarmRequest{
82 JDCloudRequest: core.JDCloudRequest{
83 URL: "/regions/{regionId}/domain/{domainId}/monitorAlarm",
84 Method: "GET",
85 Header: nil,
86 Version: "v2",
87 },
88 RegionId: regionId,
89 DomainId: domainId,
90 PageIndex: pageIndex,
91 PageSize: pageSize,
92 SearchValue: searchValue,
93 }
94 }
95
96 /* This constructor has better compatible ability when API parameters changed */
97 func NewDescribeMonitorAlarmRequestWithoutParam() *DescribeMonitorAlarmRequest {
98
99 return &DescribeMonitorAlarmRequest{
100 JDCloudRequest: core.JDCloudRequest{
101 URL: "/regions/{regionId}/domain/{domainId}/monitorAlarm",
102 Method: "GET",
103 Header: nil,
104 Version: "v2",
105 },
106 }
107 }
108
109 /* param regionId: 实例所属的地域ID(Required) */
110 func (r *DescribeMonitorAlarmRequest) SetRegionId(regionId string) {
111 r.RegionId = regionId
112 }
113
114 /* param domainId: 域名ID,请使用describeDomains接口获取。(Required) */
115 func (r *DescribeMonitorAlarmRequest) SetDomainId(domainId string) {
116 r.DomainId = domainId
117 }
118
119 /* param pageIndex: 当前页数,起始值为1,默认为1(Optional) */
120 func (r *DescribeMonitorAlarmRequest) SetPageIndex(pageIndex int) {
121 r.PageIndex = &pageIndex
122 }
123
124 /* param pageSize: 分页查询时设置的每页行数(Optional) */
125 func (r *DescribeMonitorAlarmRequest) SetPageSize(pageSize int) {
126 r.PageSize = &pageSize
127 }
128
129 /* param searchValue: 关键字(Optional) */
130 func (r *DescribeMonitorAlarmRequest) SetSearchValue(searchValue string) {
131 r.SearchValue = &searchValue
132 }
133
134 // GetRegionId returns path parameter 'regionId' if exist,
135 // otherwise return empty string
136 func (r DescribeMonitorAlarmRequest) GetRegionId() string {
137 return r.RegionId
138 }
139
140 type DescribeMonitorAlarmResponse struct {
141 RequestID string `json:"requestId"`
142 Error core.ErrorResponse `json:"error"`
143 Result DescribeMonitorAlarmResult `json:"result"`
144 }
145
146 type DescribeMonitorAlarmResult struct {
147 CurrentCount int `json:"currentCount"`
148 TotalCount int `json:"totalCount"`
149 TotalPage int `json:"totalPage"`
150 DataList []domainservice.MonitorAlarmInfo `json:"dataList"`
151 }
152