azure_mgmt_reservations 0.20.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations.rb +53 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/models/applied_reservation_list.rb +66 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/models/applied_reservations.rb +85 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/models/catalog.rb +166 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/models/error.rb +48 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/models/extended_error_info.rb +84 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/models/extended_status_info.rb +61 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/models/kind.rb +15 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/models/merge_request.rb +56 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/models/operation_display.rb +80 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/models/operation_list.rb +98 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/models/operation_response.rb +70 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/models/patch.rb +66 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/models/reservation_list.rb +98 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/models/reservation_merge_properties.rb +70 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/models/reservation_order_list.rb +98 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/models/reservation_order_response.rb +187 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/models/reservation_properties.rb +176 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/models/reservation_response.rb +137 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/models/reservation_split_properties.rb +70 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/models/sku_capability.rb +58 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/models/sku_name.rb +47 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/models/sku_restriction.rb +79 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/models/split_request.rb +69 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/module_definition.rb +9 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/operation.rb +232 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/reservation.rb +1125 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/reservation_order.rb +338 -0
- data/lib/2017-11-01/generated/azure_mgmt_reservations/reservations_management_client.rb +339 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations.rb +58 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/applied_reservation_list.rb +66 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/applied_reservations.rb +85 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/applied_scope_type.rb +16 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/catalog.rb +143 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/error.rb +48 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/error_response_code.rb +69 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/extended_error_info.rb +84 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/extended_status_info.rb +61 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/instance_flexibility.rb +17 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/merge_request.rb +56 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/operation_display.rb +80 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/operation_list.rb +98 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/operation_response.rb +70 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/patch.rb +89 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/reservation_list.rb +98 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/reservation_merge_properties.rb +70 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/reservation_order_list.rb +98 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/reservation_order_response.rb +184 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/reservation_properties.rb +208 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/reservation_response.rb +120 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/reservation_split_properties.rb +70 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/reservation_status_code.rb +23 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/reservation_term.rb +16 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/reserved_resource_type.rb +19 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/sku_name.rb +47 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/sku_property.rb +58 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/sku_restriction.rb +79 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/models/split_request.rb +69 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/module_definition.rb +9 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/operation.rb +232 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/reservation.rb +1125 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/reservation_order.rb +338 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/reservations_management_client.rb +352 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations.rb +76 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/applied_reservation_list.rb +66 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/applied_reservations.rb +85 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/applied_scope_type.rb +16 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/calculate_price_response.rb +48 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/calculate_price_response_properties.rb +130 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/calculate_price_response_properties_billing_currency_total.rb +59 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/calculate_price_response_properties_pricing_currency_total.rb +59 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/catalog.rb +171 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/error.rb +48 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/error_response_code.rb +69 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/extended_error_info.rb +84 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/extended_status_info.rb +61 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/instance_flexibility.rb +16 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/merge_request.rb +56 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/operation_display.rb +80 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/operation_list.rb +98 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/operation_response.rb +70 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/patch.rb +111 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/patch_properties_renew_properties.rb +48 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/payment_detail.rb +118 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/payment_status.rb +18 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/price.rb +59 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/properties.rb +48 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/purchase_request.rb +183 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/purchase_request_properties_reserved_resource_properties.rb +48 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/renew_properties_response.rb +76 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/renew_properties_response_billing_currency_total.rb +59 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/renew_properties_response_pricing_currency_total.rb +60 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/reservation_billing_plan.rb +16 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/reservation_list.rb +98 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/reservation_merge_properties.rb +70 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/reservation_order_billing_plan_information.rb +91 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/reservation_order_list.rb +98 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/reservation_order_response.rb +207 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/reservation_properties.rb +290 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/reservation_response.rb +120 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/reservation_split_properties.rb +70 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/reservation_status_code.rb +23 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/reservation_term.rb +16 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/reserved_resource_type.rb +22 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/scope_properties.rb +58 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/sku_name.rb +47 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/sku_property.rb +58 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/sku_restriction.rb +79 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/split_request.rb +69 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/subscription_scope_properties.rb +56 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/module_definition.rb +9 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/operation.rb +232 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/reservation.rb +1266 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/reservation_order.rb +607 -0
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/reservations_management_client.rb +355 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations.rb +54 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/auto_quota_increase.rb +223 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/actions.rb +47 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/aqi_settings.rb +46 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/auto_quota_increase_detail.rb +119 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/create_generic_quota_request_parameters.rb +55 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/current_quota_limit.rb +71 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/current_quota_limit_base.rb +47 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/email_action.rb +46 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/email_actions.rb +55 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/exception_response.rb +47 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/phone_action.rb +57 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_limits.rb +99 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_limits_response.rb +68 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_properties.rb +120 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_request_details.rb +128 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_request_details_list.rb +99 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_request_one_resource_submit_response.rb +121 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_request_properties.rb +92 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_request_submit_response.rb +83 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_request_submit_response201.rb +96 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/resource_name.rb +59 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/service_error.rb +78 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/service_error_detail.rb +59 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/sub_request.rb +118 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/support_request_action.rb +142 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/module_definition.rb +9 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/quota.rb +805 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/quota_request_status.rb +397 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/reservations_management_client.rb +136 -0
- data/lib/azure_mgmt_reservations.rb +9 -0
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/latest/modules/reservations_profile_module.rb +359 -0
- data/lib/profiles/latest/reservations_latest_profile_client.rb +40 -0
- data/lib/profiles/latest/reservations_module_definition.rb +8 -0
- data/lib/version.rb +7 -0
- metadata +269 -0
@@ -0,0 +1,47 @@
|
|
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::Reservations::Mgmt::V2018_06_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Model object.
|
10
|
+
#
|
11
|
+
#
|
12
|
+
class SkuName
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [String]
|
17
|
+
attr_accessor :name
|
18
|
+
|
19
|
+
|
20
|
+
#
|
21
|
+
# Mapper for SkuName class as Ruby Hash.
|
22
|
+
# This will be used for serialization/deserialization.
|
23
|
+
#
|
24
|
+
def self.mapper()
|
25
|
+
{
|
26
|
+
client_side_validation: true,
|
27
|
+
required: false,
|
28
|
+
serialized_name: 'SkuName',
|
29
|
+
type: {
|
30
|
+
name: 'Composite',
|
31
|
+
class_name: 'SkuName',
|
32
|
+
model_properties: {
|
33
|
+
name: {
|
34
|
+
client_side_validation: true,
|
35
|
+
required: false,
|
36
|
+
serialized_name: 'name',
|
37
|
+
type: {
|
38
|
+
name: 'String'
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,58 @@
|
|
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::Reservations::Mgmt::V2018_06_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Model object.
|
10
|
+
#
|
11
|
+
#
|
12
|
+
class SkuProperty
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [String] An invariant to describe the feature.
|
17
|
+
attr_accessor :name
|
18
|
+
|
19
|
+
# @return [String] An invariant if the feature is measured by quantity.
|
20
|
+
attr_accessor :value
|
21
|
+
|
22
|
+
|
23
|
+
#
|
24
|
+
# Mapper for SkuProperty class as Ruby Hash.
|
25
|
+
# This will be used for serialization/deserialization.
|
26
|
+
#
|
27
|
+
def self.mapper()
|
28
|
+
{
|
29
|
+
client_side_validation: true,
|
30
|
+
required: false,
|
31
|
+
serialized_name: 'SkuProperty',
|
32
|
+
type: {
|
33
|
+
name: 'Composite',
|
34
|
+
class_name: 'SkuProperty',
|
35
|
+
model_properties: {
|
36
|
+
name: {
|
37
|
+
client_side_validation: true,
|
38
|
+
required: false,
|
39
|
+
serialized_name: 'name',
|
40
|
+
type: {
|
41
|
+
name: 'String'
|
42
|
+
}
|
43
|
+
},
|
44
|
+
value: {
|
45
|
+
client_side_validation: true,
|
46
|
+
required: false,
|
47
|
+
serialized_name: 'value',
|
48
|
+
type: {
|
49
|
+
name: 'String'
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,79 @@
|
|
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::Reservations::Mgmt::V2018_06_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Model object.
|
10
|
+
#
|
11
|
+
#
|
12
|
+
class SkuRestriction
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [String] The type of restrictions.
|
17
|
+
attr_accessor :type
|
18
|
+
|
19
|
+
# @return [Array<String>] The value of restrictions. If the restriction
|
20
|
+
# type is set to location. This would be different locations where the
|
21
|
+
# SKU is restricted.
|
22
|
+
attr_accessor :values
|
23
|
+
|
24
|
+
# @return [String] The reason for restriction.
|
25
|
+
attr_accessor :reason_code
|
26
|
+
|
27
|
+
|
28
|
+
#
|
29
|
+
# Mapper for SkuRestriction class as Ruby Hash.
|
30
|
+
# This will be used for serialization/deserialization.
|
31
|
+
#
|
32
|
+
def self.mapper()
|
33
|
+
{
|
34
|
+
client_side_validation: true,
|
35
|
+
required: false,
|
36
|
+
serialized_name: 'SkuRestriction',
|
37
|
+
type: {
|
38
|
+
name: 'Composite',
|
39
|
+
class_name: 'SkuRestriction',
|
40
|
+
model_properties: {
|
41
|
+
type: {
|
42
|
+
client_side_validation: true,
|
43
|
+
required: false,
|
44
|
+
serialized_name: 'type',
|
45
|
+
type: {
|
46
|
+
name: 'String'
|
47
|
+
}
|
48
|
+
},
|
49
|
+
values: {
|
50
|
+
client_side_validation: true,
|
51
|
+
required: false,
|
52
|
+
serialized_name: 'values',
|
53
|
+
type: {
|
54
|
+
name: 'Sequence',
|
55
|
+
element: {
|
56
|
+
client_side_validation: true,
|
57
|
+
required: false,
|
58
|
+
serialized_name: 'StringElementType',
|
59
|
+
type: {
|
60
|
+
name: 'String'
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
},
|
65
|
+
reason_code: {
|
66
|
+
client_side_validation: true,
|
67
|
+
required: false,
|
68
|
+
serialized_name: 'reasonCode',
|
69
|
+
type: {
|
70
|
+
name: 'String'
|
71
|
+
}
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,69 @@
|
|
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::Reservations::Mgmt::V2018_06_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Model object.
|
10
|
+
#
|
11
|
+
#
|
12
|
+
class SplitRequest
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [Array<Integer>] List of the quantities in the new reservations
|
17
|
+
# to create.
|
18
|
+
attr_accessor :quantities
|
19
|
+
|
20
|
+
# @return [String] Resource id of the reservation to be split. Format of
|
21
|
+
# the resource id should be
|
22
|
+
# /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}
|
23
|
+
attr_accessor :reservation_id
|
24
|
+
|
25
|
+
|
26
|
+
#
|
27
|
+
# Mapper for SplitRequest class as Ruby Hash.
|
28
|
+
# This will be used for serialization/deserialization.
|
29
|
+
#
|
30
|
+
def self.mapper()
|
31
|
+
{
|
32
|
+
client_side_validation: true,
|
33
|
+
required: false,
|
34
|
+
serialized_name: 'SplitRequest',
|
35
|
+
type: {
|
36
|
+
name: 'Composite',
|
37
|
+
class_name: 'SplitRequest',
|
38
|
+
model_properties: {
|
39
|
+
quantities: {
|
40
|
+
client_side_validation: true,
|
41
|
+
required: false,
|
42
|
+
serialized_name: 'properties.quantities',
|
43
|
+
type: {
|
44
|
+
name: 'Sequence',
|
45
|
+
element: {
|
46
|
+
client_side_validation: true,
|
47
|
+
required: false,
|
48
|
+
serialized_name: 'NumberElementType',
|
49
|
+
type: {
|
50
|
+
name: 'Number'
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
},
|
55
|
+
reservation_id: {
|
56
|
+
client_side_validation: true,
|
57
|
+
required: false,
|
58
|
+
serialized_name: 'properties.reservationId',
|
59
|
+
type: {
|
60
|
+
name: 'String'
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
|
+
}
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,9 @@
|
|
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 end
|
7
|
+
module Azure::Reservations end
|
8
|
+
module Azure::Reservations::Mgmt end
|
9
|
+
module Azure::Reservations::Mgmt::V2018_06_01_preview end
|
@@ -0,0 +1,232 @@
|
|
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::Reservations::Mgmt::V2018_06_01_preview
|
7
|
+
#
|
8
|
+
# This API describe Azure Reservation
|
9
|
+
#
|
10
|
+
class Operation
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Operation class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [ReservationsManagementClient] reference to the ReservationsManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Get operations.
|
26
|
+
#
|
27
|
+
# List all the operations.
|
28
|
+
#
|
29
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
30
|
+
# will be added to the HTTP request.
|
31
|
+
#
|
32
|
+
# @return [Array<OperationResponse>] operation results.
|
33
|
+
#
|
34
|
+
def list(custom_headers:nil)
|
35
|
+
first_page = list_as_lazy(custom_headers:custom_headers)
|
36
|
+
first_page.get_all_items
|
37
|
+
end
|
38
|
+
|
39
|
+
#
|
40
|
+
# Get operations.
|
41
|
+
#
|
42
|
+
# List all the operations.
|
43
|
+
#
|
44
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
45
|
+
# will be added to the HTTP request.
|
46
|
+
#
|
47
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
48
|
+
#
|
49
|
+
def list_with_http_info(custom_headers:nil)
|
50
|
+
list_async(custom_headers:custom_headers).value!
|
51
|
+
end
|
52
|
+
|
53
|
+
#
|
54
|
+
# Get operations.
|
55
|
+
#
|
56
|
+
# List all the operations.
|
57
|
+
#
|
58
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
59
|
+
# to the HTTP request.
|
60
|
+
#
|
61
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
62
|
+
#
|
63
|
+
def list_async(custom_headers:nil)
|
64
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
65
|
+
|
66
|
+
|
67
|
+
request_headers = {}
|
68
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
69
|
+
|
70
|
+
# Set Headers
|
71
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
72
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
73
|
+
path_template = 'providers/Microsoft.Capacity/operations'
|
74
|
+
|
75
|
+
request_url = @base_url || @client.base_url
|
76
|
+
|
77
|
+
options = {
|
78
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
79
|
+
query_params: {'api-version' => @client.api_version},
|
80
|
+
headers: request_headers.merge(custom_headers || {}),
|
81
|
+
base_url: request_url
|
82
|
+
}
|
83
|
+
promise = @client.make_request_async(:get, path_template, options)
|
84
|
+
|
85
|
+
promise = promise.then do |result|
|
86
|
+
http_response = result.response
|
87
|
+
status_code = http_response.status
|
88
|
+
response_content = http_response.body
|
89
|
+
unless status_code == 200
|
90
|
+
error_model = JSON.load(response_content)
|
91
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
92
|
+
end
|
93
|
+
|
94
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
95
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
96
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
97
|
+
# Deserialize Response
|
98
|
+
if status_code == 200
|
99
|
+
begin
|
100
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
101
|
+
result_mapper = Azure::Reservations::Mgmt::V2018_06_01_preview::Models::OperationList.mapper()
|
102
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
103
|
+
rescue Exception => e
|
104
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
result
|
109
|
+
end
|
110
|
+
|
111
|
+
promise.execute
|
112
|
+
end
|
113
|
+
|
114
|
+
#
|
115
|
+
# Get operations.
|
116
|
+
#
|
117
|
+
# List all the operations.
|
118
|
+
#
|
119
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
120
|
+
# to List operation.
|
121
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
122
|
+
# will be added to the HTTP request.
|
123
|
+
#
|
124
|
+
# @return [OperationList] operation results.
|
125
|
+
#
|
126
|
+
def list_next(next_page_link, custom_headers:nil)
|
127
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
128
|
+
response.body unless response.nil?
|
129
|
+
end
|
130
|
+
|
131
|
+
#
|
132
|
+
# Get operations.
|
133
|
+
#
|
134
|
+
# List all the operations.
|
135
|
+
#
|
136
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
137
|
+
# to List operation.
|
138
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
139
|
+
# will be added to the HTTP request.
|
140
|
+
#
|
141
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
142
|
+
#
|
143
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
144
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
145
|
+
end
|
146
|
+
|
147
|
+
#
|
148
|
+
# Get operations.
|
149
|
+
#
|
150
|
+
# List all the operations.
|
151
|
+
#
|
152
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
153
|
+
# to List operation.
|
154
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
155
|
+
# to the HTTP request.
|
156
|
+
#
|
157
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
158
|
+
#
|
159
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
160
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
161
|
+
|
162
|
+
|
163
|
+
request_headers = {}
|
164
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
165
|
+
|
166
|
+
# Set Headers
|
167
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
168
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
169
|
+
path_template = '{nextLink}'
|
170
|
+
|
171
|
+
request_url = @base_url || @client.base_url
|
172
|
+
|
173
|
+
options = {
|
174
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
175
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
176
|
+
headers: request_headers.merge(custom_headers || {}),
|
177
|
+
base_url: request_url
|
178
|
+
}
|
179
|
+
promise = @client.make_request_async(:get, path_template, options)
|
180
|
+
|
181
|
+
promise = promise.then do |result|
|
182
|
+
http_response = result.response
|
183
|
+
status_code = http_response.status
|
184
|
+
response_content = http_response.body
|
185
|
+
unless status_code == 200
|
186
|
+
error_model = JSON.load(response_content)
|
187
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
188
|
+
end
|
189
|
+
|
190
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
191
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
192
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
193
|
+
# Deserialize Response
|
194
|
+
if status_code == 200
|
195
|
+
begin
|
196
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
197
|
+
result_mapper = Azure::Reservations::Mgmt::V2018_06_01_preview::Models::OperationList.mapper()
|
198
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
199
|
+
rescue Exception => e
|
200
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
result
|
205
|
+
end
|
206
|
+
|
207
|
+
promise.execute
|
208
|
+
end
|
209
|
+
|
210
|
+
#
|
211
|
+
# Get operations.
|
212
|
+
#
|
213
|
+
# List all the operations.
|
214
|
+
#
|
215
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
216
|
+
# will be added to the HTTP request.
|
217
|
+
#
|
218
|
+
# @return [OperationList] which provide lazy access to pages of the response.
|
219
|
+
#
|
220
|
+
def list_as_lazy(custom_headers:nil)
|
221
|
+
response = list_async(custom_headers:custom_headers).value!
|
222
|
+
unless response.nil?
|
223
|
+
page = response.body
|
224
|
+
page.next_method = Proc.new do |next_page_link|
|
225
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
226
|
+
end
|
227
|
+
page
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
end
|
232
|
+
end
|