azure_mgmt_mixedreality 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality.rb +45 -0
  4. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/mixed_reality_client.rb +240 -0
  5. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/models/azure_entity_resource.rb +75 -0
  6. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/models/check_name_availability_request.rb +58 -0
  7. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/models/check_name_availability_response.rb +70 -0
  8. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/models/error_response.rb +84 -0
  9. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/models/name_availability.rb +16 -0
  10. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/models/name_unavailable_reason.rb +16 -0
  11. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/models/operation.rb +58 -0
  12. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/models/operation_display.rb +80 -0
  13. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/models/operation_list.rb +101 -0
  14. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/models/proxy_resource.rb +63 -0
  15. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/models/resource.rb +83 -0
  16. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/models/spatial_anchors_account.rb +112 -0
  17. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/models/spatial_anchors_account_key_regenerate_request.rb +48 -0
  18. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/models/spatial_anchors_account_keys.rb +59 -0
  19. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/models/spatial_anchors_account_list.rb +101 -0
  20. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/models/tracked_resource.rb +92 -0
  21. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/module_definition.rb +9 -0
  22. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/operations.rb +214 -0
  23. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb +1067 -0
  24. data/lib/azure_mgmt_mixedreality.rb +6 -0
  25. data/lib/module_definition.rb +8 -0
  26. data/lib/profiles/latest/mixedreality_latest_profile_client.rb +40 -0
  27. data/lib/profiles/latest/mixedreality_module_definition.rb +8 -0
  28. data/lib/profiles/latest/modules/mixedreality_profile_module.rb +127 -0
  29. data/lib/version.rb +7 -0
  30. metadata +147 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 90fd6a92e9b9e5f433f0c3c43842aa2ea243ae15
