trinsic_service_clients 1.1.4229 → 1.1.5018
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/generated/credentials/credentials_client.rb +288 -16
- data/lib/generated/credentials/models/agent_endpoint.rb +0 -3
- data/lib/generated/credentials/models/attribute_filter.rb +8 -8
- data/lib/generated/credentials/models/basic_message_record.rb +30 -32
- data/lib/generated/credentials/models/credential_contract.rb +11 -0
- data/lib/generated/credentials/models/credential_definition_from_schema_parameters.rb +23 -23
- data/lib/generated/credentials/models/credential_offer_parameters.rb +3 -1
- data/lib/generated/credentials/models/proof_attribute_info.rb +1 -1
- data/lib/generated/credentials/models/proof_predicate_info.rb +23 -23
- data/lib/generated/credentials/models/proof_request.rb +3 -3
- data/lib/generated/credentials/models/schema_record.rb +33 -35
- data/lib/generated/credentials/models/tenant_parameters.rb +28 -7
- data/lib/generated/credentials/models/verification_policy_contract.rb +11 -11
- data/lib/generated/credentials/models/verification_policy_revocation_requirement.rb +11 -0
- data/lib/generated/credentials/version.rb +1 -1
- data/lib/generated/provider/models/tenant_contract.rb +12 -0
- data/lib/generated/provider/models/tenant_parameters.rb +11 -0
- data/lib/generated/provider/provider_client.rb +502 -1
- data/lib/generated/provider/version.rb +1 -1
- data/lib/generated/wallet.rb +10 -9
- data/lib/generated/wallet/models/agent_endpoint.rb +0 -3
- data/lib/generated/wallet/models/credential_contract.rb +11 -0
- data/lib/generated/wallet/models/verification_data_policy_credential_parameters.rb +65 -0
- data/lib/generated/wallet/models/verification_policy_attribute_contract.rb +1 -1
- data/lib/generated/wallet/models/verification_policy_parameters.rb +2 -2
- data/lib/generated/wallet/models/{verification_policy_revocation_reqirement.rb → verification_policy_revocation_requirement.rb} +15 -4
- data/lib/generated/wallet/version.rb +1 -1
- data/lib/generated/wallet/wallet_client.rb +574 -13
- data/trinsic_service_clients.gemspec +1 -1
- metadata +8 -6
@@ -10,9 +10,6 @@ module Credentials
|
|
10
10
|
#
|
11
11
|
#
|
12
12
|
class VerificationPolicyContract
|
13
|
-
# @return [String]
|
14
|
-
attr_accessor :policy_id
|
15
|
-
|
16
13
|
# @return [String]
|
17
14
|
attr_accessor :name
|
18
15
|
|
@@ -28,6 +25,9 @@ module Credentials
|
|
28
25
|
# @return [VerificationPolicyRevocationRequirement]
|
29
26
|
attr_accessor :revocation_requirement
|
30
27
|
|
28
|
+
# @return [String]
|
29
|
+
attr_accessor :policy_id
|
30
|
+
|
31
31
|
|
32
32
|
#
|
33
33
|
# Mapper for VerificationPolicyContract class as Ruby Hash.
|
@@ -42,14 +42,6 @@ module Credentials
|
|
42
42
|
name: 'Composite',
|
43
43
|
class_name: 'VerificationPolicyContract',
|
44
44
|
model_properties: {
|
45
|
-
policy_id: {
|
46
|
-
client_side_validation: true,
|
47
|
-
required: false,
|
48
|
-
serialized_name: 'policyId',
|
49
|
-
type: {
|
50
|
-
name: 'String'
|
51
|
-
}
|
52
|
-
},
|
53
45
|
name: {
|
54
46
|
client_side_validation: true,
|
55
47
|
required: true,
|
@@ -108,6 +100,14 @@ module Credentials
|
|
108
100
|
name: 'Composite',
|
109
101
|
class_name: 'VerificationPolicyRevocationRequirement'
|
110
102
|
}
|
103
|
+
},
|
104
|
+
policy_id: {
|
105
|
+
client_side_validation: true,
|
106
|
+
required: false,
|
107
|
+
serialized_name: 'policyId',
|
108
|
+
type: {
|
109
|
+
name: 'String'
|
110
|
+
}
|
111
111
|
}
|
112
112
|
}
|
113
113
|
}
|
@@ -13,6 +13,9 @@ module Credentials
|
|
13
13
|
# @return [DateTime]
|
14
14
|
attr_accessor :valid_at
|
15
15
|
|
16
|
+
# @return [Boolean]
|
17
|
+
attr_accessor :valid_now
|
18
|
+
|
16
19
|
|
17
20
|
#
|
18
21
|
# Mapper for VerificationPolicyRevocationRequirement class as Ruby Hash.
|
@@ -34,6 +37,14 @@ module Credentials
|
|
34
37
|
type: {
|
35
38
|
name: 'DateTime'
|
36
39
|
}
|
40
|
+
},
|
41
|
+
valid_now: {
|
42
|
+
client_side_validation: true,
|
43
|
+
required: false,
|
44
|
+
serialized_name: 'validNow',
|
45
|
+
type: {
|
46
|
+
name: 'Boolean'
|
47
|
+
}
|
37
48
|
}
|
38
49
|
}
|
39
50
|
}
|
@@ -21,6 +21,10 @@ module Provider
|
|
21
21
|
# @return [String] The tenant identifier
|
22
22
|
attr_accessor :tenant_id
|
23
23
|
|
24
|
+
# @return [String] The region of the data center where all data for this
|
25
|
+
# tenant is located
|
26
|
+
attr_accessor :region
|
27
|
+
|
24
28
|
# @return [TenantExtendedInformationContract]
|
25
29
|
attr_accessor :extended_information
|
26
30
|
|
@@ -73,6 +77,14 @@ module Provider
|
|
73
77
|
name: 'String'
|
74
78
|
}
|
75
79
|
},
|
80
|
+
region: {
|
81
|
+
client_side_validation: true,
|
82
|
+
required: false,
|
83
|
+
serialized_name: 'region',
|
84
|
+
type: {
|
85
|
+
name: 'String'
|
86
|
+
}
|
87
|
+
},
|
76
88
|
extended_information: {
|
77
89
|
client_side_validation: true,
|
78
90
|
required: false,
|
@@ -30,6 +30,9 @@ module Provider
|
|
30
30
|
# 'Delegated'
|
31
31
|
attr_accessor :endorser_type
|
32
32
|
|
33
|
+
# @return [String] The geo-region where storage data will be located.
|
34
|
+
attr_accessor :region
|
35
|
+
|
33
36
|
|
34
37
|
#
|
35
38
|
# Mapper for TenantParameters class as Ruby Hash.
|
@@ -91,6 +94,14 @@ module Provider
|
|
91
94
|
type: {
|
92
95
|
name: 'String'
|
93
96
|
}
|
97
|
+
},
|
98
|
+
region: {
|
99
|
+
client_side_validation: true,
|
100
|
+
required: false,
|
101
|
+
serialized_name: 'region',
|
102
|
+
type: {
|
103
|
+
name: 'String'
|
104
|
+
}
|
94
105
|
}
|
95
106
|
}
|
96
107
|
}
|
@@ -90,6 +90,247 @@ module Provider
|
|
90
90
|
super(request_url, method, path, options)
|
91
91
|
end
|
92
92
|
|
93
|
+
#
|
94
|
+
# Get a count of total cloud wallets created on this account
|
95
|
+
#
|
96
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
97
|
+
# will be added to the HTTP request.
|
98
|
+
#
|
99
|
+
# @return [CloudWalletAnalyticsContract] operation results.
|
100
|
+
#
|
101
|
+
def get_cloud_wallet_count(custom_headers:nil)
|
102
|
+
response = get_cloud_wallet_count_async(custom_headers:custom_headers).value!
|
103
|
+
response.body unless response.nil?
|
104
|
+
end
|
105
|
+
|
106
|
+
#
|
107
|
+
# Get a count of total cloud wallets created on this account
|
108
|
+
#
|
109
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
110
|
+
# will be added to the HTTP request.
|
111
|
+
#
|
112
|
+
# @return [MsRest::HttpOperationResponse] HTTP response information.
|
113
|
+
#
|
114
|
+
def get_cloud_wallet_count_with_http_info(custom_headers:nil)
|
115
|
+
get_cloud_wallet_count_async(custom_headers:custom_headers).value!
|
116
|
+
end
|
117
|
+
|
118
|
+
#
|
119
|
+
# Get a count of total cloud wallets created on this account
|
120
|
+
#
|
121
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
122
|
+
# to the HTTP request.
|
123
|
+
#
|
124
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
125
|
+
#
|
126
|
+
def get_cloud_wallet_count_async(custom_headers:nil)
|
127
|
+
|
128
|
+
|
129
|
+
request_headers = {}
|
130
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
131
|
+
path_template = 'analytics/cloudWallets'
|
132
|
+
|
133
|
+
request_url = @base_url || self.base_url
|
134
|
+
|
135
|
+
options = {
|
136
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
137
|
+
headers: request_headers.merge(custom_headers || {}),
|
138
|
+
base_url: request_url
|
139
|
+
}
|
140
|
+
promise = self.make_request_async(:get, path_template, options)
|
141
|
+
|
142
|
+
promise = promise.then do |result|
|
143
|
+
http_response = result.response
|
144
|
+
status_code = http_response.status
|
145
|
+
response_content = http_response.body
|
146
|
+
unless status_code == 200
|
147
|
+
error_model = JSON.load(response_content)
|
148
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
149
|
+
end
|
150
|
+
|
151
|
+
# Deserialize Response
|
152
|
+
if status_code == 200
|
153
|
+
begin
|
154
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
155
|
+
result_mapper = Provider::Models::CloudWalletAnalyticsContract.mapper()
|
156
|
+
result.body = self.deserialize(result_mapper, parsed_response)
|
157
|
+
rescue Exception => e
|
158
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
result
|
163
|
+
end
|
164
|
+
|
165
|
+
promise.execute
|
166
|
+
end
|
167
|
+
|
168
|
+
#
|
169
|
+
# Get the usage for the currently active period
|
170
|
+
#
|
171
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
172
|
+
# will be added to the HTTP request.
|
173
|
+
#
|
174
|
+
# @return [UsageContract] operation results.
|
175
|
+
#
|
176
|
+
def get_current_usage(custom_headers:nil)
|
177
|
+
response = get_current_usage_async(custom_headers:custom_headers).value!
|
178
|
+
response.body unless response.nil?
|
179
|
+
end
|
180
|
+
|
181
|
+
#
|
182
|
+
# Get the usage for the currently active period
|
183
|
+
#
|
184
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
185
|
+
# will be added to the HTTP request.
|
186
|
+
#
|
187
|
+
# @return [MsRest::HttpOperationResponse] HTTP response information.
|
188
|
+
#
|
189
|
+
def get_current_usage_with_http_info(custom_headers:nil)
|
190
|
+
get_current_usage_async(custom_headers:custom_headers).value!
|
191
|
+
end
|
192
|
+
|
193
|
+
#
|
194
|
+
# Get the usage for the currently active period
|
195
|
+
#
|
196
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
197
|
+
# to the HTTP request.
|
198
|
+
#
|
199
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
200
|
+
#
|
201
|
+
def get_current_usage_async(custom_headers:nil)
|
202
|
+
|
203
|
+
|
204
|
+
request_headers = {}
|
205
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
206
|
+
path_template = 'analytics/usage/current'
|
207
|
+
|
208
|
+
request_url = @base_url || self.base_url
|
209
|
+
|
210
|
+
options = {
|
211
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
212
|
+
headers: request_headers.merge(custom_headers || {}),
|
213
|
+
base_url: request_url
|
214
|
+
}
|
215
|
+
promise = self.make_request_async(:get, path_template, options)
|
216
|
+
|
217
|
+
promise = promise.then do |result|
|
218
|
+
http_response = result.response
|
219
|
+
status_code = http_response.status
|
220
|
+
response_content = http_response.body
|
221
|
+
unless status_code == 200
|
222
|
+
error_model = JSON.load(response_content)
|
223
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
224
|
+
end
|
225
|
+
|
226
|
+
# Deserialize Response
|
227
|
+
if status_code == 200
|
228
|
+
begin
|
229
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
230
|
+
result_mapper = Provider::Models::UsageContract.mapper()
|
231
|
+
result.body = self.deserialize(result_mapper, parsed_response)
|
232
|
+
rescue Exception => e
|
233
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
result
|
238
|
+
end
|
239
|
+
|
240
|
+
promise.execute
|
241
|
+
end
|
242
|
+
|
243
|
+
#
|
244
|
+
# Experimental endpoint using OData
|
245
|
+
#
|
246
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
247
|
+
# will be added to the HTTP request.
|
248
|
+
#
|
249
|
+
# @return [Array] operation results.
|
250
|
+
#
|
251
|
+
def search_usage(custom_headers:nil)
|
252
|
+
response = search_usage_async(custom_headers:custom_headers).value!
|
253
|
+
response.body unless response.nil?
|
254
|
+
end
|
255
|
+
|
256
|
+
#
|
257
|
+
# Experimental endpoint using OData
|
258
|
+
#
|
259
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
260
|
+
# will be added to the HTTP request.
|
261
|
+
#
|
262
|
+
# @return [MsRest::HttpOperationResponse] HTTP response information.
|
263
|
+
#
|
264
|
+
def search_usage_with_http_info(custom_headers:nil)
|
265
|
+
search_usage_async(custom_headers:custom_headers).value!
|
266
|
+
end
|
267
|
+
|
268
|
+
#
|
269
|
+
# Experimental endpoint using OData
|
270
|
+
#
|
271
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
272
|
+
# to the HTTP request.
|
273
|
+
#
|
274
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
275
|
+
#
|
276
|
+
def search_usage_async(custom_headers:nil)
|
277
|
+
|
278
|
+
|
279
|
+
request_headers = {}
|
280
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
281
|
+
path_template = 'analytics/usage'
|
282
|
+
|
283
|
+
request_url = @base_url || self.base_url
|
284
|
+
|
285
|
+
options = {
|
286
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
287
|
+
headers: request_headers.merge(custom_headers || {}),
|
288
|
+
base_url: request_url
|
289
|
+
}
|
290
|
+
promise = self.make_request_async(:get, path_template, options)
|
291
|
+
|
292
|
+
promise = promise.then do |result|
|
293
|
+
http_response = result.response
|
294
|
+
status_code = http_response.status
|
295
|
+
response_content = http_response.body
|
296
|
+
unless status_code == 200
|
297
|
+
error_model = JSON.load(response_content)
|
298
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
299
|
+
end
|
300
|
+
|
301
|
+
# Deserialize Response
|
302
|
+
if status_code == 200
|
303
|
+
begin
|
304
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
305
|
+
result_mapper = {
|
306
|
+
client_side_validation: true,
|
307
|
+
required: false,
|
308
|
+
serialized_name: 'parsed_response',
|
309
|
+
type: {
|
310
|
+
name: 'Sequence',
|
311
|
+
element: {
|
312
|
+
client_side_validation: true,
|
313
|
+
required: false,
|
314
|
+
serialized_name: 'UsageContractElementType',
|
315
|
+
type: {
|
316
|
+
name: 'Composite',
|
317
|
+
class_name: 'UsageContract'
|
318
|
+
}
|
319
|
+
}
|
320
|
+
}
|
321
|
+
}
|
322
|
+
result.body = self.deserialize(result_mapper, parsed_response)
|
323
|
+
rescue Exception => e
|
324
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
325
|
+
end
|
326
|
+
end
|
327
|
+
|
328
|
+
result
|
329
|
+
end
|
330
|
+
|
331
|
+
promise.execute
|
332
|
+
end
|
333
|
+
|
93
334
|
#
|
94
335
|
# Upload asset
|
95
336
|
#
|
@@ -189,6 +430,196 @@ module Provider
|
|
189
430
|
promise.execute
|
190
431
|
end
|
191
432
|
|
433
|
+
#
|
434
|
+
# List all ledger networks
|
435
|
+
#
|
436
|
+
# List all available ledger networks.
|
437
|
+
# Some networks are not available based on your subscription.
|
438
|
+
#
|
439
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
440
|
+
# will be added to the HTTP request.
|
441
|
+
#
|
442
|
+
# @return [Array] operation results.
|
443
|
+
#
|
444
|
+
def list_networks(custom_headers:nil)
|
445
|
+
response = list_networks_async(custom_headers:custom_headers).value!
|
446
|
+
response.body unless response.nil?
|
447
|
+
end
|
448
|
+
|
449
|
+
#
|
450
|
+
# List all ledger networks
|
451
|
+
#
|
452
|
+
# List all available ledger networks.
|
453
|
+
# Some networks are not available based on your subscription.
|
454
|
+
#
|
455
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
456
|
+
# will be added to the HTTP request.
|
457
|
+
#
|
458
|
+
# @return [MsRest::HttpOperationResponse] HTTP response information.
|
459
|
+
#
|
460
|
+
def list_networks_with_http_info(custom_headers:nil)
|
461
|
+
list_networks_async(custom_headers:custom_headers).value!
|
462
|
+
end
|
463
|
+
|
464
|
+
#
|
465
|
+
# List all ledger networks
|
466
|
+
#
|
467
|
+
# List all available ledger networks.
|
468
|
+
# Some networks are not available based on your subscription.
|
469
|
+
#
|
470
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
471
|
+
# to the HTTP request.
|
472
|
+
#
|
473
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
474
|
+
#
|
475
|
+
def list_networks_async(custom_headers:nil)
|
476
|
+
|
477
|
+
|
478
|
+
request_headers = {}
|
479
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
480
|
+
path_template = 'networks'
|
481
|
+
|
482
|
+
request_url = @base_url || self.base_url
|
483
|
+
|
484
|
+
options = {
|
485
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
486
|
+
headers: request_headers.merge(custom_headers || {}),
|
487
|
+
base_url: request_url
|
488
|
+
}
|
489
|
+
promise = self.make_request_async(:get, path_template, options)
|
490
|
+
|
491
|
+
promise = promise.then do |result|
|
492
|
+
http_response = result.response
|
493
|
+
status_code = http_response.status
|
494
|
+
response_content = http_response.body
|
495
|
+
unless status_code == 200
|
496
|
+
error_model = JSON.load(response_content)
|
497
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
498
|
+
end
|
499
|
+
|
500
|
+
# Deserialize Response
|
501
|
+
if status_code == 200
|
502
|
+
begin
|
503
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
504
|
+
result_mapper = {
|
505
|
+
client_side_validation: true,
|
506
|
+
required: false,
|
507
|
+
serialized_name: 'parsed_response',
|
508
|
+
type: {
|
509
|
+
name: 'Sequence',
|
510
|
+
element: {
|
511
|
+
client_side_validation: true,
|
512
|
+
required: false,
|
513
|
+
serialized_name: 'NetworkContractElementType',
|
514
|
+
type: {
|
515
|
+
name: 'Composite',
|
516
|
+
class_name: 'NetworkContract'
|
517
|
+
}
|
518
|
+
}
|
519
|
+
}
|
520
|
+
}
|
521
|
+
result.body = self.deserialize(result_mapper, parsed_response)
|
522
|
+
rescue Exception => e
|
523
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
524
|
+
end
|
525
|
+
end
|
526
|
+
|
527
|
+
result
|
528
|
+
end
|
529
|
+
|
530
|
+
promise.execute
|
531
|
+
end
|
532
|
+
|
533
|
+
#
|
534
|
+
# Get available regions
|
535
|
+
#
|
536
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
537
|
+
# will be added to the HTTP request.
|
538
|
+
#
|
539
|
+
# @return [Hash] operation results.
|
540
|
+
#
|
541
|
+
def get_regions(custom_headers:nil)
|
542
|
+
response = get_regions_async(custom_headers:custom_headers).value!
|
543
|
+
response.body unless response.nil?
|
544
|
+
end
|
545
|
+
|
546
|
+
#
|
547
|
+
# Get available regions
|
548
|
+
#
|
549
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
550
|
+
# will be added to the HTTP request.
|
551
|
+
#
|
552
|
+
# @return [MsRest::HttpOperationResponse] HTTP response information.
|
553
|
+
#
|
554
|
+
def get_regions_with_http_info(custom_headers:nil)
|
555
|
+
get_regions_async(custom_headers:custom_headers).value!
|
556
|
+
end
|
557
|
+
|
558
|
+
#
|
559
|
+
# Get available regions
|
560
|
+
#
|
561
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
562
|
+
# to the HTTP request.
|
563
|
+
#
|
564
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
565
|
+
#
|
566
|
+
def get_regions_async(custom_headers:nil)
|
567
|
+
|
568
|
+
|
569
|
+
request_headers = {}
|
570
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
571
|
+
path_template = 'regions'
|
572
|
+
|
573
|
+
request_url = @base_url || self.base_url
|
574
|
+
|
575
|
+
options = {
|
576
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
577
|
+
headers: request_headers.merge(custom_headers || {}),
|
578
|
+
base_url: request_url
|
579
|
+
}
|
580
|
+
promise = self.make_request_async(:get, path_template, options)
|
581
|
+
|
582
|
+
promise = promise.then do |result|
|
583
|
+
http_response = result.response
|
584
|
+
status_code = http_response.status
|
585
|
+
response_content = http_response.body
|
586
|
+
unless status_code == 200
|
587
|
+
error_model = JSON.load(response_content)
|
588
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
589
|
+
end
|
590
|
+
|
591
|
+
# Deserialize Response
|
592
|
+
if status_code == 200
|
593
|
+
begin
|
594
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
595
|
+
result_mapper = {
|
596
|
+
client_side_validation: true,
|
597
|
+
required: false,
|
598
|
+
serialized_name: 'parsed_response',
|
599
|
+
type: {
|
600
|
+
name: 'Dictionary',
|
601
|
+
value: {
|
602
|
+
client_side_validation: true,
|
603
|
+
required: false,
|
604
|
+
serialized_name: 'StringElementType',
|
605
|
+
type: {
|
606
|
+
name: 'String'
|
607
|
+
}
|
608
|
+
}
|
609
|
+
}
|
610
|
+
}
|
611
|
+
result.body = self.deserialize(result_mapper, parsed_response)
|
612
|
+
rescue Exception => e
|
613
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
614
|
+
end
|
615
|
+
end
|
616
|
+
|
617
|
+
result
|
618
|
+
end
|
619
|
+
|
620
|
+
promise.execute
|
621
|
+
end
|
622
|
+
|
192
623
|
#
|
193
624
|
# List all tenants
|
194
625
|
#
|
@@ -812,6 +1243,76 @@ module Provider
|
|
812
1243
|
promise.execute
|
813
1244
|
end
|
814
1245
|
|
1246
|
+
#
|
1247
|
+
# Health check
|
1248
|
+
#
|
1249
|
+
# Check the health of the API.
|
1250
|
+
#
|
1251
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1252
|
+
# will be added to the HTTP request.
|
1253
|
+
#
|
1254
|
+
#
|
1255
|
+
def health(custom_headers:nil)
|
1256
|
+
response = health_async(custom_headers:custom_headers).value!
|
1257
|
+
nil
|
1258
|
+
end
|
1259
|
+
|
1260
|
+
#
|
1261
|
+
# Health check
|
1262
|
+
#
|
1263
|
+
# Check the health of the API.
|
1264
|
+
#
|
1265
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1266
|
+
# will be added to the HTTP request.
|
1267
|
+
#
|
1268
|
+
# @return [MsRest::HttpOperationResponse] HTTP response information.
|
1269
|
+
#
|
1270
|
+
def health_with_http_info(custom_headers:nil)
|
1271
|
+
health_async(custom_headers:custom_headers).value!
|
1272
|
+
end
|
1273
|
+
|
1274
|
+
#
|
1275
|
+
# Health check
|
1276
|
+
#
|
1277
|
+
# Check the health of the API.
|
1278
|
+
#
|
1279
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1280
|
+
# to the HTTP request.
|
1281
|
+
#
|
1282
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1283
|
+
#
|
1284
|
+
def health_async(custom_headers:nil)
|
1285
|
+
|
1286
|
+
|
1287
|
+
request_headers = {}
|
1288
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1289
|
+
path_template = 'health'
|
1290
|
+
|
1291
|
+
request_url = @base_url || self.base_url
|
1292
|
+
|
1293
|
+
options = {
|
1294
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1295
|
+
headers: request_headers.merge(custom_headers || {}),
|
1296
|
+
base_url: request_url
|
1297
|
+
}
|
1298
|
+
promise = self.make_request_async(:get, path_template, options)
|
1299
|
+
|
1300
|
+
promise = promise.then do |result|
|
1301
|
+
http_response = result.response
|
1302
|
+
status_code = http_response.status
|
1303
|
+
response_content = http_response.body
|
1304
|
+
unless status_code == 200
|
1305
|
+
error_model = JSON.load(response_content)
|
1306
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1307
|
+
end
|
1308
|
+
|
1309
|
+
|
1310
|
+
result
|
1311
|
+
end
|
1312
|
+
|
1313
|
+
promise.execute
|
1314
|
+
end
|
1315
|
+
|
815
1316
|
|
816
1317
|
private
|
817
1318
|
#
|
@@ -819,7 +1320,7 @@ module Provider
|
|
819
1320
|
#
|
820
1321
|
def add_telemetry
|
821
1322
|
sdk_information = 'provider'
|
822
|
-
sdk_information = "#{sdk_information}/1.1.
|
1323
|
+
sdk_information = "#{sdk_information}/1.1.5018"
|
823
1324
|
add_user_agent_information(sdk_information)
|
824
1325
|
end
|
825
1326
|
end
|