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.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/mixed_reality_client.rb +3 -1
  3. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/operations.rb +4 -0
  4. data/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb +20 -0
  5. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality.rb +48 -0
  6. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/mixed_reality_client.rb +246 -0
  7. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/account_key_regenerate_request.rb +47 -0
  8. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/account_keys.rb +59 -0
  9. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/azure_entity_resource.rb +75 -0
  10. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/check_name_availability_request.rb +58 -0
  11. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/check_name_availability_response.rb +70 -0
  12. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/error_response.rb +84 -0
  13. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/name_availability.rb +16 -0
  14. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/name_unavailable_reason.rb +16 -0
  15. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/operation.rb +58 -0
  16. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/operation_display.rb +80 -0
  17. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/operation_page.rb +101 -0
  18. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/proxy_resource.rb +63 -0
  19. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/remote_rendering_account.rb +111 -0
  20. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/remote_rendering_account_page.rb +101 -0
  21. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/resource.rb +83 -0
  22. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/spatial_anchors_account.rb +111 -0
  23. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/spatial_anchors_account_page.rb +101 -0
  24. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/models/tracked_resource.rb +92 -0
  25. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/module_definition.rb +9 -0
  26. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/operations.rb +218 -0
  27. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb +1066 -0
  28. data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb +1066 -0
  29. data/lib/azure_mgmt_mixedreality.rb +1 -0
  30. data/lib/profiles/latest/modules/mixedreality_profile_module.rb +56 -46
  31. data/lib/version.rb +1 -1
  32. metadata +29 -5