4
+ data.tar.gz: 27142569e273cbcff34d5f315a276ef643aaa3b1
5
+ SHA512:
6
+ metadata.gz: 8966d01eb87ef2b8c3e5fec19d5c1515d7dc60f996c1768b8da015fea118fdd0df77db50d04e30e28bc242fee630d46af70414ee447e221bf5cd75e8f9c769cd
7
+ data.tar.gz: 2360bb3d7409566f3f5f87742a09007ce127c337af55528e2881ed9ea6e96666fbfc50e7353bad8d02fca9f4bb4d9e855c123412e1a1bd5d07dd7fc6ddf244ec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Microsoft Corporation
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,45 @@
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-02-28-preview/generated/azure_mgmt_mixedreality/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::MixedReality::Mgmt::V2019_02_28_preview
23
+ autoload :Operations, '2019-02-28-preview/generated/azure_mgmt_mixedreality/operations.rb'
24
+ autoload :SpatialAnchorsAccounts, '2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb'
25
+ autoload :MixedRealityClient, '2019-02-28-preview/generated/azure_mgmt_mixedreality/mixed_reality_client.rb'
26
+
27
+ module Models
28
+ autoload :SpatialAnchorsAccountKeys, '2019-02-28-preview/generated/azure_mgmt_mixedreality/models/spatial_anchors_account_keys.rb'
29
+ autoload :CheckNameAvailabilityRequest, '2019-02-28-preview/generated/azure_mgmt_mixedreality/models/check_name_availability_request.rb'
30
+ autoload :SpatialAnchorsAccountKeyRegenerateRequest, '2019-02-28-preview/generated/azure_mgmt_mixedreality/models/spatial_anchors_account_key_regenerate_request.rb'
31
+ autoload :ErrorResponse, '2019-02-28-preview/generated/azure_mgmt_mixedreality/models/error_response.rb'
32
+ autoload :SpatialAnchorsAccountList, '2019-02-28-preview/generated/azure_mgmt_mixedreality/models/spatial_anchors_account_list.rb'
33
+ autoload :Operation, '2019-02-28-preview/generated/azure_mgmt_mixedreality/models/operation.rb'
34
+ autoload :OperationDisplay, '2019-02-28-preview/generated/azure_mgmt_mixedreality/models/operation_display.rb'
35
+ autoload :OperationList, '2019-02-28-preview/generated/azure_mgmt_mixedreality/models/operation_list.rb'
36
+ autoload :CheckNameAvailabilityResponse, '2019-02-28-preview/generated/azure_mgmt_mixedreality/models/check_name_availability_response.rb'
37
+ autoload :Resource, '2019-02-28-preview/generated/azure_mgmt_mixedreality/models/resource.rb'
38
+ autoload :SpatialAnchorsAccount, '2019-02-28-preview/generated/azure_mgmt_mixedreality/models/spatial_anchors_account.rb'
39
+ autoload :ProxyResource, '2019-02-28-preview/generated/azure_mgmt_mixedreality/models/proxy_resource.rb'
40
+ autoload :AzureEntityResource, '2019-02-28-preview/generated/azure_mgmt_mixedreality/models/azure_entity_resource.rb'
41
+ autoload :TrackedResource, '2019-02-28-preview/generated/azure_mgmt_mixedreality/models/tracked_resource.rb'
42
+ autoload :NameAvailability, '2019-02-28-preview/generated/azure_mgmt_mixedreality/models/name_availability.rb'
43
+ autoload :NameUnavailableReason, '2019-02-28-preview/generated/azure_mgmt_mixedreality/models/name_unavailable_reason.rb'
44
+ end
45
+ end
@@ -0,0 +1,240 @@
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_02_28_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 [SpatialAnchorsAccounts] spatial_anchors_accounts
42
+ attr_reader :spatial_anchors_accounts
43
+
44
+ #
45
+ # Creates initializes a new instance of the MixedRealityClient class.
46
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
47
+ # @param base_url [String] the base URI of the service.
48
+ # @param options [Array] filters to be applied to the HTTP requests.
49
+ #
50
+ def initialize(credentials = nil, base_url = nil, options = nil)
51
+ super(credentials, options)
52
+ @base_url = base_url || 'https://management.azure.com'
53
+
54
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
55
+ @credentials = credentials
56
+
57
+ @operations = Operations.new(self)
58
+ @spatial_anchors_accounts = SpatialAnchorsAccounts.new(self)
59
+ @api_version = '2019-02-28-preview'
60
+ @accept_language = 'en-US'
61
+ @long_running_operation_retry_timeout = 30
62
+ @generate_client_request_id = true
63
+ add_telemetry
64
+ end
65
+
66
+ #
67
+ # Makes a request and returns the body of the response.
68
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
69
+ # @param path [String] the path, relative to {base_url}.
70
+ # @param options [Hash{String=>String}] specifying any request options like :body.
71
+ # @return [Hash{String=>String}] containing the body of the response.
72
+ # Example:
73
+ #
74
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
75
+ # path = "/path"
76
+ # options = {
77
+ # body: request_content,
78
+ # query_params: {'api-version' => '2016-02-01'}
79
+ # }
80
+ # result = @client.make_request(:put, path, options)
81
+ #
82
+ def make_request(method, path, options = {})
83
+ result = make_request_with_http_info(method, path, options)
84
+ result.body unless result.nil?
85
+ end
86
+
87
+ #
88
+ # Makes a request and returns the operation response.
89
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
90
+ # @param path [String] the path, relative to {base_url}.
91
+ # @param options [Hash{String=>String}] specifying any request options like :body.
92
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
93
+ #
94
+ def make_request_with_http_info(method, path, options = {})
95
+ result = make_request_async(method, path, options).value!
96
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
97
+ result
98
+ end
99
+
100
+ #
101
+ # Makes a request asynchronously.
102
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
103
+ # @param path [String] the path, relative to {base_url}.
104
+ # @param options [Hash{String=>String}] specifying any request options like :body.
105
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
106
+ #
107
+ def make_request_async(method, path, options = {})
108
+ fail ArgumentError, 'method is nil' if method.nil?
109
+ fail ArgumentError, 'path is nil' if path.nil?
110
+
111
+ request_url = options[:base_url] || @base_url
112
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
113
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
114
+ end
115
+
116
+ request_headers = @request_headers
117
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
118
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
119
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
120
+
121
+ super(request_url, method, path, options)
122
+ end
123
+
124
+ #
125
+ # Check Name Availability for global uniqueness
126
+ #
127
+ # @param location [String] The location in which uniqueness will be verified.
128
+ # @param check_name_availability [CheckNameAvailabilityRequest] Check Name
129
+ # Availability Request.
130
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
131
+ # will be added to the HTTP request.
132
+ #
133
+ # @return [CheckNameAvailabilityResponse] operation results.
134
+ #
135
+ def check_name_availability_local(location, check_name_availability, custom_headers:nil)
136
+ response = check_name_availability_local_async(location, check_name_availability, custom_headers:custom_headers).value!
137
+ response.body unless response.nil?
138
+ end
139
+
140
+ #
141
+ # Check Name Availability for global uniqueness
142
+ #
143
+ # @param location [String] The location in which uniqueness will be verified.
144
+ # @param check_name_availability [CheckNameAvailabilityRequest] Check Name
145
+ # Availability Request.
146
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
147
+ # will be added to the HTTP request.
148
+ #
149
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
150
+ #
151
+ def check_name_availability_local_with_http_info(location, check_name_availability, custom_headers:nil)
152
+ check_name_availability_local_async(location, check_name_availability, custom_headers:custom_headers).value!
153
+ end
154
+
155
+ #
156
+ # Check Name Availability for global uniqueness
157
+ #
158
+ # @param location [String] The location in which uniqueness will be verified.
159
+ # @param check_name_availability [CheckNameAvailabilityRequest] Check Name
160
+ # Availability Request.
161
+ # @param [Hash{String => String}] A hash of custom headers that will be added
162
+ # to the HTTP request.
163
+ #
164
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
165
+ #
166
+ def check_name_availability_local_async(location, check_name_availability, custom_headers:nil)
167
+ fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
168
+ fail ArgumentError, 'location is nil' if location.nil?
169
+ fail ArgumentError, "'location' should satisfy the constraint - 'MaxLength': '90'" if !location.nil? && location.length > 90
170
+ fail ArgumentError, "'location' should satisfy the constraint - 'MinLength': '1'" if !location.nil? && location.length < 1
171
+ fail ArgumentError, "'location' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !location.nil? && location.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
172
+ fail ArgumentError, 'check_name_availability is nil' if check_name_availability.nil?
173
+ fail ArgumentError, 'api_version is nil' if api_version.nil?
174
+
175
+
176
+ request_headers = {}
177
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
178
+
179
+ # Set Headers
180
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
181
+ request_headers['accept-language'] = accept_language unless accept_language.nil?
182
+
183
+ # Serialize Request
184
+ request_mapper = Azure::MixedReality::Mgmt::V2019_02_28_preview::Models::CheckNameAvailabilityRequest.mapper()
185
+ request_content = self.serialize(request_mapper, check_name_availability)
186
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
187
+
188
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.MixedReality/locations/{location}/checkNameAvailability'
189
+
190
+ request_url = @base_url || self.base_url
191
+
192
+ options = {
193
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
194
+ path_params: {'subscriptionId' => subscription_id,'location' => location},
195
+ query_params: {'api-version' => api_version},
196
+ body: request_content,
197
+ headers: request_headers.merge(custom_headers || {}),
198
+ base_url: request_url
199
+ }
200
+ promise = self.make_request_async(:post, path_template, options)
201
+
202
+ promise = promise.then do |result|
203
+ http_response = result.response
204
+ status_code = http_response.status
205
+ response_content = http_response.body
206
+ unless status_code == 200
207
+ error_model = JSON.load(response_content)
208
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
209
+ end
210
+
211
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
212
+ # Deserialize Response
213
+ if status_code == 200
214
+ begin
215
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
216
+ result_mapper = Azure::MixedReality::Mgmt::V2019_02_28_preview::Models::CheckNameAvailabilityResponse.mapper()
217
+ result.body = self.deserialize(result_mapper, parsed_response)
218
+ rescue Exception => e
219
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
220
+ end
221
+ end
222
+
223
+ result
224
+ end
225
+
226
+ promise.execute
227
+ end
228
+
229
+
230
+ private
231
+ #
232
+ # Adds telemetry information.
233
+ #
234
+ def add_telemetry
235
+ sdk_information = 'azure_mgmt_mixedreality'
236
+ sdk_information = "#{sdk_information}/0.17.0"
237
+ add_user_agent_information(sdk_information)
238
+ end
239
+ end
240
+ end
@@ -0,0 +1,75 @@
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_02_28_preview
7
+ module Models
8
+ #
9
+ # The resource model definition for a Azure Resource Manager resource with
10
+ # an etag.
11
+ #
12
+ class AzureEntityResource < Resource
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [String] Resource Etag.
17
+ attr_accessor :etag
18
+
19
+
20
+ #
21
+ # Mapper for AzureEntityResource 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: 'AzureEntityResource',
29
+ type: {
30
+ name: 'Composite',
31
+ class_name: 'AzureEntityResource',
32
+ model_properties: {
33
+ id: {
34
+ client_side_validation: true,
35
+ required: false,
36
+ read_only: true,
37
+ serialized_name: 'id',
38
+ type: {
39
+ name: 'String'
40
+ }
41
+ },
42
+ name: {
43
+ client_side_validation: true,
44
+ required: false,
45
+ read_only: true,
46
+ serialized_name: 'name',
47
+ type: {
48
+ name: 'String'
49
+ }
50
+ },
51
+ type: {
52
+ client_side_validation: true,
53
+ required: false,
54
+ read_only: true,
55
+ serialized_name: 'type',
56
+ type: {
57
+ name: 'String'
58
+ }
59
+ },
60
+ etag: {
61
+ client_side_validation: true,
62
+ required: false,
63
+ read_only: true,
64
+ serialized_name: 'etag',
65
+ type: {
66
+ name: 'String'
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
72
+ end
73
+ end
74
+ end
75
+ 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::MixedReality::Mgmt::V2019_02_28_preview
7
+ module Models
8
+ #
9
+ # Check Name Availability Request
10
+ #
11
+ class CheckNameAvailabilityRequest
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Resource Name To Verify
16
+ attr_accessor :name
17
+
18
+ # @return [String] Fully qualified resource type which includes provider
19
+ # namespace
20
+ attr_accessor :type
21
+
22
+
23
+ #
24
+ # Mapper for CheckNameAvailabilityRequest 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: 'CheckNameAvailabilityRequest',
32
+ type: {
33
+ name: 'Composite',
34
+ class_name: 'CheckNameAvailabilityRequest',
35
+ model_properties: {
36
+ name: {
37
+ client_side_validation: true,
38
+ required: true,
39
+ serialized_name: 'name',
40
+ type: {
41
+ name: 'String'
42
+ }
43
+ },
44
+ type: {
45
+ client_side_validation: true,
46
+ required: true,
47
+ serialized_name: 'type',
48
+ type: {
49
+ name: 'String'
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ end
56
+ end
57
+ end
58
+ end