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+ billing "github.com/jdcloud-api/jdcloud-sdk-go/services/billing/models"
22+ )
23+
24+ type DescribeBillDetailsRequest struct {
25+
26+ core.JDCloudRequest
27+
28+ /* Region ID */
29+ RegionId string `json:"regionId"`
30+
31+ /* 账期开始时间,不支持跨月查询。格式:yyyy-MM-dd HH:mm:ss */
32+ StartTime string `json:"startTime"`
33+
34+ /* 账期结束时间,不支持跨月查询。格式:yyyy-MM-dd HH:mm:ss */
35+ EndTime string `json:"endTime"`
36+
37+ /* 产品线代码 (Optional) */
38+ AppCode * string `json:"appCode"`
39+
40+ /* 产品代码 (Optional) */
41+ ServiceCode * string `json:"serviceCode"`
42+
43+ /* 计费类型 1、按配置 2、按用量 3、包年包月 4、按次 (Optional) */
44+ BillingType * int `json:"billingType"`
45+
46+ /* 资源单id列表,最多支持传入500个 (Optional) */
47+ ResourceIds []string `json:"resourceIds"`
48+
49+ /* 标签,JSON格式:[{"k1":"v1"},{"k1":"v2"},{"k2":""}]
50+ 示例:
51+ 选择的标签为, 部门:广告部、部门:物流部、项目
52+ 则传值为:[{"部门":"广告部"},{"部门":"物流部"},{"项目":""}]
53+ (Optional) */
54+ Tags []interface {} `json:"tags"`
55+
56+ /* pageIndex 分页,默认从1开始 (Optional) */
57+ PageIndex * int `json:"pageIndex"`
58+
59+ /* pageSize 每页查询数据条数,最多支持1000条 (Optional) */
60+ PageSize * int `json:"pageSize"`
61+ }
62+
63+ /*
64+ * param regionId: Region ID (Required)
65+ * param startTime: 账期开始时间,不支持跨月查询。格式:yyyy-MM-dd HH:mm:ss (Required)
66+ * param endTime: 账期结束时间,不支持跨月查询。格式:yyyy-MM-dd HH:mm:ss (Required)
67+ *
68+ * @Deprecated, not compatible when mandatory parameters changed
69+ */
70+ func NewDescribeBillDetailsRequest (
71+ regionId string ,
72+ startTime string ,
73+ endTime string ,
74+ ) * DescribeBillDetailsRequest {
75+
76+ return & DescribeBillDetailsRequest {
77+ JDCloudRequest : core.JDCloudRequest {
78+ URL : "/regions/{regionId}/describeBillDetails" ,
79+ Method : "POST" ,
80+ Header : nil ,
81+ Version : "v1" ,
82+ },
83+ RegionId : regionId ,
84+ StartTime : startTime ,
85+ EndTime : endTime ,
86+ }
87+ }
88+
89+ /*
90+ * param regionId: Region ID (Required)
91+ * param startTime: 账期开始时间,不支持跨月查询。格式:yyyy-MM-dd HH:mm:ss (Required)
92+ * param endTime: 账期结束时间,不支持跨月查询。格式:yyyy-MM-dd HH:mm:ss (Required)
93+ * param appCode: 产品线代码 (Optional)
94+ * param serviceCode: 产品代码 (Optional)
95+ * param billingType: 计费类型 1、按配置 2、按用量 3、包年包月 4、按次 (Optional)
96+ * param resourceIds: 资源单id列表,最多支持传入500个 (Optional)
97+ * param tags: 标签,JSON格式:[{"k1":"v1"},{"k1":"v2"},{"k2":""}]
98+ 示例:
99+ 选择的标签为, 部门:广告部、部门:物流部、项目
100+ 则传值为:[{"部门":"广告部"},{"部门":"物流部"},{"项目":""}]
101+ (Optional)
102+ * param pageIndex: pageIndex 分页,默认从1开始 (Optional)
103+ * param pageSize: pageSize 每页查询数据条数,最多支持1000条 (Optional)
104+ */
105+ func NewDescribeBillDetailsRequestWithAllParams (
106+ regionId string ,
107+ startTime string ,
108+ endTime string ,
109+ appCode * string ,
110+ serviceCode * string ,
111+ billingType * int ,
112+ resourceIds []string ,
113+ tags []interface {},
114+ pageIndex * int ,
115+ pageSize * int ,
116+ ) * DescribeBillDetailsRequest {
117+
118+ return & DescribeBillDetailsRequest {
119+ JDCloudRequest : core.JDCloudRequest {
120+ URL : "/regions/{regionId}/describeBillDetails" ,
121+ Method : "POST" ,
122+ Header : nil ,
123+ Version : "v1" ,
124+ },
125+ RegionId : regionId ,
126+ StartTime : startTime ,
127+ EndTime : endTime ,
128+ AppCode : appCode ,
129+ ServiceCode : serviceCode ,
130+ BillingType : billingType ,
131+ ResourceIds : resourceIds ,
132+ Tags : tags ,
133+ PageIndex : pageIndex ,
134+ PageSize : pageSize ,
135+ }
136+ }
137+
138+ /* This constructor has better compatible ability when API parameters changed */
139+ func NewDescribeBillDetailsRequestWithoutParam () * DescribeBillDetailsRequest {
140+
141+ return & DescribeBillDetailsRequest {
142+ JDCloudRequest : core.JDCloudRequest {
143+ URL : "/regions/{regionId}/describeBillDetails" ,
144+ Method : "POST" ,
145+ Header : nil ,
146+ Version : "v1" ,
147+ },
148+ }
149+ }
150+
151+ /* param regionId: Region ID(Required) */
152+ func (r * DescribeBillDetailsRequest ) SetRegionId (regionId string ) {
153+ r .RegionId = regionId
154+ }
155+ /* param startTime: 账期开始时间,不支持跨月查询。格式:yyyy-MM-dd HH:mm:ss(Required) */
156+ func (r * DescribeBillDetailsRequest ) SetStartTime (startTime string ) {
157+ r .StartTime = startTime
158+ }
159+ /* param endTime: 账期结束时间,不支持跨月查询。格式:yyyy-MM-dd HH:mm:ss(Required) */
160+ func (r * DescribeBillDetailsRequest ) SetEndTime (endTime string ) {
161+ r .EndTime = endTime
162+ }
163+ /* param appCode: 产品线代码(Optional) */
164+ func (r * DescribeBillDetailsRequest ) SetAppCode (appCode string ) {
165+ r .AppCode = & appCode
166+ }
167+ /* param serviceCode: 产品代码(Optional) */
168+ func (r * DescribeBillDetailsRequest ) SetServiceCode (serviceCode string ) {
169+ r .ServiceCode = & serviceCode
170+ }
171+ /* param billingType: 计费类型 1、按配置 2、按用量 3、包年包月 4、按次(Optional) */
172+ func (r * DescribeBillDetailsRequest ) SetBillingType (billingType int ) {
173+ r .BillingType = & billingType
174+ }
175+ /* param resourceIds: 资源单id列表,最多支持传入500个(Optional) */
176+ func (r * DescribeBillDetailsRequest ) SetResourceIds (resourceIds []string ) {
177+ r .ResourceIds = resourceIds
178+ }
179+ /* param tags: 标签,JSON格式:[{"k1":"v1"},{"k1":"v2"},{"k2":""}]
180+ 示例:
181+ 选择的标签为, 部门:广告部、部门:物流部、项目
182+ 则传值为:[{"部门":"广告部"},{"部门":"物流部"},{"项目":""}]
183+ (Optional) */
184+ func (r * DescribeBillDetailsRequest ) SetTags (tags []interface {}) {
185+ r .Tags = tags
186+ }
187+ /* param pageIndex: pageIndex 分页,默认从1开始(Optional) */
188+ func (r * DescribeBillDetailsRequest ) SetPageIndex (pageIndex int ) {
189+ r .PageIndex = & pageIndex
190+ }
191+ /* param pageSize: pageSize 每页查询数据条数,最多支持1000条(Optional) */
192+ func (r * DescribeBillDetailsRequest ) SetPageSize (pageSize int ) {
193+ r .PageSize = & pageSize
194+ }
195+
196+
197+ // GetRegionId returns path parameter 'regionId' if exist,
198+ // otherwise return empty string
199+ func (r DescribeBillDetailsRequest ) GetRegionId () string {
200+ return r .RegionId
201+ }
202+
203+ type DescribeBillDetailsResponse struct {
204+ RequestID string `json:"requestId"`
205+ Error core.ErrorResponse `json:"error"`
206+ Result DescribeBillDetailsResult `json:"result"`
207+ }
208+
209+ type DescribeBillDetailsResult struct {
210+ Pagination billing.Pagination `json:"pagination"`
211+ Result []billing.BillSummaryV2 `json:"result"`
212+ }
0 commit comments