azure_mgmt_mixedreality 0.17.1 → 0.17.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/mixed_reality_client.rb +3 -1
- data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/operations.rb +4 -0
- data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb +20 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality.rb +48 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/mixed_reality_client.rb +246 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/account_key_regenerate_request.rb +47 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/account_keys.rb +59 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/azure_entity_resource.rb +75 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/check_name_availability_request.rb +58 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/check_name_availability_response.rb +70 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/error_response.rb +84 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/name_availability.rb +16 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/name_unavailable_reason.rb +16 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/operation.rb +58 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/operation_display.rb +80 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/operation_page.rb +101 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/proxy_resource.rb +63 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/remote_rendering_account.rb +111 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/remote_rendering_account_page.rb +101 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/resource.rb +83 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/spatial_anchors_account.rb +111 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/spatial_anchors_account_page.rb +101 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/tracked_resource.rb +92 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/module_definition.rb +9 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/operations.rb +218 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb +1066 -0
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb +1066 -0
- data/lib/azure_mgmt_mixedreality.rb +1 -0
- data/lib/profiles/latest/modules/mixedreality_profile_module.rb +56 -46
- data/lib/version.rb +1 -1
- metadata +29 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3139b15608911c28c0ae4a177f57dcb07eb02480f4e817529e5511c462934a5
|
4
|
+
data.tar.gz: 7ccce45c6fb4c4f884f59b4771cc3638c53fe906a373ef885dd0d04cd7e1bb83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e945d9792ec21befcd1dd56a021e078997f5ef4e01649fefc0d77444b0740ebedf2c2a982c80df2e0fd0d4aada299b5deeecb539a07e636a59450ac549cb601
|
7
|
+
data.tar.gz: af62c5f7f75fbc0b3974465bff1dfa24b8076fbb7945c759149d0a38744056d5105427ac45b476a5f6173fe2f2c2e966b2b190ebe19cb6c84e7c0f9ba0295b30
|
@@ -209,6 +209,8 @@ module Azure::MixedReality::Mgmt::V2019_02_28_preview
|
|
209
209
|
end
|
210
210
|
|
211
211
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
212
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
213
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
212
214
|
# Deserialize Response
|
213
215
|
if status_code == 200
|
214
216
|
begin
|
@@ -233,7 +235,7 @@ module Azure::MixedReality::Mgmt::V2019_02_28_preview
|
|
233
235
|
#
|
234
236
|
def add_telemetry
|
235
237
|
sdk_information = 'azure_mgmt_mixedreality'
|
236
|
-
sdk_information = "#{sdk_information}/0.17.
|
238
|
+
sdk_information = "#{sdk_information}/0.17.2"
|
237
239
|
add_user_agent_information(sdk_information)
|
238
240
|
end
|
239
241
|
end
|
@@ -86,6 +86,8 @@ module Azure::MixedReality::Mgmt::V2019_02_28_preview
|
|
86
86
|
end
|
87
87
|
|
88
88
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
89
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
90
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
89
91
|
# Deserialize Response
|
90
92
|
if status_code == 200
|
91
93
|
begin
|
@@ -174,6 +176,8 @@ module Azure::MixedReality::Mgmt::V2019_02_28_preview
|
|
174
176
|
end
|
175
177
|
|
176
178
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
179
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
180
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
177
181
|
# Deserialize Response
|
178
182
|
if status_code == 200
|
179
183
|
begin
|
@@ -88,6 +88,8 @@ module Azure::MixedReality::Mgmt::V2019_02_28_preview
|
|
88
88
|
end
|
89
89
|
|
90
90
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
91
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
92
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
91
93
|
# Deserialize Response
|
92
94
|
if status_code == 200
|
93
95
|
begin
|
@@ -179,6 +181,8 @@ module Azure::MixedReality::Mgmt::V2019_02_28_preview
|
|
179
181
|
end
|
180
182
|
|
181
183
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
184
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
185
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
182
186
|
# Deserialize Response
|
183
187
|
if status_code == 200
|
184
188
|
begin
|
@@ -279,6 +283,8 @@ module Azure::MixedReality::Mgmt::V2019_02_28_preview
|
|
279
283
|
end
|
280
284
|
|
281
285
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
286
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
287
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
282
288
|
|
283
289
|
result
|
284
290
|
end
|
@@ -370,6 +376,8 @@ module Azure::MixedReality::Mgmt::V2019_02_28_preview
|
|
370
376
|
end
|
371
377
|
|
372
378
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
379
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
380
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
373
381
|
# Deserialize Response
|
374
382
|
if status_code == 200
|
375
383
|
begin
|
@@ -485,6 +493,8 @@ module Azure::MixedReality::Mgmt::V2019_02_28_preview
|
|
485
493
|
end
|
486
494
|
|
487
495
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
496
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
497
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
488
498
|
# Deserialize Response
|
489
499
|
if status_code == 200
|
490
500
|
begin
|
@@ -600,6 +610,8 @@ module Azure::MixedReality::Mgmt::V2019_02_28_preview
|
|
600
610
|
end
|
601
611
|
|
602
612
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
613
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
614
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
603
615
|
# Deserialize Response
|
604
616
|
if status_code == 200
|
605
617
|
begin
|
@@ -711,6 +723,8 @@ module Azure::MixedReality::Mgmt::V2019_02_28_preview
|
|
711
723
|
end
|
712
724
|
|
713
725
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
726
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
727
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
714
728
|
# Deserialize Response
|
715
729
|
if status_code == 200
|
716
730
|
begin
|
@@ -829,6 +843,8 @@ module Azure::MixedReality::Mgmt::V2019_02_28_preview
|
|
829
843
|
end
|
830
844
|
|
831
845
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
846
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
847
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
832
848
|
# Deserialize Response
|
833
849
|
if status_code == 200
|
834
850
|
begin
|
@@ -917,6 +933,8 @@ module Azure::MixedReality::Mgmt::V2019_02_28_preview
|
|
917
933
|
end
|
918
934
|
|
919
935
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
936
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
937
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
920
938
|
# Deserialize Response
|
921
939
|
if status_code == 200
|
922
940
|
begin
|
@@ -1005,6 +1023,8 @@ module Azure::MixedReality::Mgmt::V2019_02_28_preview
|
|
1005
1023
|
end
|
1006
1024
|
|
1007
1025
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1026
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1027
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1008
1028
|
# Deserialize Response
|
1009
1029
|
if status_code == 200
|
1010
1030
|
begin
|
@@ -0,0 +1,48 @@
|
|
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
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require '2019-12-02-preview/generated/azure_mgmt_mixedreality/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::MixedReality::Mgmt::V2019_12_02_preview
|
23
|
+
autoload :Operations, '2019-12-02-preview/generated/azure_mgmt_mixedreality/operations.rb'
|
24
|
+
autoload :RemoteRenderingAccounts, '2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb'
|
25
|
+
autoload :SpatialAnchorsAccounts, '2019-12-02-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb'
|
26
|
+
autoload :MixedRealityClient, '2019-12-02-preview/generated/azure_mgmt_mixedreality/mixed_reality_client.rb'
|
27
|
+
|
28
|
+
module Models
|
29
|
+
autoload :ErrorResponse, '2019-12-02-preview/generated/azure_mgmt_mixedreality/models/error_response.rb'
|
30
|
+
autoload :AccountKeys, '2019-12-02-preview/generated/azure_mgmt_mixedreality/models/account_keys.rb'
|
31
|
+
autoload :CheckNameAvailabilityResponse, '2019-12-02-preview/generated/azure_mgmt_mixedreality/models/check_name_availability_response.rb'
|
32
|
+
autoload :RemoteRenderingAccountPage, '2019-12-02-preview/generated/azure_mgmt_mixedreality/models/remote_rendering_account_page.rb'
|
33
|
+
autoload :Operation, '2019-12-02-preview/generated/azure_mgmt_mixedreality/models/operation.rb'
|
34
|
+
autoload :CheckNameAvailabilityRequest, '2019-12-02-preview/generated/azure_mgmt_mixedreality/models/check_name_availability_request.rb'
|
35
|
+
autoload :SpatialAnchorsAccountPage, '2019-12-02-preview/generated/azure_mgmt_mixedreality/models/spatial_anchors_account_page.rb'
|
36
|
+
autoload :OperationPage, '2019-12-02-preview/generated/azure_mgmt_mixedreality/models/operation_page.rb'
|
37
|
+
autoload :Resource, '2019-12-02-preview/generated/azure_mgmt_mixedreality/models/resource.rb'
|
38
|
+
autoload :OperationDisplay, '2019-12-02-preview/generated/azure_mgmt_mixedreality/models/operation_display.rb'
|
39
|
+
autoload :AccountKeyRegenerateRequest, '2019-12-02-preview/generated/azure_mgmt_mixedreality/models/account_key_regenerate_request.rb'
|
40
|
+
autoload :RemoteRenderingAccount, '2019-12-02-preview/generated/azure_mgmt_mixedreality/models/remote_rendering_account.rb'
|
41
|
+
autoload :ProxyResource, '2019-12-02-preview/generated/azure_mgmt_mixedreality/models/proxy_resource.rb'
|
42
|
+
autoload :AzureEntityResource, '2019-12-02-preview/generated/azure_mgmt_mixedreality/models/azure_entity_resource.rb'
|
43
|
+
autoload :TrackedResource, '2019-12-02-preview/generated/azure_mgmt_mixedreality/models/tracked_resource.rb'
|
44
|
+
autoload :SpatialAnchorsAccount, '2019-12-02-preview/generated/azure_mgmt_mixedreality/models/spatial_anchors_account.rb'
|
45
|
+
autoload :NameAvailability, '2019-12-02-preview/generated/azure_mgmt_mixedreality/models/name_availability.rb'
|
46
|
+
autoload :NameUnavailableReason, '2019-12-02-preview/generated/azure_mgmt_mixedreality/models/name_unavailable_reason.rb'
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,246 @@
|
|
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::MixedReality::Mgmt::V2019_12_02_preview
|
7
|
+
#
|
8
|
+
# A service client - single point of access to the REST API.
|
9
|
+
#
|
10
|
+
class MixedRealityClient < 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] Version of the API to be used with the client request.
|
21
|
+
attr_reader :api_version
|
22
|
+
|
23
|
+
# @return [String] Azure subscription ID.
|
24
|
+
attr_accessor :subscription_id
|
25
|
+
|
26
|
+
# @return [String] The preferred language for the response.
|
27
|
+
attr_accessor :accept_language
|
28
|
+
|
29
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
30
|
+
# Operations. Default value is 30.
|
31
|
+
attr_accessor :long_running_operation_retry_timeout
|
32
|
+
|
33
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
34
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
35
|
+
# generated and included in each request. Default is true.
|
36
|
+
attr_accessor :generate_client_request_id
|
37
|
+
|
38
|
+
# @return [Operations] operations
|
39
|
+
attr_reader :operations
|
40
|
+
|
41
|
+
# @return [RemoteRenderingAccounts] remote_rendering_accounts
|
42
|
+
attr_reader :remote_rendering_accounts
|
43
|
+
|
44
|
+
# @return [SpatialAnchorsAccounts] spatial_anchors_accounts
|
45
|
+
attr_reader :spatial_anchors_accounts
|
46
|
+
|
47
|
+
#
|
48
|
+
# Creates initializes a new instance of the MixedRealityClient class.
|
49
|
+
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
50
|
+
# @param base_url [String] the base URI of the service.
|
51
|
+
# @param options [Array] filters to be applied to the HTTP requests.
|
52
|
+
#
|
53
|
+
def initialize(credentials = nil, base_url = nil, options = nil)
|
54
|
+
super(credentials, options)
|
55
|
+
@base_url = base_url || 'https://management.azure.com'
|
56
|
+
|
57
|
+
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
58
|
+
@credentials = credentials
|
59
|
+
|
60
|
+
@operations = Operations.new(self)
|
61
|
+
@remote_rendering_accounts = RemoteRenderingAccounts.new(self)
|
62
|
+
@spatial_anchors_accounts = SpatialAnchorsAccounts.new(self)
|
63
|
+
@api_version = '2019-12-02-preview'
|
64
|
+
@accept_language = 'en-US'
|
65
|
+
@long_running_operation_retry_timeout = 30
|
66
|
+
@generate_client_request_id = true
|
67
|
+
add_telemetry
|
68
|
+
end
|
69
|
+
|
70
|
+
#
|
71
|
+
# Makes a request and returns the body of the response.
|
72
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
73
|
+
# @param path [String] the path, relative to {base_url}.
|
74
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
75
|
+
# @return [Hash{String=>String}] containing the body of the response.
|
76
|
+
# Example:
|
77
|
+
#
|
78
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
79
|
+
# path = "/path"
|
80
|
+
# options = {
|
81
|
+
# body: request_content,
|
82
|
+
# query_params: {'api-version' => '2016-02-01'}
|
83
|
+
# }
|
84
|
+
# result = @client.make_request(:put, path, options)
|
85
|
+
#
|
86
|
+
def make_request(method, path, options = {})
|
87
|
+
result = make_request_with_http_info(method, path, options)
|
88
|
+
result.body unless result.nil?
|
89
|
+
end
|
90
|
+
|
91
|
+
#
|
92
|
+
# Makes a request and returns the operation response.
|
93
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
94
|
+
# @param path [String] the path, relative to {base_url}.
|
95
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
96
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
97
|
+
#
|
98
|
+
def make_request_with_http_info(method, path, options = {})
|
99
|
+
result = make_request_async(method, path, options).value!
|
100
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
101
|
+
result
|
102
|
+
end
|
103
|
+
|
104
|
+
#
|
105
|
+
# Makes a request asynchronously.
|
106
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
107
|
+
# @param path [String] the path, relative to {base_url}.
|
108
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
109
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
110
|
+
#
|
111
|
+
def make_request_async(method, path, options = {})
|
112
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
113
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
114
|
+
|
115
|
+
request_url = options[:base_url] || @base_url
|
116
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
117
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
118
|
+
end
|
119
|
+
|
120
|
+
request_headers = @request_headers
|
121
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
122
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
123
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
124
|
+
|
125
|
+
super(request_url, method, path, options)
|
126
|
+
end
|
127
|
+
|
128
|
+
#
|
129
|
+
# Check Name Availability for local uniqueness
|
130
|
+
#
|
131
|
+
# @param location [String] The location in which uniqueness will be verified.
|
132
|
+
# @param check_name_availability [CheckNameAvailabilityRequest] Check Name
|
133
|
+
# Availability Request.
|
134
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
135
|
+
# will be added to the HTTP request.
|
136
|
+
#
|
137
|
+
# @return [CheckNameAvailabilityResponse] operation results.
|
138
|
+
#
|
139
|
+
def check_name_availability_local(location, check_name_availability, custom_headers:nil)
|
140
|
+
response = check_name_availability_local_async(location, check_name_availability, custom_headers:custom_headers).value!
|
141
|
+
response.body unless response.nil?
|
142
|
+
end
|
143
|
+
|
144
|
+
#
|
145
|
+
# Check Name Availability for local uniqueness
|
146
|
+
#
|
147
|
+
# @param location [String] The location in which uniqueness will be verified.
|
148
|
+
# @param check_name_availability [CheckNameAvailabilityRequest] Check Name
|
149
|
+
# Availability Request.
|
150
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
151
|
+
# will be added to the HTTP request.
|
152
|
+
#
|
153
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
154
|
+
#
|
155
|
+
def check_name_availability_local_with_http_info(location, check_name_availability, custom_headers:nil)
|
156
|
+
check_name_availability_local_async(location, check_name_availability, custom_headers:custom_headers).value!
|
157
|
+
end
|
158
|
+
|
159
|
+
#
|
160
|
+
# Check Name Availability for local uniqueness
|
161
|
+
#
|
162
|
+
# @param location [String] The location in which uniqueness will be verified.
|
163
|
+
# @param check_name_availability [CheckNameAvailabilityRequest] Check Name
|
164
|
+
# Availability Request.
|
165
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
166
|
+
# to the HTTP request.
|
167
|
+
#
|
168
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
169
|
+
#
|
170
|
+
def check_name_availability_local_async(location, check_name_availability, custom_headers:nil)
|
171
|
+
fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
|
172
|
+
fail ArgumentError, 'location is nil' if location.nil?
|
173
|
+
fail ArgumentError, "'location' should satisfy the constraint - 'MaxLength': '90'" if !location.nil? && location.length > 90
|
174
|
+
fail ArgumentError, "'location' should satisfy the constraint - 'MinLength': '1'" if !location.nil? && location.length < 1
|
175
|
+
fail ArgumentError, "'location' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !location.nil? && location.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
176
|
+
fail ArgumentError, 'check_name_availability is nil' if check_name_availability.nil?
|
177
|
+
fail ArgumentError, 'api_version is nil' if api_version.nil?
|
178
|
+
|
179
|
+
|
180
|
+
request_headers = {}
|
181
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
182
|
+
|
183
|
+
# Set Headers
|
184
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
185
|
+
request_headers['accept-language'] = accept_language unless accept_language.nil?
|
186
|
+
|
187
|
+
# Serialize Request
|
188
|
+
request_mapper = Azure::MixedReality::Mgmt::V2019_12_02_preview::Models::CheckNameAvailabilityRequest.mapper()
|
189
|
+
request_content = self.serialize(request_mapper, check_name_availability)
|
190
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
191
|
+
|
192
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.MixedReality/locations/{location}/checkNameAvailability'
|
193
|
+
|
194
|
+
request_url = @base_url || self.base_url
|
195
|
+
|
196
|
+
options = {
|
197
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
198
|
+
path_params: {'subscriptionId' => subscription_id,'location' => location},
|
199
|
+
query_params: {'api-version' => api_version},
|
200
|
+
body: request_content,
|
201
|
+
headers: request_headers.merge(custom_headers || {}),
|
202
|
+
base_url: request_url
|
203
|
+
}
|
204
|
+
promise = self.make_request_async(:post, path_template, options)
|
205
|
+
|
206
|
+
promise = promise.then do |result|
|
207
|
+
http_response = result.response
|
208
|
+
status_code = http_response.status
|
209
|
+
response_content = http_response.body
|
210
|
+
unless status_code == 200
|
211
|
+
error_model = JSON.load(response_content)
|
212
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
213
|
+
end
|
214
|
+
|
215
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
216
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
217
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
218
|
+
# Deserialize Response
|
219
|
+
if status_code == 200
|
220
|
+
begin
|
221
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
222
|
+
result_mapper = Azure::MixedReality::Mgmt::V2019_12_02_preview::Models::CheckNameAvailabilityResponse.mapper()
|
223
|
+
result.body = self.deserialize(result_mapper, parsed_response)
|
224
|
+
rescue Exception => e
|
225
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
result
|
230
|
+
end
|
231
|
+
|
232
|
+
promise.execute
|
233
|
+
end
|
234
|
+
|
235
|
+
|
236
|
+
private
|
237
|
+
#
|
238
|
+
# Adds telemetry information.
|
239
|
+
#
|
240
|
+
def add_telemetry
|
241
|
+
sdk_information = 'azure_mgmt_mixedreality'
|
242
|
+
sdk_information = "#{sdk_information}/0.17.2"
|
243
|
+
add_user_agent_information(sdk_information)
|
244
|
+
end
|
245
|
+
end
|
246
|
+
end
|
@@ -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::MixedReality::Mgmt::V2019_12_02_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Request for account key regeneration
|
10
|
+
#
|
11
|
+
class AccountKeyRegenerateRequest
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Integer] serial of key to be regenerated. Default value: 1 .
|
16
|
+
attr_accessor :serial
|
17
|
+
|
18
|
+
|
19
|
+
#
|
20
|
+
# Mapper for AccountKeyRegenerateRequest class as Ruby Hash.
|
21
|
+
# This will be used for serialization/deserialization.
|
22
|
+
#
|
23
|
+
def self.mapper()
|
24
|
+
{
|
25
|
+
client_side_validation: true,
|
26
|
+
required: false,
|
27
|
+
serialized_name: 'AccountKeyRegenerateRequest',
|
28
|
+
type: {
|
29
|
+
name: 'Composite',
|
30
|
+
class_name: 'AccountKeyRegenerateRequest',
|
31
|
+
model_properties: {
|
32
|
+
serial: {
|
33
|
+
client_side_validation: true,
|
34
|
+
required: false,
|
35
|
+
serialized_name: 'serial',
|
36
|
+
default_value: 1,
|
37
|
+
type: {
|
38
|
+
name: 'Number'
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|