azure_mgmt_mixedreality 0.17.2 → 0.17.3
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 +1 -1
- data/lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/mixed_reality_client.rb +1 -1
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality.rb +54 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/mixed_reality_client.rb +243 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/account_key_regenerate_request.rb +47 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/account_keys.rb +59 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/azure_entity_resource.rb +75 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/check_name_availability_request.rb +58 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/check_name_availability_response.rb +70 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/identity.rb +72 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/name_availability.rb +16 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/name_unavailable_reason.rb +16 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/operation.rb +58 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/operation_display.rb +80 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/operation_page.rb +101 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/plan.rb +95 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/proxy_resource.rb +63 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/remote_rendering_account.rb +123 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/remote_rendering_account_identity.rb +63 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/remote_rendering_account_page.rb +101 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/resource.rb +83 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/resource_identity_type.rb +15 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/resource_model_with_allowed_property_set.rb +191 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/resource_model_with_allowed_property_set_identity.rb +64 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/resource_model_with_allowed_property_set_plan.rb +76 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/resource_model_with_allowed_property_set_sku.rb +77 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/sku.rb +99 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/sku_tier.rb +18 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/models/tracked_resource.rb +92 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/module_definition.rb +9 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/operations.rb +218 -0
- data/lib/2020-04-06-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb +1066 -0
- data/lib/2020-05-01/generated/azure_mgmt_mixedreality.rb +44 -0
- data/lib/2020-05-01/generated/azure_mgmt_mixedreality/mixed_reality_client.rb +243 -0
- data/lib/2020-05-01/generated/azure_mgmt_mixedreality/models/account_key_regenerate_request.rb +47 -0
- data/lib/2020-05-01/generated/azure_mgmt_mixedreality/models/account_keys.rb +59 -0
- data/lib/2020-05-01/generated/azure_mgmt_mixedreality/models/azure_entity_resource.rb +75 -0
- data/lib/2020-05-01/generated/azure_mgmt_mixedreality/models/check_name_availability_request.rb +58 -0
- data/lib/2020-05-01/generated/azure_mgmt_mixedreality/models/check_name_availability_response.rb +70 -0
- data/lib/2020-05-01/generated/azure_mgmt_mixedreality/models/name_availability.rb +16 -0
- data/lib/2020-05-01/generated/azure_mgmt_mixedreality/models/name_unavailable_reason.rb +16 -0
- data/lib/2020-05-01/generated/azure_mgmt_mixedreality/models/operation.rb +58 -0
- data/lib/2020-05-01/generated/azure_mgmt_mixedreality/models/operation_display.rb +80 -0
- data/lib/2020-05-01/generated/azure_mgmt_mixedreality/models/operation_page.rb +101 -0
- data/lib/2020-05-01/generated/azure_mgmt_mixedreality/models/proxy_resource.rb +63 -0
- data/lib/2020-05-01/generated/azure_mgmt_mixedreality/models/resource.rb +83 -0
- data/lib/2020-05-01/generated/azure_mgmt_mixedreality/models/spatial_anchors_account.rb +111 -0
- data/lib/2020-05-01/generated/azure_mgmt_mixedreality/models/spatial_anchors_account_page.rb +101 -0
- data/lib/2020-05-01/generated/azure_mgmt_mixedreality/models/tracked_resource.rb +92 -0
- data/lib/2020-05-01/generated/azure_mgmt_mixedreality/module_definition.rb +9 -0
- data/lib/2020-05-01/generated/azure_mgmt_mixedreality/operations.rb +218 -0
- data/lib/2020-05-01/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb +1066 -0
- data/lib/azure_mgmt_mixedreality.rb +2 -0
- data/lib/profiles/latest/modules/mixedreality_profile_module.rb +100 -56
- data/lib/version.rb +1 -1
- metadata +54 -4
@@ -0,0 +1,99 @@
|
|
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::V2020_04_06_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The resource model definition representing SKU
|
10
|
+
#
|
11
|
+
class Sku
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The name of the SKU. Ex - P3. It is typically a
|
16
|
+
# letter+number code
|
17
|
+
attr_accessor :name
|
18
|
+
|
19
|
+
# @return [SkuTier] This field is required to be implemented by the
|
20
|
+
# Resource Provider if the service has more than one tier, but is not
|
21
|
+
# required on a PUT. Possible values include: 'Free', 'Basic',
|
22
|
+
# 'Standard', 'Premium'
|
23
|
+
attr_accessor :tier
|
24
|
+
|
25
|
+
# @return [String] The SKU size. When the name field is the combination
|
26
|
+
# of tier and some other value, this would be the standalone code.
|
27
|
+
attr_accessor :size
|
28
|
+
|
29
|
+
# @return [String] If the service has different generations of hardware,
|
30
|
+
# for the same SKU, then that can be captured here.
|
31
|
+
attr_accessor :family
|
32
|
+
|
33
|
+
# @return [Integer] If the SKU supports scale out/in then the capacity
|
34
|
+
# integer should be included. If scale out/in is not possible for the
|
35
|
+
# resource this may be omitted.
|
36
|
+
attr_accessor :capacity
|
37
|
+
|
38
|
+
|
39
|
+
#
|
40
|
+
# Mapper for Sku class as Ruby Hash.
|
41
|
+
# This will be used for serialization/deserialization.
|
42
|
+
#
|
43
|
+
def self.mapper()
|
44
|
+
{
|
45
|
+
client_side_validation: true,
|
46
|
+
required: false,
|
47
|
+
serialized_name: 'Sku',
|
48
|
+
type: {
|
49
|
+
name: 'Composite',
|
50
|
+
class_name: 'Sku',
|
51
|
+
model_properties: {
|
52
|
+
name: {
|
53
|
+
client_side_validation: true,
|
54
|
+
required: true,
|
55
|
+
serialized_name: 'name',
|
56
|
+
type: {
|
57
|
+
name: 'String'
|
58
|
+
}
|
59
|
+
},
|
60
|
+
tier: {
|
61
|
+
client_side_validation: true,
|
62
|
+
required: false,
|
63
|
+
serialized_name: 'tier',
|
64
|
+
type: {
|
65
|
+
name: 'Enum',
|
66
|
+
module: 'SkuTier'
|
67
|
+
}
|
68
|
+
},
|
69
|
+
size: {
|
70
|
+
client_side_validation: true,
|
71
|
+
required: false,
|
72
|
+
serialized_name: 'size',
|
73
|
+
type: {
|
74
|
+
name: 'String'
|
75
|
+
}
|
76
|
+
},
|
77
|
+
family: {
|
78
|
+
client_side_validation: true,
|
79
|
+
required: false,
|
80
|
+
serialized_name: 'family',
|
81
|
+
type: {
|
82
|
+
name: 'String'
|
83
|
+
}
|
84
|
+
},
|
85
|
+
capacity: {
|
86
|
+
client_side_validation: true,
|
87
|
+
required: false,
|
88
|
+
serialized_name: 'capacity',
|
89
|
+
type: {
|
90
|
+
name: 'Number'
|
91
|
+
}
|
92
|
+
}
|
93
|
+
}
|
94
|
+
}
|
95
|
+
}
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,18 @@
|
|
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::V2020_04_06_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for SkuTier
|
10
|
+
#
|
11
|
+
module SkuTier
|
12
|
+
Free = "Free"
|
13
|
+
Basic = "Basic"
|
14
|
+
Standard = "Standard"
|
15
|
+
Premium = "Premium"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
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::V2020_04_06_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::V2020_04_06_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::V2020_04_06_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 MsRestAzure::AzureOperationError.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::V2020_04_06_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 MsRestAzure::AzureOperationError.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::V2020_04_06_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
|
@@ -0,0 +1,1066 @@
|
|
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::V2020_04_06_preview
|
7
|
+
#
|
8
|
+
# Mixed Reality Client
|
9
|
+
#
|
10
|
+
class RemoteRenderingAccounts
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the RemoteRenderingAccounts 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
|
+
# List Remote Rendering Accounts by Subscription
|
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<RemoteRenderingAccount>] operation results.
|
31
|
+
#
|
32
|
+
def list_by_subscription(custom_headers:nil)
|
33
|
+
first_page = list_by_subscription_as_lazy(custom_headers:custom_headers)
|
34
|
+
first_page.get_all_items
|
35
|
+
end
|
36
|
+
|
37
|
+
#
|
38
|
+
# List Remote Rendering Accounts by Subscription
|
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_by_subscription_with_http_info(custom_headers:nil)
|
46
|
+
list_by_subscription_async(custom_headers:custom_headers).value!
|
47
|
+
end
|
48
|
+
|
49
|
+
#
|
50
|
+
# List Remote Rendering Accounts by Subscription
|
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_by_subscription_async(custom_headers:nil)
|
58
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
59
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
60
|
+
|
61
|
+
|
62
|
+
request_headers = {}
|
63
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
64
|
+
|
65
|
+
# Set Headers
|
66
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
67
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
68
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.MixedReality/remoteRenderingAccounts'
|
69
|
+
|
70
|
+
request_url = @base_url || @client.base_url
|
71
|
+
|
72
|
+
options = {
|
73
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
74
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
75
|
+
query_params: {'api-version' => @client.api_version},
|
76
|
+
headers: request_headers.merge(custom_headers || {}),
|
77
|
+
base_url: request_url
|
78
|
+
}
|
79
|
+
promise = @client.make_request_async(:get, path_template, options)
|
80
|
+
|
81
|
+
promise = promise.then do |result|
|
82
|
+
http_response = result.response
|
83
|
+
status_code = http_response.status
|
84
|
+
response_content = http_response.body
|
85
|
+
unless status_code == 200
|
86
|
+
error_model = JSON.load(response_content)
|
87
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
88
|
+
end
|
89
|
+
|
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?
|
93
|
+
# Deserialize Response
|
94
|
+
if status_code == 200
|
95
|
+
begin
|
96
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
97
|
+
result_mapper = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::RemoteRenderingAccountPage.mapper()
|
98
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
99
|
+
rescue Exception => e
|
100
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
result
|
105
|
+
end
|
106
|
+
|
107
|
+
promise.execute
|
108
|
+
end
|
109
|
+
|
110
|
+
#
|
111
|
+
# List Resources by Resource Group
|
112
|
+
#
|
113
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
114
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
115
|
+
# will be added to the HTTP request.
|
116
|
+
#
|
117
|
+
# @return [Array<RemoteRenderingAccount>] operation results.
|
118
|
+
#
|
119
|
+
def list_by_resource_group(resource_group_name, custom_headers:nil)
|
120
|
+
first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
|
121
|
+
first_page.get_all_items
|
122
|
+
end
|
123
|
+
|
124
|
+
#
|
125
|
+
# List Resources by Resource Group
|
126
|
+
#
|
127
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
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_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
|
134
|
+
list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
|
135
|
+
end
|
136
|
+
|
137
|
+
#
|
138
|
+
# List Resources by Resource Group
|
139
|
+
#
|
140
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
141
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
142
|
+
# to the HTTP request.
|
143
|
+
#
|
144
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
145
|
+
#
|
146
|
+
def list_by_resource_group_async(resource_group_name, custom_headers:nil)
|
147
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
148
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
149
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
150
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
151
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
152
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
153
|
+
|
154
|
+
|
155
|
+
request_headers = {}
|
156
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
157
|
+
|
158
|
+
# Set Headers
|
159
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
160
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
161
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts'
|
162
|
+
|
163
|
+
request_url = @base_url || @client.base_url
|
164
|
+
|
165
|
+
options = {
|
166
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
167
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
|
168
|
+
query_params: {'api-version' => @client.api_version},
|
169
|
+
headers: request_headers.merge(custom_headers || {}),
|
170
|
+
base_url: request_url
|
171
|
+
}
|
172
|
+
promise = @client.make_request_async(:get, path_template, options)
|
173
|
+
|
174
|
+
promise = promise.then do |result|
|
175
|
+
http_response = result.response
|
176
|
+
status_code = http_response.status
|
177
|
+
response_content = http_response.body
|
178
|
+
unless status_code == 200
|
179
|
+
error_model = JSON.load(response_content)
|
180
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
181
|
+
end
|
182
|
+
|
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?
|
186
|
+
# Deserialize Response
|
187
|
+
if status_code == 200
|
188
|
+
begin
|
189
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
190
|
+
result_mapper = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::RemoteRenderingAccountPage.mapper()
|
191
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
192
|
+
rescue Exception => e
|
193
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
result
|
198
|
+
end
|
199
|
+
|
200
|
+
promise.execute
|
201
|
+
end
|
202
|
+
|
203
|
+
#
|
204
|
+
# Delete a Remote Rendering Account.
|
205
|
+
#
|
206
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
207
|
+
# @param account_name [String] Name of an Mixed Reality Account.
|
208
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
209
|
+
# will be added to the HTTP request.
|
210
|
+
#
|
211
|
+
#
|
212
|
+
def delete(resource_group_name, account_name, custom_headers:nil)
|
213
|
+
response = delete_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
214
|
+
nil
|
215
|
+
end
|
216
|
+
|
217
|
+
#
|
218
|
+
# Delete a Remote Rendering Account.
|
219
|
+
#
|
220
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
221
|
+
# @param account_name [String] Name of an Mixed Reality Account.
|
222
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
223
|
+
# will be added to the HTTP request.
|
224
|
+
#
|
225
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
226
|
+
#
|
227
|
+
def delete_with_http_info(resource_group_name, account_name, custom_headers:nil)
|
228
|
+
delete_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
229
|
+
end
|
230
|
+
|
231
|
+
#
|
232
|
+
# Delete a Remote Rendering Account.
|
233
|
+
#
|
234
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
235
|
+
# @param account_name [String] Name of an Mixed Reality Account.
|
236
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
237
|
+
# to the HTTP request.
|
238
|
+
#
|
239
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
240
|
+
#
|
241
|
+
def delete_async(resource_group_name, account_name, custom_headers:nil)
|
242
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
243
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
244
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
245
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
246
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
247
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
248
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '90'" if !account_name.nil? && account_name.length > 90
|
249
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '1'" if !account_name.nil? && account_name.length < 1
|
250
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !account_name.nil? && account_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
251
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
252
|
+
|
253
|
+
|
254
|
+
request_headers = {}
|
255
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
256
|
+
|
257
|
+
# Set Headers
|
258
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
259
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
260
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}'
|
261
|
+
|
262
|
+
request_url = @base_url || @client.base_url
|
263
|
+
|
264
|
+
options = {
|
265
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
266
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
267
|
+
query_params: {'api-version' => @client.api_version},
|
268
|
+
headers: request_headers.merge(custom_headers || {}),
|
269
|
+
base_url: request_url
|
270
|
+
}
|
271
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
272
|
+
|
273
|
+
promise = promise.then do |result|
|
274
|
+
http_response = result.response
|
275
|
+
status_code = http_response.status
|
276
|
+
response_content = http_response.body
|
277
|
+
unless status_code == 200 || status_code == 204
|
278
|
+
error_model = JSON.load(response_content)
|
279
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
280
|
+
end
|
281
|
+
|
282
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
283
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
284
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
285
|
+
|
286
|
+
result
|
287
|
+
end
|
288
|
+
|
289
|
+
promise.execute
|
290
|
+
end
|
291
|
+
|
292
|
+
#
|
293
|
+
# Retrieve a Remote Rendering Account.
|
294
|
+
#
|
295
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
296
|
+
# @param account_name [String] Name of an Mixed Reality Account.
|
297
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
298
|
+
# will be added to the HTTP request.
|
299
|
+
#
|
300
|
+
# @return [RemoteRenderingAccount] operation results.
|
301
|
+
#
|
302
|
+
def get(resource_group_name, account_name, custom_headers:nil)
|
303
|
+
response = get_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
304
|
+
response.body unless response.nil?
|
305
|
+
end
|
306
|
+
|
307
|
+
#
|
308
|
+
# Retrieve a Remote Rendering Account.
|
309
|
+
#
|
310
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
311
|
+
# @param account_name [String] Name of an Mixed Reality Account.
|
312
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
313
|
+
# will be added to the HTTP request.
|
314
|
+
#
|
315
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
316
|
+
#
|
317
|
+
def get_with_http_info(resource_group_name, account_name, custom_headers:nil)
|
318
|
+
get_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
319
|
+
end
|
320
|
+
|
321
|
+
#
|
322
|
+
# Retrieve a Remote Rendering Account.
|
323
|
+
#
|
324
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
325
|
+
# @param account_name [String] Name of an Mixed Reality Account.
|
326
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
327
|
+
# to the HTTP request.
|
328
|
+
#
|
329
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
330
|
+
#
|
331
|
+
def get_async(resource_group_name, account_name, custom_headers:nil)
|
332
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
333
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
334
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
335
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
336
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
337
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
338
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '90'" if !account_name.nil? && account_name.length > 90
|
339
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '1'" if !account_name.nil? && account_name.length < 1
|
340
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !account_name.nil? && account_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
341
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
342
|
+
|
343
|
+
|
344
|
+
request_headers = {}
|
345
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
346
|
+
|
347
|
+
# Set Headers
|
348
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
349
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
350
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}'
|
351
|
+
|
352
|
+
request_url = @base_url || @client.base_url
|
353
|
+
|
354
|
+
options = {
|
355
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
356
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
357
|
+
query_params: {'api-version' => @client.api_version},
|
358
|
+
headers: request_headers.merge(custom_headers || {}),
|
359
|
+
base_url: request_url
|
360
|
+
}
|
361
|
+
promise = @client.make_request_async(:get, path_template, options)
|
362
|
+
|
363
|
+
promise = promise.then do |result|
|
364
|
+
http_response = result.response
|
365
|
+
status_code = http_response.status
|
366
|
+
response_content = http_response.body
|
367
|
+
unless status_code == 200
|
368
|
+
error_model = JSON.load(response_content)
|
369
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
370
|
+
end
|
371
|
+
|
372
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
373
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
374
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
375
|
+
# Deserialize Response
|
376
|
+
if status_code == 200
|
377
|
+
begin
|
378
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
379
|
+
result_mapper = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::RemoteRenderingAccount.mapper()
|
380
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
381
|
+
rescue Exception => e
|
382
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
383
|
+
end
|
384
|
+
end
|
385
|
+
|
386
|
+
result
|
387
|
+
end
|
388
|
+
|
389
|
+
promise.execute
|
390
|
+
end
|
391
|
+
|
392
|
+
#
|
393
|
+
# Updating a Remote Rendering Account
|
394
|
+
#
|
395
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
396
|
+
# @param account_name [String] Name of an Mixed Reality Account.
|
397
|
+
# @param remote_rendering_account [RemoteRenderingAccount] Remote Rendering
|
398
|
+
# Account parameter.
|
399
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
400
|
+
# will be added to the HTTP request.
|
401
|
+
#
|
402
|
+
# @return [RemoteRenderingAccount] operation results.
|
403
|
+
#
|
404
|
+
def update(resource_group_name, account_name, remote_rendering_account, custom_headers:nil)
|
405
|
+
response = update_async(resource_group_name, account_name, remote_rendering_account, custom_headers:custom_headers).value!
|
406
|
+
response.body unless response.nil?
|
407
|
+
end
|
408
|
+
|
409
|
+
#
|
410
|
+
# Updating a Remote Rendering Account
|
411
|
+
#
|
412
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
413
|
+
# @param account_name [String] Name of an Mixed Reality Account.
|
414
|
+
# @param remote_rendering_account [RemoteRenderingAccount] Remote Rendering
|
415
|
+
# Account parameter.
|
416
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
417
|
+
# will be added to the HTTP request.
|
418
|
+
#
|
419
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
420
|
+
#
|
421
|
+
def update_with_http_info(resource_group_name, account_name, remote_rendering_account, custom_headers:nil)
|
422
|
+
update_async(resource_group_name, account_name, remote_rendering_account, custom_headers:custom_headers).value!
|
423
|
+
end
|
424
|
+
|
425
|
+
#
|
426
|
+
# Updating a Remote Rendering Account
|
427
|
+
#
|
428
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
429
|
+
# @param account_name [String] Name of an Mixed Reality Account.
|
430
|
+
# @param remote_rendering_account [RemoteRenderingAccount] Remote Rendering
|
431
|
+
# Account parameter.
|
432
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
433
|
+
# to the HTTP request.
|
434
|
+
#
|
435
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
436
|
+
#
|
437
|
+
def update_async(resource_group_name, account_name, remote_rendering_account, custom_headers:nil)
|
438
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
439
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
440
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
441
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
442
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
443
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
444
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '90'" if !account_name.nil? && account_name.length > 90
|
445
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '1'" if !account_name.nil? && account_name.length < 1
|
446
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !account_name.nil? && account_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
447
|
+
fail ArgumentError, 'remote_rendering_account is nil' if remote_rendering_account.nil?
|
448
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
449
|
+
|
450
|
+
|
451
|
+
request_headers = {}
|
452
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
453
|
+
|
454
|
+
# Set Headers
|
455
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
456
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
457
|
+
|
458
|
+
# Serialize Request
|
459
|
+
request_mapper = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::RemoteRenderingAccount.mapper()
|
460
|
+
request_content = @client.serialize(request_mapper, remote_rendering_account)
|
461
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
462
|
+
|
463
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}'
|
464
|
+
|
465
|
+
request_url = @base_url || @client.base_url
|
466
|
+
|
467
|
+
options = {
|
468
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
469
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
470
|
+
query_params: {'api-version' => @client.api_version},
|
471
|
+
body: request_content,
|
472
|
+
headers: request_headers.merge(custom_headers || {}),
|
473
|
+
base_url: request_url
|
474
|
+
}
|
475
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
476
|
+
|
477
|
+
promise = promise.then do |result|
|
478
|
+
http_response = result.response
|
479
|
+
status_code = http_response.status
|
480
|
+
response_content = http_response.body
|
481
|
+
unless status_code == 200
|
482
|
+
error_model = JSON.load(response_content)
|
483
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
484
|
+
end
|
485
|
+
|
486
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
487
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
488
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
489
|
+
# Deserialize Response
|
490
|
+
if status_code == 200
|
491
|
+
begin
|
492
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
493
|
+
result_mapper = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::RemoteRenderingAccount.mapper()
|
494
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
495
|
+
rescue Exception => e
|
496
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
497
|
+
end
|
498
|
+
end
|
499
|
+
|
500
|
+
result
|
501
|
+
end
|
502
|
+
|
503
|
+
promise.execute
|
504
|
+
end
|
505
|
+
|
506
|
+
#
|
507
|
+
# Creating or Updating a Remote Rendering Account.
|
508
|
+
#
|
509
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
510
|
+
# @param account_name [String] Name of an Mixed Reality Account.
|
511
|
+
# @param remote_rendering_account [RemoteRenderingAccount] Remote Rendering
|
512
|
+
# Account parameter.
|
513
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
514
|
+
# will be added to the HTTP request.
|
515
|
+
#
|
516
|
+
# @return [RemoteRenderingAccount] operation results.
|
517
|
+
#
|
518
|
+
def create(resource_group_name, account_name, remote_rendering_account, custom_headers:nil)
|
519
|
+
response = create_async(resource_group_name, account_name, remote_rendering_account, custom_headers:custom_headers).value!
|
520
|
+
response.body unless response.nil?
|
521
|
+
end
|
522
|
+
|
523
|
+
#
|
524
|
+
# Creating or Updating a Remote Rendering Account.
|
525
|
+
#
|
526
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
527
|
+
# @param account_name [String] Name of an Mixed Reality Account.
|
528
|
+
# @param remote_rendering_account [RemoteRenderingAccount] Remote Rendering
|
529
|
+
# Account parameter.
|
530
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
531
|
+
# will be added to the HTTP request.
|
532
|
+
#
|
533
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
534
|
+
#
|
535
|
+
def create_with_http_info(resource_group_name, account_name, remote_rendering_account, custom_headers:nil)
|
536
|
+
create_async(resource_group_name, account_name, remote_rendering_account, custom_headers:custom_headers).value!
|
537
|
+
end
|
538
|
+
|
539
|
+
#
|
540
|
+
# Creating or Updating a Remote Rendering Account.
|
541
|
+
#
|
542
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
543
|
+
# @param account_name [String] Name of an Mixed Reality Account.
|
544
|
+
# @param remote_rendering_account [RemoteRenderingAccount] Remote Rendering
|
545
|
+
# Account parameter.
|
546
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
547
|
+
# to the HTTP request.
|
548
|
+
#
|
549
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
550
|
+
#
|
551
|
+
def create_async(resource_group_name, account_name, remote_rendering_account, custom_headers:nil)
|
552
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
553
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
554
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
555
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
556
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
557
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
558
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '90'" if !account_name.nil? && account_name.length > 90
|
559
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '1'" if !account_name.nil? && account_name.length < 1
|
560
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !account_name.nil? && account_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
561
|
+
fail ArgumentError, 'remote_rendering_account is nil' if remote_rendering_account.nil?
|
562
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
563
|
+
|
564
|
+
|
565
|
+
request_headers = {}
|
566
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
567
|
+
|
568
|
+
# Set Headers
|
569
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
570
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
571
|
+
|
572
|
+
# Serialize Request
|
573
|
+
request_mapper = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::RemoteRenderingAccount.mapper()
|
574
|
+
request_content = @client.serialize(request_mapper, remote_rendering_account)
|
575
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
576
|
+
|
577
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}'
|
578
|
+
|
579
|
+
request_url = @base_url || @client.base_url
|
580
|
+
|
581
|
+
options = {
|
582
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
583
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
584
|
+
query_params: {'api-version' => @client.api_version},
|
585
|
+
body: request_content,
|
586
|
+
headers: request_headers.merge(custom_headers || {}),
|
587
|
+
base_url: request_url
|
588
|
+
}
|
589
|
+
promise = @client.make_request_async(:put, path_template, options)
|
590
|
+
|
591
|
+
promise = promise.then do |result|
|
592
|
+
http_response = result.response
|
593
|
+
status_code = http_response.status
|
594
|
+
response_content = http_response.body
|
595
|
+
unless status_code == 200 || status_code == 201
|
596
|
+
error_model = JSON.load(response_content)
|
597
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
598
|
+
end
|
599
|
+
|
600
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
601
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
602
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
603
|
+
# Deserialize Response
|
604
|
+
if status_code == 200
|
605
|
+
begin
|
606
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
607
|
+
result_mapper = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::RemoteRenderingAccount.mapper()
|
608
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
609
|
+
rescue Exception => e
|
610
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
611
|
+
end
|
612
|
+
end
|
613
|
+
# Deserialize Response
|
614
|
+
if status_code == 201
|
615
|
+
begin
|
616
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
617
|
+
result_mapper = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::RemoteRenderingAccount.mapper()
|
618
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
619
|
+
rescue Exception => e
|
620
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
621
|
+
end
|
622
|
+
end
|
623
|
+
|
624
|
+
result
|
625
|
+
end
|
626
|
+
|
627
|
+
promise.execute
|
628
|
+
end
|
629
|
+
|
630
|
+
#
|
631
|
+
# List Both of the 2 Keys of a Remote Rendering Account
|
632
|
+
#
|
633
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
634
|
+
# @param account_name [String] Name of an Mixed Reality Account.
|
635
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
636
|
+
# will be added to the HTTP request.
|
637
|
+
#
|
638
|
+
# @return [AccountKeys] operation results.
|
639
|
+
#
|
640
|
+
def list_keys(resource_group_name, account_name, custom_headers:nil)
|
641
|
+
response = list_keys_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
642
|
+
response.body unless response.nil?
|
643
|
+
end
|
644
|
+
|
645
|
+
#
|
646
|
+
# List Both of the 2 Keys of a Remote Rendering Account
|
647
|
+
#
|
648
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
649
|
+
# @param account_name [String] Name of an Mixed Reality Account.
|
650
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
651
|
+
# will be added to the HTTP request.
|
652
|
+
#
|
653
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
654
|
+
#
|
655
|
+
def list_keys_with_http_info(resource_group_name, account_name, custom_headers:nil)
|
656
|
+
list_keys_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
657
|
+
end
|
658
|
+
|
659
|
+
#
|
660
|
+
# List Both of the 2 Keys of a Remote Rendering Account
|
661
|
+
#
|
662
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
663
|
+
# @param account_name [String] Name of an Mixed Reality Account.
|
664
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
665
|
+
# to the HTTP request.
|
666
|
+
#
|
667
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
668
|
+
#
|
669
|
+
def list_keys_async(resource_group_name, account_name, custom_headers:nil)
|
670
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
671
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
672
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
673
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
674
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
675
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
676
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '90'" if !account_name.nil? && account_name.length > 90
|
677
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '1'" if !account_name.nil? && account_name.length < 1
|
678
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !account_name.nil? && account_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
679
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
680
|
+
|
681
|
+
|
682
|
+
request_headers = {}
|
683
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
684
|
+
|
685
|
+
# Set Headers
|
686
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
687
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
688
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}/listKeys'
|
689
|
+
|
690
|
+
request_url = @base_url || @client.base_url
|
691
|
+
|
692
|
+
options = {
|
693
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
694
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
695
|
+
query_params: {'api-version' => @client.api_version},
|
696
|
+
headers: request_headers.merge(custom_headers || {}),
|
697
|
+
base_url: request_url
|
698
|
+
}
|
699
|
+
promise = @client.make_request_async(:post, path_template, options)
|
700
|
+
|
701
|
+
promise = promise.then do |result|
|
702
|
+
http_response = result.response
|
703
|
+
status_code = http_response.status
|
704
|
+
response_content = http_response.body
|
705
|
+
unless status_code == 200
|
706
|
+
error_model = JSON.load(response_content)
|
707
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
708
|
+
end
|
709
|
+
|
710
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
711
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
712
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
713
|
+
# Deserialize Response
|
714
|
+
if status_code == 200
|
715
|
+
begin
|
716
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
717
|
+
result_mapper = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::AccountKeys.mapper()
|
718
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
719
|
+
rescue Exception => e
|
720
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
721
|
+
end
|
722
|
+
end
|
723
|
+
|
724
|
+
result
|
725
|
+
end
|
726
|
+
|
727
|
+
promise.execute
|
728
|
+
end
|
729
|
+
|
730
|
+
#
|
731
|
+
# Regenerate specified Key of a Remote Rendering Account
|
732
|
+
#
|
733
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
734
|
+
# @param account_name [String] Name of an Mixed Reality Account.
|
735
|
+
# @param regenerate [AccountKeyRegenerateRequest] Required information for key
|
736
|
+
# regeneration.
|
737
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
738
|
+
# will be added to the HTTP request.
|
739
|
+
#
|
740
|
+
# @return [AccountKeys] operation results.
|
741
|
+
#
|
742
|
+
def regenerate_keys(resource_group_name, account_name, regenerate, custom_headers:nil)
|
743
|
+
response = regenerate_keys_async(resource_group_name, account_name, regenerate, custom_headers:custom_headers).value!
|
744
|
+
response.body unless response.nil?
|
745
|
+
end
|
746
|
+
|
747
|
+
#
|
748
|
+
# Regenerate specified Key of a Remote Rendering Account
|
749
|
+
#
|
750
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
751
|
+
# @param account_name [String] Name of an Mixed Reality Account.
|
752
|
+
# @param regenerate [AccountKeyRegenerateRequest] Required information for key
|
753
|
+
# regeneration.
|
754
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
755
|
+
# will be added to the HTTP request.
|
756
|
+
#
|
757
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
758
|
+
#
|
759
|
+
def regenerate_keys_with_http_info(resource_group_name, account_name, regenerate, custom_headers:nil)
|
760
|
+
regenerate_keys_async(resource_group_name, account_name, regenerate, custom_headers:custom_headers).value!
|
761
|
+
end
|
762
|
+
|
763
|
+
#
|
764
|
+
# Regenerate specified Key of a Remote Rendering Account
|
765
|
+
#
|
766
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
767
|
+
# @param account_name [String] Name of an Mixed Reality Account.
|
768
|
+
# @param regenerate [AccountKeyRegenerateRequest] Required information for key
|
769
|
+
# regeneration.
|
770
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
771
|
+
# to the HTTP request.
|
772
|
+
#
|
773
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
774
|
+
#
|
775
|
+
def regenerate_keys_async(resource_group_name, account_name, regenerate, custom_headers:nil)
|
776
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
777
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
778
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
779
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
780
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
781
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
782
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '90'" if !account_name.nil? && account_name.length > 90
|
783
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '1'" if !account_name.nil? && account_name.length < 1
|
784
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !account_name.nil? && account_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
785
|
+
fail ArgumentError, 'regenerate is nil' if regenerate.nil?
|
786
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
787
|
+
|
788
|
+
|
789
|
+
request_headers = {}
|
790
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
791
|
+
|
792
|
+
# Set Headers
|
793
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
794
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
795
|
+
|
796
|
+
# Serialize Request
|
797
|
+
request_mapper = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::AccountKeyRegenerateRequest.mapper()
|
798
|
+
request_content = @client.serialize(request_mapper, regenerate)
|
799
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
800
|
+
|
801
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}/regenerateKeys'
|
802
|
+
|
803
|
+
request_url = @base_url || @client.base_url
|
804
|
+
|
805
|
+
options = {
|
806
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
807
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
808
|
+
query_params: {'api-version' => @client.api_version},
|
809
|
+
body: request_content,
|
810
|
+
headers: request_headers.merge(custom_headers || {}),
|
811
|
+
base_url: request_url
|
812
|
+
}
|
813
|
+
promise = @client.make_request_async(:post, path_template, options)
|
814
|
+
|
815
|
+
promise = promise.then do |result|
|
816
|
+
http_response = result.response
|
817
|
+
status_code = http_response.status
|
818
|
+
response_content = http_response.body
|
819
|
+
unless status_code == 200
|
820
|
+
error_model = JSON.load(response_content)
|
821
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
822
|
+
end
|
823
|
+
|
824
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
825
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
826
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
827
|
+
# Deserialize Response
|
828
|
+
if status_code == 200
|
829
|
+
begin
|
830
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
831
|
+
result_mapper = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::AccountKeys.mapper()
|
832
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
833
|
+
rescue Exception => e
|
834
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
835
|
+
end
|
836
|
+
end
|
837
|
+
|
838
|
+
result
|
839
|
+
end
|
840
|
+
|
841
|
+
promise.execute
|
842
|
+
end
|
843
|
+
|
844
|
+
#
|
845
|
+
# List Remote Rendering Accounts by Subscription
|
846
|
+
#
|
847
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
848
|
+
# to List operation.
|
849
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
850
|
+
# will be added to the HTTP request.
|
851
|
+
#
|
852
|
+
# @return [RemoteRenderingAccountPage] operation results.
|
853
|
+
#
|
854
|
+
def list_by_subscription_next(next_page_link, custom_headers:nil)
|
855
|
+
response = list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
|
856
|
+
response.body unless response.nil?
|
857
|
+
end
|
858
|
+
|
859
|
+
#
|
860
|
+
# List Remote Rendering Accounts by Subscription
|
861
|
+
#
|
862
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
863
|
+
# to List operation.
|
864
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
865
|
+
# will be added to the HTTP request.
|
866
|
+
#
|
867
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
868
|
+
#
|
869
|
+
def list_by_subscription_next_with_http_info(next_page_link, custom_headers:nil)
|
870
|
+
list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
|
871
|
+
end
|
872
|
+
|
873
|
+
#
|
874
|
+
# List Remote Rendering Accounts by Subscription
|
875
|
+
#
|
876
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
877
|
+
# to List operation.
|
878
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
879
|
+
# to the HTTP request.
|
880
|
+
#
|
881
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
882
|
+
#
|
883
|
+
def list_by_subscription_next_async(next_page_link, custom_headers:nil)
|
884
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
885
|
+
|
886
|
+
|
887
|
+
request_headers = {}
|
888
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
889
|
+
|
890
|
+
# Set Headers
|
891
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
892
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
893
|
+
path_template = '{nextLink}'
|
894
|
+
|
895
|
+
request_url = @base_url || @client.base_url
|
896
|
+
|
897
|
+
options = {
|
898
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
899
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
900
|
+
headers: request_headers.merge(custom_headers || {}),
|
901
|
+
base_url: request_url
|
902
|
+
}
|
903
|
+
promise = @client.make_request_async(:get, path_template, options)
|
904
|
+
|
905
|
+
promise = promise.then do |result|
|
906
|
+
http_response = result.response
|
907
|
+
status_code = http_response.status
|
908
|
+
response_content = http_response.body
|
909
|
+
unless status_code == 200
|
910
|
+
error_model = JSON.load(response_content)
|
911
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
912
|
+
end
|
913
|
+
|
914
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
915
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
916
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
917
|
+
# Deserialize Response
|
918
|
+
if status_code == 200
|
919
|
+
begin
|
920
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
921
|
+
result_mapper = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::RemoteRenderingAccountPage.mapper()
|
922
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
923
|
+
rescue Exception => e
|
924
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
925
|
+
end
|
926
|
+
end
|
927
|
+
|
928
|
+
result
|
929
|
+
end
|
930
|
+
|
931
|
+
promise.execute
|
932
|
+
end
|
933
|
+
|
934
|
+
#
|
935
|
+
# List Resources by Resource Group
|
936
|
+
#
|
937
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
938
|
+
# to List operation.
|
939
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
940
|
+
# will be added to the HTTP request.
|
941
|
+
#
|
942
|
+
# @return [RemoteRenderingAccountPage] operation results.
|
943
|
+
#
|
944
|
+
def list_by_resource_group_next(next_page_link, custom_headers:nil)
|
945
|
+
response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
946
|
+
response.body unless response.nil?
|
947
|
+
end
|
948
|
+
|
949
|
+
#
|
950
|
+
# List Resources by Resource Group
|
951
|
+
#
|
952
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
953
|
+
# to List operation.
|
954
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
955
|
+
# will be added to the HTTP request.
|
956
|
+
#
|
957
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
958
|
+
#
|
959
|
+
def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
|
960
|
+
list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
961
|
+
end
|
962
|
+
|
963
|
+
#
|
964
|
+
# List Resources by Resource Group
|
965
|
+
#
|
966
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
967
|
+
# to List operation.
|
968
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
969
|
+
# to the HTTP request.
|
970
|
+
#
|
971
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
972
|
+
#
|
973
|
+
def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
|
974
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
975
|
+
|
976
|
+
|
977
|
+
request_headers = {}
|
978
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
979
|
+
|
980
|
+
# Set Headers
|
981
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
982
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
983
|
+
path_template = '{nextLink}'
|
984
|
+
|
985
|
+
request_url = @base_url || @client.base_url
|
986
|
+
|
987
|
+
options = {
|
988
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
989
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
990
|
+
headers: request_headers.merge(custom_headers || {}),
|
991
|
+
base_url: request_url
|
992
|
+
}
|
993
|
+
promise = @client.make_request_async(:get, path_template, options)
|
994
|
+
|
995
|
+
promise = promise.then do |result|
|
996
|
+
http_response = result.response
|
997
|
+
status_code = http_response.status
|
998
|
+
response_content = http_response.body
|
999
|
+
unless status_code == 200
|
1000
|
+
error_model = JSON.load(response_content)
|
1001
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1002
|
+
end
|
1003
|
+
|
1004
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1005
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1006
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1007
|
+
# Deserialize Response
|
1008
|
+
if status_code == 200
|
1009
|
+
begin
|
1010
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1011
|
+
result_mapper = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::RemoteRenderingAccountPage.mapper()
|
1012
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1013
|
+
rescue Exception => e
|
1014
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1015
|
+
end
|
1016
|
+
end
|
1017
|
+
|
1018
|
+
result
|
1019
|
+
end
|
1020
|
+
|
1021
|
+
promise.execute
|
1022
|
+
end
|
1023
|
+
|
1024
|
+
#
|
1025
|
+
# List Remote Rendering Accounts by Subscription
|
1026
|
+
#
|
1027
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1028
|
+
# will be added to the HTTP request.
|
1029
|
+
#
|
1030
|
+
# @return [RemoteRenderingAccountPage] which provide lazy access to pages of
|
1031
|
+
# the response.
|
1032
|
+
#
|
1033
|
+
def list_by_subscription_as_lazy(custom_headers:nil)
|
1034
|
+
response = list_by_subscription_async(custom_headers:custom_headers).value!
|
1035
|
+
unless response.nil?
|
1036
|
+
page = response.body
|
1037
|
+
page.next_method = Proc.new do |next_page_link|
|
1038
|
+
list_by_subscription_next_async(next_page_link, custom_headers:custom_headers)
|
1039
|
+
end
|
1040
|
+
page
|
1041
|
+
end
|
1042
|
+
end
|
1043
|
+
|
1044
|
+
#
|
1045
|
+
# List Resources by Resource Group
|
1046
|
+
#
|
1047
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
1048
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1049
|
+
# will be added to the HTTP request.
|
1050
|
+
#
|
1051
|
+
# @return [RemoteRenderingAccountPage] which provide lazy access to pages of
|
1052
|
+
# the response.
|
1053
|
+
#
|
1054
|
+
def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
|
1055
|
+
response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
|
1056
|
+
unless response.nil?
|
1057
|
+
page = response.body
|
1058
|
+
page.next_method = Proc.new do |next_page_link|
|
1059
|
+
list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
|
1060
|
+
end
|
1061
|
+
page
|
1062
|
+
end
|
1063
|
+
end
|
1064
|
+
|
1065
|
+
end
|
1066
|
+
end
|