@@ -0,0 +1,111 @@
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
+ # SpatialAnchorsAccount Response.
10
+ #
11
+ class SpatialAnchorsAccount < TrackedResource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] unique id of certain account.
16
+ attr_accessor :account_id
17
+
18
+ # @return [String] Correspond domain name of certain Spatial Anchors
19
+ # Account
20
+ attr_accessor :account_domain
21
+
22
+
23
+ #
24
+ # Mapper for SpatialAnchorsAccount 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: 'SpatialAnchorsAccount',
32
+ type: {
33
+ name: 'Composite',
34
+ class_name: 'SpatialAnchorsAccount',
35
+ model_properties: {
36
+ id: {
37
+ client_side_validation: true,
38
+ required: false,
39
+ read_only: true,
40
+ serialized_name: 'id',
41
+ type: {
42
+ name: 'String'
43
+ }
44
+ },
45
+ name: {
46
+ client_side_validation: true,
47
+ required: false,
48
+ read_only: true,
49
+ serialized_name: 'name',
50
+ type: {
51
+ name: 'String'
52
+ }
53
+ },
54
+ type: {
55
+ client_side_validation: true,
56
+ required: false,
57
+ read_only: true,
58
+ serialized_name: 'type',
59
+ type: {
60
+ name: 'String'
61
+ }
62
+ },
63
+ tags: {
64
+ client_side_validation: true,
65
+ required: false,
66
+ serialized_name: 'tags',
67
+ type: {
68
+ name: 'Dictionary',
69
+ value: {
70
+ client_side_validation: true,
71
+ required: false,
72
+ serialized_name: 'StringElementType',
73
+ type: {
74
+ name: 'String'
75
+ }
76
+ }
77
+ }
78
+ },
79
+ location: {
80
+ client_side_validation: true,
81
+ required: true,
82
+ serialized_name: 'location',
83
+ type: {
84
+ name: 'String'
85
+ }
86
+ },
87
+ account_id: {
88
+ client_side_validation: true,
89
+ required: false,
90
+ read_only: true,
91
+ serialized_name: 'properties.accountId',
92
+ type: {
93
+ name: 'String'
94
+ }
95
+ },
96
+ account_domain: {
97
+ client_side_validation: true,
98
+ required: false,
99
+ read_only: true,
100
+ serialized_name: 'properties.accountDomain',
101
+ type: {
102
+ name: 'String'
103
+ }
104
+ }
105
+ }
106
+ }
107
+ }
108
+ end
109
+ end
110
+ end
111
+ end
@@ -0,0 +1,101 @@
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
+ # Result of the request to get resource collection. It contains a list of
10
+ # resources and a URL link to get the next set of results.
11
+ #
12
+ class SpatialAnchorsAccountPage
13
+
14
+ include MsRestAzure
15
+
16
+ include MsRest::JSONable
17
+ # @return [Array<SpatialAnchorsAccount>] List of resources supported by
18
+ # the Resource Provider.
19
+ attr_accessor :value
20
+
21
+ # @return [String] URL to get the next set of resource list results if
22
+ # there are any.
23
+ attr_accessor :next_link
24
+
25
+ # return [Proc] with next page method call.
26
+ attr_accessor :next_method
27
+
28
+ #
29
+ # Gets the rest of the items for the request, enabling auto-pagination.
30
+ #
31
+ # @return [Array<SpatialAnchorsAccount>] operation results.
32
+ #
33
+ def get_all_items
34
+ items = @value
35
+ page = self
36
+ while page.next_link != nil && !page.next_link.strip.empty? do
37
+ page = page.get_next_page
38
+ items.concat(page.value)
39
+ end
40
+ items
41
+ end
42
+
43
+ #
44
+ # Gets the next page of results.
45
+ #
46
+ # @return [SpatialAnchorsAccountPage] with next page content.
47
+ #
48
+ def get_next_page
49
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
50
+ unless response.nil?
51
+ @next_link = response.body.next_link
52
+ @value = response.body.value
53
+ self
54
+ end
55
+ end
56
+
57
+ #
58
+ # Mapper for SpatialAnchorsAccountPage class as Ruby Hash.
59
+ # This will be used for serialization/deserialization.
60
+ #
61
+ def self.mapper()
62
+ {
63
+ client_side_validation: true,
64
+ required: false,
65
+ serialized_name: 'SpatialAnchorsAccountPage',
66
+ type: {
67
+ name: 'Composite',
68
+ class_name: 'SpatialAnchorsAccountPage',
69
+ model_properties: {
70
+ value: {
71
+ client_side_validation: true,
72
+ required: false,
73
+ serialized_name: 'value',
74
+ type: {
75
+ name: 'Sequence',
76
+ element: {
77
+ client_side_validation: true,
78
+ required: false,
79
+ serialized_name: 'SpatialAnchorsAccountElementType',
80
+ type: {
81
+ name: 'Composite',
82
+ class_name: 'SpatialAnchorsAccount'
83
+ }
84
+ }
85
+ }
86
+ },
87
+ next_link: {
88
+ client_side_validation: true,
89
+ required: false,
90
+ serialized_name: 'nextLink',
91
+ type: {
92
+ name: 'String'
93
+ }
94
+ }
95
+ }
96
+ }
97
+ }
98
+ end
99
+ end
100
+ end
101
+ end
@@ -0,0 +1,92 @@
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
+ # The resource model definition for a ARM tracked top level resource
10
+ #
11
+ class TrackedResource < Resource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Hash{String => String}] Resource tags.
16
+ attr_accessor :tags
17
+
18
+ # @return [String] The geo-location where the resource lives
19
+ attr_accessor :location
20
+
21
+
22
+ #
23
+ # Mapper for TrackedResource class as Ruby Hash.
24
+ # This will be used for serialization/deserialization.
25
+ #
26
+ def self.mapper()
27
+ {
28
+ client_side_validation: true,
29
+ required: false,
30
+ serialized_name: 'TrackedResource',
31
+ type: {
32
+ name: 'Composite',
33
+ class_name: 'TrackedResource',
34
+ model_properties: {
35
+ id: {
36
+ client_side_validation: true,
37
+ required: false,
38
+ read_only: true,
39
+ serialized_name: 'id',
40
+ type: {
41
+ name: 'String'
42
+ }
43
+ },
44
+ name: {
45
+ client_side_validation: true,
46
+ required: false,
47
+ read_only: true,
48
+ serialized_name: 'name',
49
+ type: {
50
+ name: 'String'
51
+ }
52
+ },
53
+ type: {
54
+ client_side_validation: true,
55
+ required: false,
56
+ read_only: true,
57
+ serialized_name: 'type',
58
+ type: {
59
+ name: 'String'
60
+ }
61
+ },
62
+ tags: {
63
+ client_side_validation: true,
64
+ required: false,
65
+ serialized_name: 'tags',
66
+ type: {
67
+ name: 'Dictionary',
68
+ value: {
69
+ client_side_validation: true,
70
+ required: false,
71
+ serialized_name: 'StringElementType',
72
+ type: {
73
+ name: 'String'
74
+ }
75
+ }
76
+ }
77
+ },
78
+ location: {
79
+ client_side_validation: true,
80
+ required: true,
81
+ serialized_name: 'location',
82
+ type: {
83
+ name: 'String'
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
89
+ end
90
+ end
91
+ end
92
+ 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::MixedReality end
8
+ module Azure::MixedReality::Mgmt end
9
+ module Azure::MixedReality::Mgmt::V2019_12_02_preview end
@@ -0,0 +1,218 @@
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
+ # Mixed Reality Client
9
+ #
10
+ class Operations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Operations class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [MixedRealityClient] reference to the MixedRealityClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Exposing Available Operations
26
+ #
27
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
28
+ # will be added to the HTTP request.
29
+ #
30
+ # @return [Array<Operation>] operation results.
31
+ #
32
+ def list(custom_headers:nil)
33
+ first_page = list_as_lazy(custom_headers:custom_headers)
34
+ first_page.get_all_items
35
+ end
36
+
37
+ #
38
+ # Exposing Available Operations
39
+ #
40
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
41
+ # will be added to the HTTP request.
42
+ #
43
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
44
+ #
45
+ def list_with_http_info(custom_headers:nil)
46
+ list_async(custom_headers:custom_headers).value!
47
+ end
48
+
49
+ #
50
+ # Exposing Available Operations
51
+ #
52
+ # @param [Hash{String => String}] A hash of custom headers that will be added
53
+ # to the HTTP request.
54
+ #
55
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
56
+ #
57
+ def list_async(custom_headers:nil)
58
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
59
+
60
+
61
+ request_headers = {}
62
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
63
+
64
+ # Set Headers
65
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
66
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
67
+ path_template = 'providers/Microsoft.MixedReality/operations'
68
+
69
+ request_url = @base_url || @client.base_url
70
+
71
+ options = {
72
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
73
+ query_params: {'api-version' => @client.api_version},
74
+ headers: request_headers.merge(custom_headers || {}),
75
+ base_url: request_url
76
+ }
77
+ promise = @client.make_request_async(:get, path_template, options)
78
+
79
+ promise = promise.then do |result|
80
+ http_response = result.response
81
+ status_code = http_response.status
82
+ response_content = http_response.body
83
+ unless status_code == 200
84
+ error_model = JSON.load(response_content)
85
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
86
+ end
87
+
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?
91
+ # Deserialize Response
92
+ if status_code == 200
93
+ begin
94
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
95
+ result_mapper = Azure::MixedReality::Mgmt::V2019_12_02_preview::Models::OperationPage.mapper()
96
+ result.body = @client.deserialize(result_mapper, parsed_response)
97
+ rescue Exception => e
98
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
99
+ end
100
+ end
101
+
102
+ result
103
+ end
104
+
105
+ promise.execute
106
+ end
107
+
108
+ #
109
+ # Exposing Available Operations
110
+ #
111
+ # @param next_page_link [String] The NextLink from the previous successful call
112
+ # to List operation.
113
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
114
+ # will be added to the HTTP request.
115
+ #
116
+ # @return [OperationPage] operation results.
117
+ #
118
+ def list_next(next_page_link, custom_headers:nil)
119
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
120
+ response.body unless response.nil?
121
+ end
122
+
123
+ #
124
+ # Exposing Available Operations
125
+ #
126
+ # @param next_page_link [String] The NextLink from the previous successful call
127
+ # to List operation.
128
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
129
+ # will be added to the HTTP request.
130
+ #
131
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
132
+ #
133
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
134
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
135
+ end
136
+
137
+ #
138
+ # Exposing Available Operations
139
+ #
140
+ # @param next_page_link [String] The NextLink from the previous successful call
141
+ # to List operation.
142
+ # @param [Hash{String => String}] A hash of custom headers that will be added
143
+ # to the HTTP request.
144
+ #
145
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
146
+ #
147
+ def list_next_async(next_page_link, custom_headers:nil)
148
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
149
+
150
+
151
+ request_headers = {}
152
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
153
+
154
+ # Set Headers
155
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
156
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
157
+ path_template = '{nextLink}'
158
+
159
+ request_url = @base_url || @client.base_url
160
+
161
+ options = {
162
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
163
+ skip_encoding_path_params: {'nextLink' => next_page_link},
164
+ headers: request_headers.merge(custom_headers || {}),
165
+ base_url: request_url
166
+ }
167
+ promise = @client.make_request_async(:get, path_template, options)
168
+
169
+ promise = promise.then do |result|
170
+ http_response = result.response
171
+ status_code = http_response.status
172
+ response_content = http_response.body
173
+ unless status_code == 200
174
+ error_model = JSON.load(response_content)
175
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
176
+ end
177
+
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?
181
+ # Deserialize Response
182
+ if status_code == 200
183
+ begin
184
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
185
+ result_mapper = Azure::MixedReality::Mgmt::V2019_12_02_preview::Models::OperationPage.mapper()
186
+ result.body = @client.deserialize(result_mapper, parsed_response)
187
+ rescue Exception => e
188
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
189
+ end
190
+ end
191
+
192
+ result
193
+ end
194
+
195
+ promise.execute
196
+ end
197
+
198
+ #
199
+ # Exposing Available Operations
200
+ #
201
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
202
+ # will be added to the HTTP request.
203
+ #
204
+ # @return [OperationPage] which provide lazy access to pages of the response.
205
+ #
206
+ def list_as_lazy(custom_headers:nil)
207
+ response = list_async(custom_headers:custom_headers).value!
208
+ unless response.nil?
209
+ page = response.body
210
+ page.next_method = Proc.new do |next_page_link|
211
+ list_next_async(next_page_link, custom_headers:custom_headers)
212
+ end
213
+ page
214
+ end
215
+ end
216
+
217
+ end
218
+ end