azure_mgmt_consumption 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/azure_mgmt_consumption.rb +6 -0
- data/lib/generated/azure_mgmt_consumption.rb +38 -0
- data/lib/generated/azure_mgmt_consumption/consumption_management_client.rb +134 -0
- data/lib/generated/azure_mgmt_consumption/models/error_details.rb +67 -0
- data/lib/generated/azure_mgmt_consumption/models/error_response.rb +46 -0
- data/lib/generated/azure_mgmt_consumption/models/meter_details.rb +114 -0
- data/lib/generated/azure_mgmt_consumption/models/operation.rb +56 -0
- data/lib/generated/azure_mgmt_consumption/models/operation_display.rb +68 -0
- data/lib/generated/azure_mgmt_consumption/models/operation_list_result.rb +99 -0
- data/lib/generated/azure_mgmt_consumption/models/resource.rb +85 -0
- data/lib/generated/azure_mgmt_consumption/models/usage_detail.rb +258 -0
- data/lib/generated/azure_mgmt_consumption/models/usage_details_list_result.rb +97 -0
- data/lib/generated/azure_mgmt_consumption/module_definition.rb +8 -0
- data/lib/generated/azure_mgmt_consumption/operations.rb +216 -0
- data/lib/generated/azure_mgmt_consumption/usage_details.rb +304 -0
- data/lib/generated/azure_mgmt_consumption/version.rb +8 -0
- metadata +130 -0
@@ -0,0 +1,68 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Consumption
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The object that represents the operation.
|
10
|
+
#
|
11
|
+
class OperationDisplay
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Service provider: Microsoft.Consumption.
|
16
|
+
attr_accessor :provider
|
17
|
+
|
18
|
+
# @return [String] Resource on which the operation is performed:
|
19
|
+
# UsageDetail, etc.
|
20
|
+
attr_accessor :resource
|
21
|
+
|
22
|
+
# @return [String] Operation type: Read, write, delete, etc.
|
23
|
+
attr_accessor :operation
|
24
|
+
|
25
|
+
|
26
|
+
#
|
27
|
+
# Mapper for OperationDisplay class as Ruby Hash.
|
28
|
+
# This will be used for serialization/deserialization.
|
29
|
+
#
|
30
|
+
def self.mapper()
|
31
|
+
{
|
32
|
+
required: false,
|
33
|
+
serialized_name: 'Operation_display',
|
34
|
+
type: {
|
35
|
+
name: 'Composite',
|
36
|
+
class_name: 'OperationDisplay',
|
37
|
+
model_properties: {
|
38
|
+
provider: {
|
39
|
+
required: false,
|
40
|
+
read_only: true,
|
41
|
+
serialized_name: 'provider',
|
42
|
+
type: {
|
43
|
+
name: 'String'
|
44
|
+
}
|
45
|
+
},
|
46
|
+
resource: {
|
47
|
+
required: false,
|
48
|
+
read_only: true,
|
49
|
+
serialized_name: 'resource',
|
50
|
+
type: {
|
51
|
+
name: 'String'
|
52
|
+
}
|
53
|
+
},
|
54
|
+
operation: {
|
55
|
+
required: false,
|
56
|
+
read_only: true,
|
57
|
+
serialized_name: 'operation',
|
58
|
+
type: {
|
59
|
+
name: 'String'
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,99 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Consumption
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Result of listing consumption operations. It contains a list of
|
10
|
+
# operations and a URL link to get the next set of results.
|
11
|
+
#
|
12
|
+
class OperationListResult
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
include MsRest::JSONable
|
17
|
+
# @return [Array<Operation>] List of consumption operations supported by
|
18
|
+
# the Microsoft.Consumption resource provider.
|
19
|
+
attr_accessor :value
|
20
|
+
|
21
|
+
# @return [String] URL to get the next set of operation list results if
|
22
|
+
# there are any.
|
23
|
+
attr_accessor :next_link
|
24
|
+
|
25
|
+
# return [Proc] with next page method call.
|
26
|
+
attr_accessor :next_method
|
27
|
+
|
28
|
+
#
|
29
|
+
# Gets the rest of the items for the request, enabling auto-pagination.
|
30
|
+
#
|
31
|
+
# @return [Array<Operation>] operation results.
|
32
|
+
#
|
33
|
+
def get_all_items
|
34
|
+
items = @value
|
35
|
+
page = self
|
36
|
+
while page.next_link != nil do
|
37
|
+
page = page.get_next_page
|
38
|
+
items.concat(page.value)
|
39
|
+
end
|
40
|
+
items
|
41
|
+
end
|
42
|
+
|
43
|
+
#
|
44
|
+
# Gets the next page of results.
|
45
|
+
#
|
46
|
+
# @return [OperationListResult] with next page content.
|
47
|
+
#
|
48
|
+
def get_next_page
|
49
|
+
response = @next_method.call(@next_link).value! unless @next_method.nil?
|
50
|
+
unless response.nil?
|
51
|
+
@next_link = response.body.next_link
|
52
|
+
@value = response.body.value
|
53
|
+
self
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
#
|
58
|
+
# Mapper for OperationListResult class as Ruby Hash.
|
59
|
+
# This will be used for serialization/deserialization.
|
60
|
+
#
|
61
|
+
def self.mapper()
|
62
|
+
{
|
63
|
+
required: false,
|
64
|
+
serialized_name: 'OperationListResult',
|
65
|
+
type: {
|
66
|
+
name: 'Composite',
|
67
|
+
class_name: 'OperationListResult',
|
68
|
+
model_properties: {
|
69
|
+
value: {
|
70
|
+
required: false,
|
71
|
+
read_only: true,
|
72
|
+
serialized_name: 'value',
|
73
|
+
type: {
|
74
|
+
name: 'Sequence',
|
75
|
+
element: {
|
76
|
+
required: false,
|
77
|
+
serialized_name: 'OperationElementType',
|
78
|
+
type: {
|
79
|
+
name: 'Composite',
|
80
|
+
class_name: 'Operation'
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
84
|
+
},
|
85
|
+
next_link: {
|
86
|
+
required: false,
|
87
|
+
read_only: true,
|
88
|
+
serialized_name: 'nextLink',
|
89
|
+
type: {
|
90
|
+
name: 'String'
|
91
|
+
}
|
92
|
+
}
|
93
|
+
}
|
94
|
+
}
|
95
|
+
}
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Consumption
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The Resource model definition.
|
10
|
+
#
|
11
|
+
class Resource
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Resource Id.
|
16
|
+
attr_accessor :id
|
17
|
+
|
18
|
+
# @return [String] Resource name.
|
19
|
+
attr_accessor :name
|
20
|
+
|
21
|
+
# @return [String] Resource type.
|
22
|
+
attr_accessor :type
|
23
|
+
|
24
|
+
# @return [Hash{String => String}] Resource tags.
|
25
|
+
attr_accessor :tags
|
26
|
+
|
27
|
+
|
28
|
+
#
|
29
|
+
# Mapper for Resource class as Ruby Hash.
|
30
|
+
# This will be used for serialization/deserialization.
|
31
|
+
#
|
32
|
+
def self.mapper()
|
33
|
+
{
|
34
|
+
required: false,
|
35
|
+
serialized_name: 'Resource',
|
36
|
+
type: {
|
37
|
+
name: 'Composite',
|
38
|
+
class_name: 'Resource',
|
39
|
+
model_properties: {
|
40
|
+
id: {
|
41
|
+
required: false,
|
42
|
+
read_only: true,
|
43
|
+
serialized_name: 'id',
|
44
|
+
type: {
|
45
|
+
name: 'String'
|
46
|
+
}
|
47
|
+
},
|
48
|
+
name: {
|
49
|
+
required: false,
|
50
|
+
read_only: true,
|
51
|
+
serialized_name: 'name',
|
52
|
+
type: {
|
53
|
+
name: 'String'
|
54
|
+
}
|
55
|
+
},
|
56
|
+
type: {
|
57
|
+
required: false,
|
58
|
+
read_only: true,
|
59
|
+
serialized_name: 'type',
|
60
|
+
type: {
|
61
|
+
name: 'String'
|
62
|
+
}
|
63
|
+
},
|
64
|
+
tags: {
|
65
|
+
required: false,
|
66
|
+
read_only: true,
|
67
|
+
serialized_name: 'tags',
|
68
|
+
type: {
|
69
|
+
name: 'Dictionary',
|
70
|
+
value: {
|
71
|
+
required: false,
|
72
|
+
serialized_name: 'StringElementType',
|
73
|
+
type: {
|
74
|
+
name: 'String'
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,258 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Consumption
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# An usage detail resource.
|
10
|
+
#
|
11
|
+
class UsageDetail < Resource
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The id of the billing period resource that the usage
|
16
|
+
# belongs to.
|
17
|
+
attr_accessor :billing_period_id
|
18
|
+
|
19
|
+
# @return [String] The id of the invoice resource that the usage belongs
|
20
|
+
# to.
|
21
|
+
attr_accessor :invoice_id
|
22
|
+
|
23
|
+
# @return [DateTime] The start of the date time range covered by the
|
24
|
+
# usage detail.
|
25
|
+
attr_accessor :usage_start
|
26
|
+
|
27
|
+
# @return [DateTime] The end of the date time range covered by the usage
|
28
|
+
# detail.
|
29
|
+
attr_accessor :usage_end
|
30
|
+
|
31
|
+
# @return [String] The name of the resource instance that the usage is
|
32
|
+
# about.
|
33
|
+
attr_accessor :instance_name
|
34
|
+
|
35
|
+
# @return [String] The uri of the resource instance that the usage is
|
36
|
+
# about.
|
37
|
+
attr_accessor :instance_id
|
38
|
+
|
39
|
+
# @return [String] The location of the resource instance that the usage
|
40
|
+
# is about.
|
41
|
+
attr_accessor :instance_location
|
42
|
+
|
43
|
+
# @return [String] The ISO currency in which the meter is charged, for
|
44
|
+
# example, USD.
|
45
|
+
attr_accessor :currency
|
46
|
+
|
47
|
+
# @return The quantity of usage.
|
48
|
+
attr_accessor :usage_quantity
|
49
|
+
|
50
|
+
# @return The billable usage quantity.
|
51
|
+
attr_accessor :billable_quantity
|
52
|
+
|
53
|
+
# @return The amount of cost before tax.
|
54
|
+
attr_accessor :pretax_cost
|
55
|
+
|
56
|
+
# @return [Boolean] The estimated usage is subject to change.
|
57
|
+
attr_accessor :is_estimated
|
58
|
+
|
59
|
+
# @return [String] The meter id.
|
60
|
+
attr_accessor :meter_id
|
61
|
+
|
62
|
+
# @return [MeterDetails] The details about the meter. By default this is
|
63
|
+
# not populated, unless it's specified in $expand.
|
64
|
+
attr_accessor :meter_details
|
65
|
+
|
66
|
+
# @return [Hash{String => String}] The list of key/value pairs for the
|
67
|
+
# additional properties, in the format 'key':'value' where key = the
|
68
|
+
# field name, and value = the field value. By default this is not
|
69
|
+
# populated, unless it's specified in $expand.
|
70
|
+
attr_accessor :additional_properties
|
71
|
+
|
72
|
+
|
73
|
+
#
|
74
|
+
# Mapper for UsageDetail class as Ruby Hash.
|
75
|
+
# This will be used for serialization/deserialization.
|
76
|
+
#
|
77
|
+
def self.mapper()
|
78
|
+
{
|
79
|
+
required: false,
|
80
|
+
serialized_name: 'UsageDetail',
|
81
|
+
type: {
|
82
|
+
name: 'Composite',
|
83
|
+
class_name: 'UsageDetail',
|
84
|
+
model_properties: {
|
85
|
+
id: {
|
86
|
+
required: false,
|
87
|
+
read_only: true,
|
88
|
+
serialized_name: 'id',
|
89
|
+
type: {
|
90
|
+
name: 'String'
|
91
|
+
}
|
92
|
+
},
|
93
|
+
name: {
|
94
|
+
required: false,
|
95
|
+
read_only: true,
|
96
|
+
serialized_name: 'name',
|
97
|
+
type: {
|
98
|
+
name: 'String'
|
99
|
+
}
|
100
|
+
},
|
101
|
+
type: {
|
102
|
+
required: false,
|
103
|
+
read_only: true,
|
104
|
+
serialized_name: 'type',
|
105
|
+
type: {
|
106
|
+
name: 'String'
|
107
|
+
}
|
108
|
+
},
|
109
|
+
tags: {
|
110
|
+
required: false,
|
111
|
+
read_only: true,
|
112
|
+
serialized_name: 'tags',
|
113
|
+
type: {
|
114
|
+
name: 'Dictionary',
|
115
|
+
value: {
|
116
|
+
required: false,
|
117
|
+
serialized_name: 'StringElementType',
|
118
|
+
type: {
|
119
|
+
name: 'String'
|
120
|
+
}
|
121
|
+
}
|
122
|
+
}
|
123
|
+
},
|
124
|
+
billing_period_id: {
|
125
|
+
required: false,
|
126
|
+
read_only: true,
|
127
|
+
serialized_name: 'properties.billingPeriodId',
|
128
|
+
type: {
|
129
|
+
name: 'String'
|
130
|
+
}
|
131
|
+
},
|
132
|
+
invoice_id: {
|
133
|
+
required: false,
|
134
|
+
read_only: true,
|
135
|
+
serialized_name: 'properties.invoiceId',
|
136
|
+
type: {
|
137
|
+
name: 'String'
|
138
|
+
}
|
139
|
+
},
|
140
|
+
usage_start: {
|
141
|
+
required: false,
|
142
|
+
read_only: true,
|
143
|
+
serialized_name: 'properties.usageStart',
|
144
|
+
type: {
|
145
|
+
name: 'DateTime'
|
146
|
+
}
|
147
|
+
},
|
148
|
+
usage_end: {
|
149
|
+
required: false,
|
150
|
+
read_only: true,
|
151
|
+
serialized_name: 'properties.usageEnd',
|
152
|
+
type: {
|
153
|
+
name: 'DateTime'
|
154
|
+
}
|
155
|
+
},
|
156
|
+
instance_name: {
|
157
|
+
required: false,
|
158
|
+
read_only: true,
|
159
|
+
serialized_name: 'properties.instanceName',
|
160
|
+
type: {
|
161
|
+
name: 'String'
|
162
|
+
}
|
163
|
+
},
|
164
|
+
instance_id: {
|
165
|
+
required: false,
|
166
|
+
read_only: true,
|
167
|
+
serialized_name: 'properties.instanceId',
|
168
|
+
type: {
|
169
|
+
name: 'String'
|
170
|
+
}
|
171
|
+
},
|
172
|
+
instance_location: {
|
173
|
+
required: false,
|
174
|
+
read_only: true,
|
175
|
+
serialized_name: 'properties.instanceLocation',
|
176
|
+
type: {
|
177
|
+
name: 'String'
|
178
|
+
}
|
179
|
+
},
|
180
|
+
currency: {
|
181
|
+
required: false,
|
182
|
+
read_only: true,
|
183
|
+
serialized_name: 'properties.currency',
|
184
|
+
type: {
|
185
|
+
name: 'String'
|
186
|
+
}
|
187
|
+
},
|
188
|
+
usage_quantity: {
|
189
|
+
required: false,
|
190
|
+
read_only: true,
|
191
|
+
serialized_name: 'properties.usageQuantity',
|
192
|
+
type: {
|
193
|
+
name: 'Number'
|
194
|
+
}
|
195
|
+
},
|
196
|
+
billable_quantity: {
|
197
|
+
required: false,
|
198
|
+
read_only: true,
|
199
|
+
serialized_name: 'properties.billableQuantity',
|
200
|
+
type: {
|
201
|
+
name: 'Number'
|
202
|
+
}
|
203
|
+
},
|
204
|
+
pretax_cost: {
|
205
|
+
required: false,
|
206
|
+
read_only: true,
|
207
|
+
serialized_name: 'properties.pretaxCost',
|
208
|
+
type: {
|
209
|
+
name: 'Number'
|
210
|
+
}
|
211
|
+
},
|
212
|
+
is_estimated: {
|
213
|
+
required: false,
|
214
|
+
read_only: true,
|
215
|
+
serialized_name: 'properties.isEstimated',
|
216
|
+
type: {
|
217
|
+
name: 'Boolean'
|
218
|
+
}
|
219
|
+
},
|
220
|
+
meter_id: {
|
221
|
+
required: false,
|
222
|
+
read_only: true,
|
223
|
+
serialized_name: 'properties.meterId',
|
224
|
+
type: {
|
225
|
+
name: 'String'
|
226
|
+
}
|
227
|
+
},
|
228
|
+
meter_details: {
|
229
|
+
required: false,
|
230
|
+
read_only: true,
|
231
|
+
serialized_name: 'properties.meterDetails',
|
232
|
+
type: {
|
233
|
+
name: 'Composite',
|
234
|
+
class_name: 'MeterDetails'
|
235
|
+
}
|
236
|
+
},
|
237
|
+
additional_properties: {
|
238
|
+
required: false,
|
239
|
+
read_only: true,
|
240
|
+
serialized_name: 'properties.additionalProperties',
|
241
|
+
type: {
|
242
|
+
name: 'Dictionary',
|
243
|
+
value: {
|
244
|
+
required: false,
|
245
|
+
serialized_name: 'StringElementType',
|
246
|
+
type: {
|
247
|
+
name: 'String'
|
248
|
+
}
|
249
|
+
}
|
250
|
+
}
|
251
|
+
}
|
252
|
+
}
|
253
|
+
}
|
254
|
+
}
|
255
|
+
end
|
256
|
+
end
|
257
|
+
end
|
258
|
+
end
|