azure_mgmt_digitaltwins 0.17.0 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2020-10-31/generated/azure_mgmt_digitaltwins/azure_digital_twins_management_client.rb +1 -1
- data/lib/2020-10-31/generated/azure_mgmt_digitaltwins/digital_twins.rb +81 -129
- data/lib/2020-10-31/generated/azure_mgmt_digitaltwins/models/digital_twins_endpoint_resource.rb +1 -1
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29fe64acc9b3a4086c22d8a7a1f019d45e86ebaa97fce4cfa122a1b8766f8e6b
|
4
|
+
data.tar.gz: 79dbe21454148c3c3211ed2326fbdd4e77feee7e88ca179ef060ae358daec655
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24fbb70247c79c300057654d38cf02b92f5ddc056f501d1349fff1ce7d3f093cc03c9ec5a916b4d4a06a26c3f2aafa5c760e52a66d6a98270790243a5063531c
|
7
|
+
data.tar.gz: 439edd2d26801c26ff43fe348afdd0e454537bd0547017f6eef9dd2c3bcf07361e6e843c01d4212b712299de5714a7cbef5ca216c4b33860378e71e3381ca147
|
data/lib/2020-10-31/generated/azure_mgmt_digitaltwins/azure_digital_twins_management_client.rb
CHANGED
@@ -132,7 +132,7 @@ module Azure::DigitalTwins::Mgmt::V2020_10_31
|
|
132
132
|
#
|
133
133
|
def add_telemetry
|
134
134
|
sdk_information = 'azure_mgmt_digitaltwins'
|
135
|
-
sdk_information = "#{sdk_information}/0.
|
135
|
+
sdk_information = "#{sdk_information}/0.18.0"
|
136
136
|
add_user_agent_information(sdk_information)
|
137
137
|
end
|
138
138
|
end
|
@@ -193,6 +193,8 @@ module Azure::DigitalTwins::Mgmt::V2020_10_31
|
|
193
193
|
response.body unless response.nil?
|
194
194
|
end
|
195
195
|
|
196
|
+
#
|
197
|
+
# Update metadata of DigitalTwinsInstance.
|
196
198
|
#
|
197
199
|
# @param resource_group_name [String] The name of the resource group that
|
198
200
|
# contains the DigitalTwinsInstance.
|
@@ -202,25 +204,92 @@ module Azure::DigitalTwins::Mgmt::V2020_10_31
|
|
202
204
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
203
205
|
# will be added to the HTTP request.
|
204
206
|
#
|
205
|
-
# @return [
|
206
|
-
#
|
207
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
208
|
+
#
|
209
|
+
def update_with_http_info(resource_group_name, resource_name, digital_twins_patch_description, custom_headers:nil)
|
210
|
+
update_async(resource_group_name, resource_name, digital_twins_patch_description, custom_headers:custom_headers).value!
|
211
|
+
end
|
212
|
+
|
213
|
+
#
|
214
|
+
# Update metadata of DigitalTwinsInstance.
|
215
|
+
#
|
216
|
+
# @param resource_group_name [String] The name of the resource group that
|
217
|
+
# contains the DigitalTwinsInstance.
|
218
|
+
# @param resource_name [String] The name of the DigitalTwinsInstance.
|
219
|
+
# @param digital_twins_patch_description [DigitalTwinsPatchDescription] The
|
220
|
+
# DigitalTwinsInstance and security metadata.
|
221
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
222
|
+
# to the HTTP request.
|
223
|
+
#
|
224
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
207
225
|
#
|
208
226
|
def update_async(resource_group_name, resource_name, digital_twins_patch_description, custom_headers:nil)
|
209
|
-
|
210
|
-
|
227
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '10'" if !@client.api_version.nil? && @client.api_version.length < 10
|
228
|
+
@client.api_version = '2020-10-31'
|
229
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
230
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
231
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '64'" if !resource_group_name.nil? && resource_group_name.length > 64
|
232
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
233
|
+
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
234
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '63'" if !resource_name.nil? && resource_name.length > 63
|
235
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '3'" if !resource_name.nil? && resource_name.length < 3
|
236
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'Pattern': '^(?!-)[A-Za-z0-9-]{3,63}(?<!-)$'" if !resource_name.nil? && resource_name.match(Regexp.new('^^(?!-)[A-Za-z0-9-]{3,63}(?<!-)$$')).nil?
|
237
|
+
fail ArgumentError, 'digital_twins_patch_description is nil' if digital_twins_patch_description.nil?
|
211
238
|
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
239
|
+
|
240
|
+
request_headers = {}
|
241
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
242
|
+
|
243
|
+
# Set Headers
|
244
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
245
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
246
|
+
|
247
|
+
# Serialize Request
|
248
|
+
request_mapper = Azure::DigitalTwins::Mgmt::V2020_10_31::Models::DigitalTwinsPatchDescription.mapper()
|
249
|
+
request_content = @client.serialize(request_mapper, digital_twins_patch_description)
|
250
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
251
|
+
|
252
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}'
|
253
|
+
|
254
|
+
request_url = @base_url || @client.base_url
|
255
|
+
|
256
|
+
options = {
|
257
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
258
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name},
|
259
|
+
query_params: {'api-version' => @client.api_version},
|
260
|
+
body: request_content,
|
261
|
+
headers: request_headers.merge(custom_headers || {}),
|
262
|
+
base_url: request_url
|
263
|
+
}
|
264
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
265
|
+
|
266
|
+
promise = promise.then do |result|
|
267
|
+
http_response = result.response
|
268
|
+
status_code = http_response.status
|
269
|
+
response_content = http_response.body
|
270
|
+
unless status_code == 200
|
271
|
+
error_model = JSON.load(response_content)
|
272
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
217
273
|
end
|
218
274
|
|
219
|
-
|
220
|
-
|
275
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
276
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
277
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
278
|
+
# Deserialize Response
|
279
|
+
if status_code == 200
|
280
|
+
begin
|
281
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
282
|
+
result_mapper = Azure::DigitalTwins::Mgmt::V2020_10_31::Models::DigitalTwinsDescription.mapper()
|
283
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
284
|
+
rescue Exception => e
|
285
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
286
|
+
end
|
287
|
+
end
|
288
|
+
|
289
|
+
result
|
221
290
|
end
|
222
291
|
|
223
|
-
promise
|
292
|
+
promise.execute
|
224
293
|
end
|
225
294
|
|
226
295
|
#
|
@@ -695,123 +764,6 @@ module Azure::DigitalTwins::Mgmt::V2020_10_31
|
|
695
764
|
promise.execute
|
696
765
|
end
|
697
766
|
|
698
|
-
#
|
699
|
-
# Update metadata of DigitalTwinsInstance.
|
700
|
-
#
|
701
|
-
# @param resource_group_name [String] The name of the resource group that
|
702
|
-
# contains the DigitalTwinsInstance.
|
703
|
-
# @param resource_name [String] The name of the DigitalTwinsInstance.
|
704
|
-
# @param digital_twins_patch_description [DigitalTwinsPatchDescription] The
|
705
|
-
# DigitalTwinsInstance and security metadata.
|
706
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
707
|
-
# will be added to the HTTP request.
|
708
|
-
#
|
709
|
-
# @return [DigitalTwinsDescription] operation results.
|
710
|
-
#
|
711
|
-
def begin_update(resource_group_name, resource_name, digital_twins_patch_description, custom_headers:nil)
|
712
|
-
response = begin_update_async(resource_group_name, resource_name, digital_twins_patch_description, custom_headers:custom_headers).value!
|
713
|
-
response.body unless response.nil?
|
714
|
-
end
|
715
|
-
|
716
|
-
#
|
717
|
-
# Update metadata of DigitalTwinsInstance.
|
718
|
-
#
|
719
|
-
# @param resource_group_name [String] The name of the resource group that
|
720
|
-
# contains the DigitalTwinsInstance.
|
721
|
-
# @param resource_name [String] The name of the DigitalTwinsInstance.
|
722
|
-
# @param digital_twins_patch_description [DigitalTwinsPatchDescription] The
|
723
|
-
# DigitalTwinsInstance and security metadata.
|
724
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
725
|
-
# will be added to the HTTP request.
|
726
|
-
#
|
727
|
-
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
728
|
-
#
|
729
|
-
def begin_update_with_http_info(resource_group_name, resource_name, digital_twins_patch_description, custom_headers:nil)
|
730
|
-
begin_update_async(resource_group_name, resource_name, digital_twins_patch_description, custom_headers:custom_headers).value!
|
731
|
-
end
|
732
|
-
|
733
|
-
#
|
734
|
-
# Update metadata of DigitalTwinsInstance.
|
735
|
-
#
|
736
|
-
# @param resource_group_name [String] The name of the resource group that
|
737
|
-
# contains the DigitalTwinsInstance.
|
738
|
-
# @param resource_name [String] The name of the DigitalTwinsInstance.
|
739
|
-
# @param digital_twins_patch_description [DigitalTwinsPatchDescription] The
|
740
|
-
# DigitalTwinsInstance and security metadata.
|
741
|
-
# @param [Hash{String => String}] A hash of custom headers that will be added
|
742
|
-
# to the HTTP request.
|
743
|
-
#
|
744
|
-
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
745
|
-
#
|
746
|
-
def begin_update_async(resource_group_name, resource_name, digital_twins_patch_description, custom_headers:nil)
|
747
|
-
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '10'" if !@client.api_version.nil? && @client.api_version.length < 10
|
748
|
-
@client.api_version = '2020-10-31'
|
749
|
-
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
750
|
-
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
751
|
-
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '64'" if !resource_group_name.nil? && resource_group_name.length > 64
|
752
|
-
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
753
|
-
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
754
|
-
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '63'" if !resource_name.nil? && resource_name.length > 63
|
755
|
-
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '3'" if !resource_name.nil? && resource_name.length < 3
|
756
|
-
fail ArgumentError, "'resource_name' should satisfy the constraint - 'Pattern': '^(?!-)[A-Za-z0-9-]{3,63}(?<!-)$'" if !resource_name.nil? && resource_name.match(Regexp.new('^^(?!-)[A-Za-z0-9-]{3,63}(?<!-)$$')).nil?
|
757
|
-
fail ArgumentError, 'digital_twins_patch_description is nil' if digital_twins_patch_description.nil?
|
758
|
-
|
759
|
-
|
760
|
-
request_headers = {}
|
761
|
-
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
762
|
-
|
763
|
-
# Set Headers
|
764
|
-
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
765
|
-
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
766
|
-
|
767
|
-
# Serialize Request
|
768
|
-
request_mapper = Azure::DigitalTwins::Mgmt::V2020_10_31::Models::DigitalTwinsPatchDescription.mapper()
|
769
|
-
request_content = @client.serialize(request_mapper, digital_twins_patch_description)
|
770
|
-
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
771
|
-
|
772
|
-
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}'
|
773
|
-
|
774
|
-
request_url = @base_url || @client.base_url
|
775
|
-
|
776
|
-
options = {
|
777
|
-
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
778
|
-
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name},
|
779
|
-
query_params: {'api-version' => @client.api_version},
|
780
|
-
body: request_content,
|
781
|
-
headers: request_headers.merge(custom_headers || {}),
|
782
|
-
base_url: request_url
|
783
|
-
}
|
784
|
-
promise = @client.make_request_async(:patch, path_template, options)
|
785
|
-
|
786
|
-
promise = promise.then do |result|
|
787
|
-
http_response = result.response
|
788
|
-
status_code = http_response.status
|
789
|
-
response_content = http_response.body
|
790
|
-
unless status_code == 200
|
791
|
-
error_model = JSON.load(response_content)
|
792
|
-
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
793
|
-
end
|
794
|
-
|
795
|
-
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
796
|
-
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
797
|
-
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
798
|
-
# Deserialize Response
|
799
|
-
if status_code == 200
|
800
|
-
begin
|
801
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
802
|
-
result_mapper = Azure::DigitalTwins::Mgmt::V2020_10_31::Models::DigitalTwinsDescription.mapper()
|
803
|
-
result.body = @client.deserialize(result_mapper, parsed_response)
|
804
|
-
rescue Exception => e
|
805
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
806
|
-
end
|
807
|
-
end
|
808
|
-
|
809
|
-
result
|
810
|
-
end
|
811
|
-
|
812
|
-
promise.execute
|
813
|
-
end
|
814
|
-
|
815
767
|
#
|
816
768
|
# Delete a DigitalTwinsInstance.
|
817
769
|
#
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: azure_mgmt_digitaltwins
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Microsoft Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|