azure_mgmt_subscriptions 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-11-01/generated/azure_mgmt_subscriptions/models/location.rb +95 -0
  3. data/lib/2015-11-01/generated/azure_mgmt_subscriptions/models/location_list_result.rb +52 -0
  4. data/lib/2015-11-01/generated/azure_mgmt_subscriptions/models/subscription.rb +86 -0
  5. data/lib/2015-11-01/generated/azure_mgmt_subscriptions/models/subscription_list_result.rb +94 -0
  6. data/lib/2015-11-01/generated/azure_mgmt_subscriptions/models/subscription_policies.rb +54 -0
  7. data/lib/2015-11-01/generated/azure_mgmt_subscriptions/models/tenant_id_description.rb +54 -0
  8. data/lib/2015-11-01/generated/azure_mgmt_subscriptions/models/tenant_list_result.rb +94 -0
  9. data/lib/2015-11-01/generated/azure_mgmt_subscriptions/module_definition.rb +9 -0
  10. data/lib/2015-11-01/generated/azure_mgmt_subscriptions/subscription_client.rb +130 -0
  11. data/lib/2015-11-01/generated/azure_mgmt_subscriptions/subscriptions.rb +385 -0
  12. data/lib/2015-11-01/generated/azure_mgmt_subscriptions/tenants.rb +213 -0
  13. data/lib/{generated → 2015-11-01/generated}/azure_mgmt_subscriptions/version.rb +2 -2
  14. data/lib/2015-11-01/generated/azure_mgmt_subscriptions.rb +36 -0
  15. data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/models/location.rb +1 -1
  16. data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/models/location_list_result.rb +1 -1
  17. data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/models/spending_limit.rb +1 -1
  18. data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/models/subscription.rb +1 -1
  19. data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/models/subscription_list_result.rb +1 -1
  20. data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/models/subscription_policies.rb +1 -1
  21. data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/models/subscription_state.rb +1 -1
  22. data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/models/tenant_id_description.rb +1 -1
  23. data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/models/tenant_list_result.rb +1 -1
  24. data/lib/2016-06-01/generated/azure_mgmt_subscriptions/module_definition.rb +9 -0
  25. data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/subscription_client.rb +3 -3
  26. data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/subscriptions.rb +5 -5
  27. data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions/tenants.rb +3 -3
  28. data/lib/{generated/azure_mgmt_subscriptions/module_definition.rb → 2016-06-01/generated/azure_mgmt_subscriptions/version.rb} +3 -3
  29. data/lib/{generated → 2016-06-01/generated}/azure_mgmt_subscriptions.rb +14 -14
  30. data/lib/azure_mgmt_subscriptions.rb +4 -1
  31. data/lib/module_definition.rb +9 -0
  32. data/lib/profiles/common/configurable.rb +73 -0
  33. data/lib/profiles/common/default.rb +68 -0
  34. data/lib/profiles/latest/modules/subscriptions_profile_module.rb +80 -0
  35. data/lib/profiles/latest/subscriptions_latest_profile_client.rb +33 -0
  36. data/lib/profiles/latest/subscriptions_module_definition.rb +9 -0
  37. data/lib/profiles/v2017_03_09/modules/subscriptions_profile_module.rb +80 -0
  38. data/lib/profiles/v2017_03_09/subscriptions_module_definition.rb +9 -0
  39. data/lib/profiles/v2017_03_09/subscriptions_v2017_03_09_profile_client.rb +33 -0
  40. data/lib/version.rb +7 -0
  41. metadata +40 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b982b247a8ee0ad02e95506d3128cfc3ea8e8a63
4
- data.tar.gz: 59fe6ff7eb02b67e2eea807140ece69a9c47e953
3
+ metadata.gz: 150c2ad991efc2865f70dc6b3ff9643138e33c53
4
+ data.tar.gz: 787b1548627940dc6ea52e1e5d7e5b327780edd6
5
5
  SHA512:
