-
Notifications
You must be signed in to change notification settings - Fork 5
/
model_cost_explorer_filter_request_body.go
324 lines (274 loc) · 9.79 KB
/
model_cost_explorer_filter_request_body.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
// Code based on the AtlasAPI V2 OpenAPI file
package admin
import (
"encoding/json"
)
// CostExplorerFilterRequestBody Request body for a cost explorer query.
type CostExplorerFilterRequestBody struct {
// The list of projects to be included in the Cost Explorer Query.
Clusters *[]string `json:"clusters,omitempty"`
// The exclusive ending date for the Cost Explorer query. The date must be the start of a month.
EndDate string `json:"endDate"`
// The dimension to group the returned usage results by. At least one filter value needs to be provided for a dimension to be used.
GroupBy *string `json:"groupBy,omitempty"`
// Flag to control whether usage that matches the filter criteria, but does not have values for all filter criteria is included in response. Default is false, which excludes the partially matching data.
IncludePartialMatches *bool `json:"includePartialMatches,omitempty"`
// The list of organizations to be included in the Cost Explorer Query.
Organizations *[]string `json:"organizations,omitempty"`
// The list of projects to be included in the Cost Explorer Query.
Projects *[]string `json:"projects,omitempty"`
// The list of projects to be included in the Cost Explorer Query.
Services *[]string `json:"services,omitempty"`
// The inclusive starting date for the Cost Explorer query. The date must be the start of a month.
StartDate string `json:"startDate"`
}
// NewCostExplorerFilterRequestBody instantiates a new CostExplorerFilterRequestBody object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewCostExplorerFilterRequestBody(endDate string, startDate string) *CostExplorerFilterRequestBody {
this := CostExplorerFilterRequestBody{}
this.EndDate = endDate
this.StartDate = startDate
return &this
}
// NewCostExplorerFilterRequestBodyWithDefaults instantiates a new CostExplorerFilterRequestBody object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewCostExplorerFilterRequestBodyWithDefaults() *CostExplorerFilterRequestBody {
this := CostExplorerFilterRequestBody{}
return &this
}
// GetClusters returns the Clusters field value if set, zero value otherwise
func (o *CostExplorerFilterRequestBody) GetClusters() []string {
if o == nil || IsNil(o.Clusters) {
var ret []string
return ret
}
return *o.Clusters
}
// GetClustersOk returns a tuple with the Clusters field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CostExplorerFilterRequestBody) GetClustersOk() (*[]string, bool) {
if o == nil || IsNil(o.Clusters) {
return nil, false
}
return o.Clusters, true
}
// HasClusters returns a boolean if a field has been set.
func (o *CostExplorerFilterRequestBody) HasClusters() bool {
if o != nil && !IsNil(o.Clusters) {
return true
}
return false
}
// SetClusters gets a reference to the given []string and assigns it to the Clusters field.
func (o *CostExplorerFilterRequestBody) SetClusters(v []string) {
o.Clusters = &v
}
// GetEndDate returns the EndDate field value
func (o *CostExplorerFilterRequestBody) GetEndDate() string {
if o == nil {
var ret string
return ret
}
return o.EndDate
}
// GetEndDateOk returns a tuple with the EndDate field value
// and a boolean to check if the value has been set.
func (o *CostExplorerFilterRequestBody) GetEndDateOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.EndDate, true
}
// SetEndDate sets field value
func (o *CostExplorerFilterRequestBody) SetEndDate(v string) {
o.EndDate = v
}
// GetGroupBy returns the GroupBy field value if set, zero value otherwise
func (o *CostExplorerFilterRequestBody) GetGroupBy() string {
if o == nil || IsNil(o.GroupBy) {
var ret string
return ret
}
return *o.GroupBy
}
// GetGroupByOk returns a tuple with the GroupBy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CostExplorerFilterRequestBody) GetGroupByOk() (*string, bool) {
if o == nil || IsNil(o.GroupBy) {
return nil, false
}
return o.GroupBy, true
}
// HasGroupBy returns a boolean if a field has been set.
func (o *CostExplorerFilterRequestBody) HasGroupBy() bool {
if o != nil && !IsNil(o.GroupBy) {
return true
}
return false
}
// SetGroupBy gets a reference to the given string and assigns it to the GroupBy field.
func (o *CostExplorerFilterRequestBody) SetGroupBy(v string) {
o.GroupBy = &v
}
// GetIncludePartialMatches returns the IncludePartialMatches field value if set, zero value otherwise
func (o *CostExplorerFilterRequestBody) GetIncludePartialMatches() bool {
if o == nil || IsNil(o.IncludePartialMatches) {
var ret bool
return ret
}
return *o.IncludePartialMatches
}
// GetIncludePartialMatchesOk returns a tuple with the IncludePartialMatches field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CostExplorerFilterRequestBody) GetIncludePartialMatchesOk() (*bool, bool) {
if o == nil || IsNil(o.IncludePartialMatches) {
return nil, false
}
return o.IncludePartialMatches, true
}
// HasIncludePartialMatches returns a boolean if a field has been set.
func (o *CostExplorerFilterRequestBody) HasIncludePartialMatches() bool {
if o != nil && !IsNil(o.IncludePartialMatches) {
return true
}
return false
}
// SetIncludePartialMatches gets a reference to the given bool and assigns it to the IncludePartialMatches field.
func (o *CostExplorerFilterRequestBody) SetIncludePartialMatches(v bool) {
o.IncludePartialMatches = &v
}
// GetOrganizations returns the Organizations field value if set, zero value otherwise
func (o *CostExplorerFilterRequestBody) GetOrganizations() []string {
if o == nil || IsNil(o.Organizations) {
var ret []string
return ret
}
return *o.Organizations
}
// GetOrganizationsOk returns a tuple with the Organizations field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CostExplorerFilterRequestBody) GetOrganizationsOk() (*[]string, bool) {
if o == nil || IsNil(o.Organizations) {
return nil, false
}
return o.Organizations, true
}
// HasOrganizations returns a boolean if a field has been set.
func (o *CostExplorerFilterRequestBody) HasOrganizations() bool {
if o != nil && !IsNil(o.Organizations) {
return true
}
return false
}
// SetOrganizations gets a reference to the given []string and assigns it to the Organizations field.
func (o *CostExplorerFilterRequestBody) SetOrganizations(v []string) {
o.Organizations = &v
}
// GetProjects returns the Projects field value if set, zero value otherwise
func (o *CostExplorerFilterRequestBody) GetProjects() []string {
if o == nil || IsNil(o.Projects) {
var ret []string
return ret
}
return *o.Projects
}
// GetProjectsOk returns a tuple with the Projects field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CostExplorerFilterRequestBody) GetProjectsOk() (*[]string, bool) {
if o == nil || IsNil(o.Projects) {
return nil, false
}
return o.Projects, true
}
// HasProjects returns a boolean if a field has been set.
func (o *CostExplorerFilterRequestBody) HasProjects() bool {
if o != nil && !IsNil(o.Projects) {
return true
}
return false
}
// SetProjects gets a reference to the given []string and assigns it to the Projects field.
func (o *CostExplorerFilterRequestBody) SetProjects(v []string) {
o.Projects = &v
}
// GetServices returns the Services field value if set, zero value otherwise
func (o *CostExplorerFilterRequestBody) GetServices() []string {
if o == nil || IsNil(o.Services) {
var ret []string
return ret
}
return *o.Services
}
// GetServicesOk returns a tuple with the Services field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CostExplorerFilterRequestBody) GetServicesOk() (*[]string, bool) {
if o == nil || IsNil(o.Services) {
return nil, false
}
return o.Services, true
}
// HasServices returns a boolean if a field has been set.
func (o *CostExplorerFilterRequestBody) HasServices() bool {
if o != nil && !IsNil(o.Services) {
return true
}
return false
}
// SetServices gets a reference to the given []string and assigns it to the Services field.
func (o *CostExplorerFilterRequestBody) SetServices(v []string) {
o.Services = &v
}
// GetStartDate returns the StartDate field value
func (o *CostExplorerFilterRequestBody) GetStartDate() string {
if o == nil {
var ret string
return ret
}
return o.StartDate
}
// GetStartDateOk returns a tuple with the StartDate field value
// and a boolean to check if the value has been set.
func (o *CostExplorerFilterRequestBody) GetStartDateOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.StartDate, true
}
// SetStartDate sets field value
func (o *CostExplorerFilterRequestBody) SetStartDate(v string) {
o.StartDate = v
}
func (o CostExplorerFilterRequestBody) MarshalJSONWithoutReadOnly() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CostExplorerFilterRequestBody) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Clusters) {
toSerialize["clusters"] = o.Clusters
}
toSerialize["endDate"] = o.EndDate
if !IsNil(o.GroupBy) {
toSerialize["groupBy"] = o.GroupBy
}
if !IsNil(o.IncludePartialMatches) {
toSerialize["includePartialMatches"] = o.IncludePartialMatches
}
if !IsNil(o.Organizations) {
toSerialize["organizations"] = o.Organizations
}
if !IsNil(o.Projects) {
toSerialize["projects"] = o.Projects
}
if !IsNil(o.Services) {
toSerialize["services"] = o.Services
}
toSerialize["startDate"] = o.StartDate
return toSerialize, nil
}