6
- metadata.gz: 31a22f426ab00c69d470539eb73d20b0e72c66d36a3a7792bb90f9144ff81cf48d479103596baf3ab843929f435de33aa300b48b153c8ef60c69612c8814ba3b
7
- data.tar.gz: 4fb8af9d98abb0459b538b0ae76f7f870431037f66ed27d118cb4f756139295c3280571095653f098d1eda62a03869897d26fbc6f04ef163d9c6e76ba3aab5a4
6
+ metadata.gz: ba976a860a1e42dde73be87c7c8b6f1d95c95b6a571db3a04fb34d65818919b3783f0d1699d7d9d5fb64863e9ae3b7986b26797d9a9d523be670dd51c31d379c
7
+ data.tar.gz: 24945ca593091a1ab154311b55d0f00fe67a7f6de90c5f70c669030fca6197665425446e3a517bc3ca036b800271b8ca05b29ec2817409649957274659cc57ec
@@ -0,0 +1,95 @@
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::Subscriptions::Mgmt::V2015_11_01
7
+ module Models
8
+ #
9
+ # Location information.
10
+ #
11
+ class Location
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets the ID of the resource
16
+ # (/subscriptions/SubscriptionId).
17
+ attr_accessor :id
18
+
19
+ # @return [String] Gets or sets the subscription Id.
20
+ attr_accessor :subscription_id
21
+
22
+ # @return [String] Gets or sets the location name
23
+ attr_accessor :name
24
+
25
+ # @return [String] Gets or sets the display name of the location
26
+ attr_accessor :display_name
27
+
28
+ # @return [String] Gets or sets the latitude of the location
29
+ attr_accessor :latitude
30
+
31
+ # @return [String] Gets or sets the longitude of the location
32
+ attr_accessor :longitude
33
+
34
+
35
+ #
36
+ # Mapper for Location class as Ruby Hash.
37
+ # This will be used for serialization/deserialization.
38
+ #
39
+ def self.mapper()
40
+ {
41
+ required: false,
42
+ serialized_name: 'Location',
43
+ type: {
44
+ name: 'Composite',
45
+ class_name: 'Location',
46
+ model_properties: {
47
+ id: {
48
+ required: false,
49
+ serialized_name: 'id',
50
+ type: {
51
+ name: 'String'
52
+ }
53
+ },
54
+ subscription_id: {
55
+ required: false,
56
+ serialized_name: 'subscriptionId',
57
+ type: {
58
+ name: 'String'
59
+ }
60
+ },
61
+ name: {
62
+ required: false,
63
+ serialized_name: 'name',
64
+ type: {
65
+ name: 'String'
66
+ }
67
+ },
68
+ display_name: {
69
+ required: false,
70
+ serialized_name: 'displayName',
71
+ type: {
72
+ name: 'String'
73
+ }
74
+ },
75
+ latitude: {
76
+ required: false,
77
+ serialized_name: 'latitude',
78
+ type: {
79
+ name: 'String'
80
+ }
81
+ },
82
+ longitude: {
83
+ required: false,
84
+ serialized_name: 'longitude',
85
+ type: {
86
+ name: 'String'
87
+ }
88
+ }
89
+ }
90
+ }
91
+ }
92
+ end
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,52 @@
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::Subscriptions::Mgmt::V2015_11_01
7
+ module Models
8
+ #
9
+ # Location list operation response.
10
+ #
11
+ class LocationListResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<Location>] Gets the locations.
16
+ attr_accessor :value
17
+
18
+
19
+ #
20
+ # Mapper for LocationListResult class as Ruby Hash.
21
+ # This will be used for serialization/deserialization.
22
+ #
23
+ def self.mapper()
24
+ {
25
+ required: false,
26
+ serialized_name: 'LocationListResult',
27
+ type: {
28
+ name: 'Composite',
29
+ class_name: 'LocationListResult',
30
+ model_properties: {
31
+ value: {
32
+ required: false,
33
+ serialized_name: 'value',
34
+ type: {
35
+ name: 'Sequence',
36
+ element: {
37
+ required: false,
38
+ serialized_name: 'LocationElementType',
39
+ type: {
40
+ name: 'Composite',
41
+ class_name: 'Location'
42
+ }
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,86 @@
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::Subscriptions::Mgmt::V2015_11_01
7
+ module Models
8
+ #
9
+ # Subscription information.
10
+ #
11
+ class Subscription
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets the ID of the resource
16
+ # (/subscriptions/SubscriptionId).
17
+ attr_accessor :id
18
+
19
+ # @return [String] Gets or sets the subscription Id.
20
+ attr_accessor :subscription_id
21
+
22
+ # @return [String] Gets or sets the subscription display name
23
+ attr_accessor :display_name
24
+
25
+ # @return [String] Gets or sets the subscription state
26
+ attr_accessor :state
27
+
28
+ # @return [SubscriptionPolicies] Gets or sets the subscription policies.
29
+ attr_accessor :subscription_policies
30
+
31
+
32
+ #
33
+ # Mapper for Subscription class as Ruby Hash.
34
+ # This will be used for serialization/deserialization.
35
+ #
36
+ def self.mapper()
37
+ {
38
+ required: false,
39
+ serialized_name: 'Subscription',
40
+ type: {
41
+ name: 'Composite',
42
+ class_name: 'Subscription',
43
+ model_properties: {
44
+ id: {
45
+ required: false,
46
+ serialized_name: 'id',
47
+ type: {
48
+ name: 'String'
49
+ }
50
+ },
51
+ subscription_id: {
52
+ required: false,
53
+ serialized_name: 'subscriptionId',
54
+ type: {
55
+ name: 'String'
56
+ }
57
+ },
58
+ display_name: {
59
+ required: false,
60
+ serialized_name: 'displayName',
61
+ type: {
62
+ name: 'String'
63
+ }
64
+ },
65
+ state: {
66
+ required: false,
67
+ serialized_name: 'state',
68
+ type: {
69
+ name: 'String'
70
+ }
71
+ },
72
+ subscription_policies: {
73
+ required: false,
74
+ serialized_name: 'subscriptionPolicies',
75
+ type: {
76
+ name: 'Composite',
77
+ class_name: 'SubscriptionPolicies'
78
+ }
79
+ }
80
+ }
81
+ }
82
+ }
83
+ end
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,94 @@
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::Subscriptions::Mgmt::V2015_11_01
7
+ module Models
8
+ #
9
+ # Subscription list operation response.
10
+ #
11
+ class SubscriptionListResult
12
+
13
+ include MsRestAzure
14
+
15
+ include MsRest::JSONable
16
+ # @return [Array<Subscription>] Gets or sets subscriptions.
17
+ attr_accessor :value
18
+
19
+ # @return [String] Gets or sets the URL to get the next set of results.
20
+ attr_accessor :next_link
21
+
22
+ # return [Proc] with next page method call.
23
+ attr_accessor :next_method
24
+
25
+ #
26
+ # Gets the rest of the items for the request, enabling auto-pagination.
27
+ #
28
+ # @return [Array<Subscription>] operation results.
29
+ #
30
+ def get_all_items
31
+ items = @value
32
+ page = self
33
+ while page.next_link != nil do
34
+ page = page.get_next_page
35
+ items.concat(page.value)
36
+ end
37
+ items
38
+ end
39
+
40
+ #
41
+ # Gets the next page of results.
42
+ #
43
+ # @return [SubscriptionListResult] with next page content.
44
+ #
45
+ def get_next_page
46
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
47
+ unless response.nil?
48
+ @next_link = response.body.next_link
49
+ @value = response.body.value
50
+ self
51
+ end
52
+ end
53
+
54
+ #
55
+ # Mapper for SubscriptionListResult class as Ruby Hash.
56
+ # This will be used for serialization/deserialization.
57
+ #
58
+ def self.mapper()
59
+ {
60
+ required: false,
61
+ serialized_name: 'SubscriptionListResult',
62
+ type: {
63
+ name: 'Composite',
64
+ class_name: 'SubscriptionListResult',
65
+ model_properties: {
66
+ value: {
67
+ required: false,
68
+ serialized_name: 'value',
69
+ type: {
70
+ name: 'Sequence',
71
+ element: {
72
+ required: false,
73
+ serialized_name: 'SubscriptionElementType',
74
+ type: {
75
+ name: 'Composite',
76
+ class_name: 'Subscription'
77
+ }
78
+ }
79
+ }
80
+ },
81
+ next_link: {
82
+ required: true,
83
+ serialized_name: 'nextLink',
84
+ type: {
85
+ name: 'String'
86
+ }
87
+ }
88
+ }
89
+ }
90
+ }
91
+ end
92
+ end
93
+ end
94
+ end
@@ -0,0 +1,54 @@
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::Subscriptions::Mgmt::V2015_11_01
7
+ module Models
8
+ #
9
+ # Subscription policies.
10
+ #
11
+ class SubscriptionPolicies
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets the subscription location placement Id.
16
+ attr_accessor :location_placement_id
17
+
18
+ # @return [String] Gets or sets the subscription quota Id.
19
+ attr_accessor :quota_id
20
+
21
+
22
+ #
23
+ # Mapper for SubscriptionPolicies class as Ruby Hash.
24
+ # This will be used for serialization/deserialization.
25
+ #
26
+ def self.mapper()
27
+ {
28
+ required: false,
29
+ serialized_name: 'SubscriptionPolicies',
30
+ type: {
31
+ name: 'Composite',
32
+ class_name: 'SubscriptionPolicies',
33
+ model_properties: {
34
+ location_placement_id: {
35
+ required: false,
36
+ serialized_name: 'locationPlacementId',
37
+ type: {
38
+ name: 'String'
39
+ }
40
+ },
41
+ quota_id: {
42
+ required: false,
43
+ serialized_name: 'quotaId',
44
+ type: {
45
+ name: 'String'
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,54 @@
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::Subscriptions::Mgmt::V2015_11_01
7
+ module Models
8
+ #
9
+ # Tenant Id information
10
+ #
11
+ class TenantIdDescription
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets Id
16
+ attr_accessor :id
17
+
18
+ # @return [String] Gets or sets tenantId
19
+ attr_accessor :tenant_id
20
+
21
+
22
+ #
23
+ # Mapper for TenantIdDescription class as Ruby Hash.
24
+ # This will be used for serialization/deserialization.
25
+ #
26
+ def self.mapper()
27
+ {
28
+ required: false,
29
+ serialized_name: 'TenantIdDescription',
30
+ type: {
31
+ name: 'Composite',
32
+ class_name: 'TenantIdDescription',
33
+ model_properties: {
34
+ id: {
35
+ required: false,
36
+ serialized_name: 'id',
37
+ type: {
38
+ name: 'String'
39
+ }
40
+ },
41
+ tenant_id: {
42
+ required: false,
43
+ serialized_name: 'tenantId',
44
+ type: {
45
+ name: 'String'
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,94 @@
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::Subscriptions::Mgmt::V2015_11_01
7
+ module Models
8
+ #
9
+ # Tenant Ids information.
10
+ #
11
+ class TenantListResult
12
+
13
+ include MsRestAzure
14
+
15
+ include MsRest::JSONable
16
+ # @return [Array<TenantIdDescription>] Gets or sets tenant Ids.
17
+ attr_accessor :value
18
+
19
+ # @return [String] Gets or sets the URL to get the next set of results.
20
+ attr_accessor :next_link
21
+
22
+ # return [Proc] with next page method call.
23
+ attr_accessor :next_method
24
+
25
+ #
26
+ # Gets the rest of the items for the request, enabling auto-pagination.
27
+ #
28
+ # @return [Array<TenantIdDescription>] operation results.
29
+ #
30
+ def get_all_items
31
+ items = @value
32
+ page = self
33
+ while page.next_link != nil do
34
+ page = page.get_next_page
35
+ items.concat(page.value)
36
+ end
37
+ items
38
+ end
39
+
40
+ #
41
+ # Gets the next page of results.
42
+ #
43
+ # @return [TenantListResult] with next page content.
44
+ #
45
+ def get_next_page
46
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
47
+ unless response.nil?
48
+ @next_link = response.body.next_link
49
+ @value = response.body.value
50
+ self
51
+ end
52
+ end
53
+
54
+ #
55
+ # Mapper for TenantListResult class as Ruby Hash.
56
+ # This will be used for serialization/deserialization.
57
+ #
58
+ def self.mapper()
59
+ {
60
+ required: false,
61
+ serialized_name: 'TenantListResult',
62
+ type: {
63
+ name: 'Composite',
64
+ class_name: 'TenantListResult',
65
+ model_properties: {
66
+ value: {
67
+ required: false,
68
+ serialized_name: 'value',
69
+ type: {
70
+ name: 'Sequence',
71
+ element: {
72
+ required: false,
73
+ serialized_name: 'TenantIdDescriptionElementType',
74
+ type: {
75
+ name: 'Composite',
76
+ class_name: 'TenantIdDescription'
77
+ }
78
+ }
79
+ }
80
+ },
81
+ next_link: {
82
+ required: true,
83
+ serialized_name: 'nextLink',
84
+ type: {
85
+ name: 'String'
86
+ }
87
+ }
88
+ }
89
+ }
90
+ }
91
+ end
92
+ end
93
+ end
94
+ 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::Subscriptions end
8
+ module Azure::Subscriptions::Mgmt end
9
+ module Azure::Subscriptions::Mgmt::V2015_11_01 end
@@ -0,0 +1,130 @@
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::Subscriptions::Mgmt::V2015_11_01
7
+ #
8
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class SubscriptionClient < MsRestAzure::AzureServiceClient
11
+ include MsRestAzure
12
+ include MsRestAzure::Serialization
13
+
14
+ # @return [String] the base URI of the service.
15
+ attr_accessor :base_url
16
+
17
+ # @return Credentials needed for the client to connect to Azure.
18
+ attr_reader :credentials
19
+
20
+ # @return [String] Client Api Version.
21
+ attr_reader :api_version
22
+
23
+ # @return [String] Gets or sets the preferred language for the response.
24
+ attr_accessor :accept_language
25
+
26
+ # @return [Integer] Gets or sets the retry timeout in seconds for Long
27
+ # Running Operations. Default value is 30.
28
+ attr_accessor :long_running_operation_retry_timeout
29
+
30
+ # @return [Boolean] When set to true a unique x-ms-client-request-id value
31
+ # is generated and included in each request. Default is true.
32
+ attr_accessor :generate_client_request_id
33
+
34
+ # @return [Subscriptions] subscriptions
35
+ attr_reader :subscriptions
36
+
37
+ # @return [Tenants] tenants
38
+ attr_reader :tenants
39
+
40
+ #
41
+ # Creates initializes a new instance of the SubscriptionClient class.
42
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
43
+ # @param base_url [String] the base URI of the service.
44
+ # @param options [Array] filters to be applied to the HTTP requests.
45
+ #
46
+ def initialize(credentials = nil, base_url = nil, options = nil)
47
+ super(credentials, options)
48
+ @base_url = base_url || 'https://management.azure.com'
49
+
50
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
51
+ @credentials = credentials
52
+
53
+ @subscriptions = Subscriptions.new(self)
54
+ @tenants = Tenants.new(self)
55
+ @api_version = '2015-11-01'
56
+ @accept_language = 'en-US'
57
+ @long_running_operation_retry_timeout = 30
58
+ @generate_client_request_id = true
59
+ add_telemetry
60
+ end
61
+
62
+ #
63
+ # Makes a request and returns the body of the response.
64
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
65
+ # @param path [String] the path, relative to {base_url}.
66
+ # @param options [Hash{String=>String}] specifying any request options like :body.
67
+ # @return [Hash{String=>String}] containing the body of the response.
68
+ # Example:
69
+ #
70
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
71
+ # path = "/path"
72
+ # options = {
73
+ # body: request_content,
74
+ # query_params: {'api-version' => '2016-02-01'}
75
+ # }
76
+ # result = @client.make_request(:put, path, options)
77
+ #
78
+ def make_request(method, path, options = {})
79
+ result = make_request_with_http_info(method, path, options)
80
+ result.body unless result.nil?
81
+ end
82
+
83
+ #
84
+ # Makes a request and returns the operation response.
85
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
86
+ # @param path [String] the path, relative to {base_url}.
87
+ # @param options [Hash{String=>String}] specifying any request options like :body.
88
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
89
+ #
90
+ def make_request_with_http_info(method, path, options = {})
91
+ result = make_request_async(method, path, options).value!
92
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
93
+ result
94
+ end
95
+
96
+ #
97
+ # Makes a request asynchronously.
98
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
99
+ # @param path [String] the path, relative to {base_url}.
100
+ # @param options [Hash{String=>String}] specifying any request options like :body.
101
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
102
+ #
103
+ def make_request_async(method, path, options = {})
104
+ fail ArgumentError, 'method is nil' if method.nil?
105
+ fail ArgumentError, 'path is nil' if path.nil?
106
+
107
+ request_url = options[:base_url] || @base_url
108
+
109
+ request_headers = @request_headers
110
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
111
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
112
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
113
+
114
+ super(request_url, method, path, options)
115
+ end
116
+
117
+
118
+ private
119
+ #
120
+ # Adds telemetry information.
121
+ #
122
+ def add_telemetry
123
+ sdk_information = 'azure_mgmt_subscriptions'
124
+ if defined? Azure::Subscriptions::Mgmt::V2015_11_01::VERSION
125
+ sdk_information = "#{sdk_information}/#{Azure::Subscriptions::Mgmt::V2015_11_01::VERSION}"
126
+ end
127
+ add_user_agent_information(sdk_information)
128
+ end
129
+ end
130
+ end