azure_mgmt_graph 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generated/azure_mgmt_graph.rb +21 -18
  3. data/lib/generated/azure_mgmt_graph/applications.rb +52 -54
  4. data/lib/generated/azure_mgmt_graph/domains.rb +198 -0
  5. data/lib/generated/azure_mgmt_graph/graph_rbac_management_client.rb +9 -1
  6. data/lib/generated/azure_mgmt_graph/groups.rb +59 -61
  7. data/lib/generated/azure_mgmt_graph/models/aadobject.rb +115 -1
  8. data/lib/generated/azure_mgmt_graph/models/adgroup.rb +2 -1
  9. data/lib/generated/azure_mgmt_graph/models/application.rb +2 -1
  10. data/lib/generated/azure_mgmt_graph/models/application_create_parameters.rb +2 -1
  11. data/lib/generated/azure_mgmt_graph/models/application_list_result.rb +2 -1
  12. data/lib/generated/azure_mgmt_graph/models/application_update_parameters.rb +2 -1
  13. data/lib/generated/azure_mgmt_graph/models/check_group_membership_parameters.rb +2 -1
  14. data/lib/generated/azure_mgmt_graph/models/check_group_membership_result.rb +2 -1
  15. data/lib/generated/azure_mgmt_graph/models/domain.rb +78 -0
  16. data/lib/generated/azure_mgmt_graph/models/domain_list_result.rb +53 -0
  17. data/lib/generated/azure_mgmt_graph/models/get_objects_parameters.rb +2 -1
  18. data/lib/generated/azure_mgmt_graph/models/get_objects_result.rb +2 -1
  19. data/lib/generated/azure_mgmt_graph/models/graph_error.rb +2 -1
  20. data/lib/generated/azure_mgmt_graph/models/group_add_member_parameters.rb +2 -1
  21. data/lib/generated/azure_mgmt_graph/models/group_create_parameters.rb +2 -1
  22. data/lib/generated/azure_mgmt_graph/models/group_get_member_groups_parameters.rb +2 -1
  23. data/lib/generated/azure_mgmt_graph/models/group_get_member_groups_result.rb +2 -1
  24. data/lib/generated/azure_mgmt_graph/models/group_list_result.rb +2 -1
  25. data/lib/generated/azure_mgmt_graph/models/key_credential.rb +2 -1
  26. data/lib/generated/azure_mgmt_graph/models/key_credential_list_result.rb +2 -1
  27. data/lib/generated/azure_mgmt_graph/models/key_credentials_update_parameters.rb +2 -1
  28. data/lib/generated/azure_mgmt_graph/models/password_credential.rb +2 -1
  29. data/lib/generated/azure_mgmt_graph/models/password_credential_list_result.rb +2 -1
  30. data/lib/generated/azure_mgmt_graph/models/password_credentials_update_parameters.rb +2 -1
  31. data/lib/generated/azure_mgmt_graph/models/password_profile.rb +2 -1
  32. data/lib/generated/azure_mgmt_graph/models/service_principal.rb +2 -1
  33. data/lib/generated/azure_mgmt_graph/models/service_principal_create_parameters.rb +2 -1
  34. data/lib/generated/azure_mgmt_graph/models/service_principal_list_result.rb +2 -1
  35. data/lib/generated/azure_mgmt_graph/models/user.rb +15 -1
  36. data/lib/generated/azure_mgmt_graph/models/user_create_parameters.rb +15 -1
  37. data/lib/generated/azure_mgmt_graph/models/user_get_member_groups_parameters.rb +2 -1
  38. data/lib/generated/azure_mgmt_graph/models/user_get_member_groups_result.rb +2 -1
  39. data/lib/generated/azure_mgmt_graph/models/user_list_result.rb +2 -1
  40. data/lib/generated/azure_mgmt_graph/models/user_update_parameters.rb +15 -1
  41. data/lib/generated/azure_mgmt_graph/module_definition.rb +1 -1
  42. data/lib/generated/azure_mgmt_graph/objects.rb +19 -21
  43. data/lib/generated/azure_mgmt_graph/service_principals.rb +47 -49
  44. data/lib/generated/azure_mgmt_graph/users.rb +39 -41
  45. data/lib/generated/azure_mgmt_graph/version.rb +2 -2
  46. metadata +7 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f3855cb55540e6715e1a2ebafa3c1edcf139e2d6
4
- data.tar.gz: 8fa459060dd7a6319db0b59a846063e0fe95ddae
3
+ metadata.gz: 52ebef34801383b8ccba308d991d2df7f9a0c6b3
4
+ data.tar.gz: cf75e533db359a11c9b2db5f5590515b882add0e
5
5
  SHA512:
6
- metadata.gz: 54aa330f53ceff86a2cfa5df28d6e7271a8c2928cdd478669ff0826b55e39f3b853aae9d5e9b336f182dd8fe8c6c248f45c86bef3c29c0c8a53785e4eaf94a22
7
- data.tar.gz: e4bf0828ff9624a3ad7739dd4b3827b23378af2c1e66cf8d293f3f7e85862d7a756c14eb6fe9adf60fbf7c81b3ea27de54830bdba2e835df32f175586a27f45e
6
+ metadata.gz: 3b59f565360c020c04246e182fd8410c1659a44045cf79c6e5ee187e5c1fa6b0bc90d9ee379c7a81723928d5b4cde27a8c6ff94cf3a37c3d540a5771bc8eac7a
7
+ data.tar.gz: ba8b23885bc6d46bbed130ed6516ac8e646b451f325db485caa4f324f7bb4ba0e404435ce518d10469329a9fee94716f0ab27d41a4822321dd37c680389974a8
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -25,40 +25,43 @@ module Azure::ARM::Graph
25
25
  autoload :Groups, 'generated/azure_mgmt_graph/groups.rb'
26
26
  autoload :ServicePrincipals, 'generated/azure_mgmt_graph/service_principals.rb'
27
27
  autoload :Users, 'generated/azure_mgmt_graph/users.rb'
28
+ autoload :Domains, 'generated/azure_mgmt_graph/domains.rb'
28
29
  autoload :GraphRbacManagementClient, 'generated/azure_mgmt_graph/graph_rbac_management_client.rb'
29
30
 
30
31
  module Models
31
- autoload :GroupListResult, 'generated/azure_mgmt_graph/models/group_list_result.rb'
32
- autoload :GraphError, 'generated/azure_mgmt_graph/models/graph_error.rb'
33
32
  autoload :GroupGetMemberGroupsParameters, 'generated/azure_mgmt_graph/models/group_get_member_groups_parameters.rb'
34
- autoload :PasswordCredential, 'generated/azure_mgmt_graph/models/password_credential.rb'
33
+ autoload :GraphError, 'generated/azure_mgmt_graph/models/graph_error.rb'
35
34
  autoload :GroupGetMemberGroupsResult, 'generated/azure_mgmt_graph/models/group_get_member_groups_result.rb'
36
- autoload :ApplicationUpdateParameters, 'generated/azure_mgmt_graph/models/application_update_parameters.rb'
35
+ autoload :PasswordCredential, 'generated/azure_mgmt_graph/models/password_credential.rb'
37
36
  autoload :CheckGroupMembershipParameters, 'generated/azure_mgmt_graph/models/check_group_membership_parameters.rb'
38
- autoload :ApplicationListResult, 'generated/azure_mgmt_graph/models/application_list_result.rb'
37
+ autoload :ApplicationUpdateParameters, 'generated/azure_mgmt_graph/models/application_update_parameters.rb'
39
38
  autoload :CheckGroupMembershipResult, 'generated/azure_mgmt_graph/models/check_group_membership_result.rb'
40
- autoload :KeyCredentialsUpdateParameters, 'generated/azure_mgmt_graph/models/key_credentials_update_parameters.rb'
39
+ autoload :ApplicationListResult, 'generated/azure_mgmt_graph/models/application_list_result.rb'
41
40
  autoload :ServicePrincipalCreateParameters, 'generated/azure_mgmt_graph/models/service_principal_create_parameters.rb'
42
- autoload :PasswordCredentialsUpdateParameters, 'generated/azure_mgmt_graph/models/password_credentials_update_parameters.rb'
41
+ autoload :KeyCredentialsUpdateParameters, 'generated/azure_mgmt_graph/models/key_credentials_update_parameters.rb'
43
42
  autoload :ServicePrincipal, 'generated/azure_mgmt_graph/models/service_principal.rb'
44
- autoload :GetObjectsResult, 'generated/azure_mgmt_graph/models/get_objects_result.rb'
43
+ autoload :PasswordCredentialsUpdateParameters, 'generated/azure_mgmt_graph/models/password_credentials_update_parameters.rb'
45
44
  autoload :ServicePrincipalListResult, 'generated/azure_mgmt_graph/models/service_principal_list_result.rb'
46
- autoload :GroupCreateParameters, 'generated/azure_mgmt_graph/models/group_create_parameters.rb'
45
+ autoload :GetObjectsResult, 'generated/azure_mgmt_graph/models/get_objects_result.rb'
47
46
  autoload :PasswordProfile, 'generated/azure_mgmt_graph/models/password_profile.rb'
48
- autoload :KeyCredential, 'generated/azure_mgmt_graph/models/key_credential.rb'
47
+ autoload :GroupCreateParameters, 'generated/azure_mgmt_graph/models/group_create_parameters.rb'
49
48
  autoload :UserCreateParameters, 'generated/azure_mgmt_graph/models/user_create_parameters.rb'
50
- autoload :Application, 'generated/azure_mgmt_graph/models/application.rb'
49
+ autoload :GroupListResult, 'generated/azure_mgmt_graph/models/group_list_result.rb'
51
50
  autoload :UserUpdateParameters, 'generated/azure_mgmt_graph/models/user_update_parameters.rb'
52
- autoload :PasswordCredentialListResult, 'generated/azure_mgmt_graph/models/password_credential_list_result.rb'
51
+ autoload :ApplicationCreateParameters, 'generated/azure_mgmt_graph/models/application_create_parameters.rb'
53
52
  autoload :User, 'generated/azure_mgmt_graph/models/user.rb'
54
- autoload :GroupAddMemberParameters, 'generated/azure_mgmt_graph/models/group_add_member_parameters.rb'
53
+ autoload :KeyCredentialListResult, 'generated/azure_mgmt_graph/models/key_credential_list_result.rb'
55
54
  autoload :UserGetMemberGroupsParameters, 'generated/azure_mgmt_graph/models/user_get_member_groups_parameters.rb'
56
- autoload :ApplicationCreateParameters, 'generated/azure_mgmt_graph/models/application_create_parameters.rb'
57
- autoload :UserGetMemberGroupsResult, 'generated/azure_mgmt_graph/models/user_get_member_groups_result.rb'
58
55
  autoload :AADObject, 'generated/azure_mgmt_graph/models/aadobject.rb'
56
+ autoload :UserGetMemberGroupsResult, 'generated/azure_mgmt_graph/models/user_get_member_groups_result.rb'
57
+ autoload :ADGroup, 'generated/azure_mgmt_graph/models/adgroup.rb'
59
58
  autoload :UserListResult, 'generated/azure_mgmt_graph/models/user_list_result.rb'
60
- autoload :KeyCredentialListResult, 'generated/azure_mgmt_graph/models/key_credential_list_result.rb'
59
+ autoload :Application, 'generated/azure_mgmt_graph/models/application.rb'
61
60
  autoload :GetObjectsParameters, 'generated/azure_mgmt_graph/models/get_objects_parameters.rb'
62
- autoload :ADGroup, 'generated/azure_mgmt_graph/models/adgroup.rb'
61
+ autoload :GroupAddMemberParameters, 'generated/azure_mgmt_graph/models/group_add_member_parameters.rb'
62
+ autoload :Domain, 'generated/azure_mgmt_graph/models/domain.rb'
63
+ autoload :PasswordCredentialListResult, 'generated/azure_mgmt_graph/models/password_credential_list_result.rb'
64
+ autoload :DomainListResult, 'generated/azure_mgmt_graph/models/domain_list_result.rb'
65
+ autoload :KeyCredential, 'generated/azure_mgmt_graph/models/key_credential.rb'
63
66
  end
64
67
  end
@@ -1,15 +1,13 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::Graph
7
7
  #
8
- # Composite Swagger specification for Azure Active Directory Graph RBAC
9
- # management client.
8
+ # The Graph RBAC Management Client
10
9
  #
11
10
  class Applications
12
- include Azure::ARM::Graph::Models
13
11
  include MsRestAzure
14
12
 
15
13
  #
@@ -64,7 +62,7 @@ module Azure::ARM::Graph
64
62
  #
65
63
  def create_async(parameters, custom_headers = nil)
66
64
  fail ArgumentError, 'parameters is nil' if parameters.nil?
67
- api_version = '1.6'
65
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
68
66
  fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil?
69
67
 
70
68
 
@@ -77,18 +75,18 @@ module Azure::ARM::Graph
77
75
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
78
76
 
79
77
  # Serialize Request
80
- request_mapper = ApplicationCreateParameters.mapper()
81
- request_content = @client.serialize(request_mapper, parameters, 'parameters')
78
+ request_mapper = Azure::ARM::Graph::Models::ApplicationCreateParameters.mapper()
79
+ request_content = @client.serialize(request_mapper, parameters)
82
80
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
83
81
 
84
- path_template = '/{tenantID}/applications'
82
+ path_template = '{tenantID}/applications'
85
83
 
86
84
  request_url = @base_url || @client.base_url
87
85
 
88
86
  options = {
89
87
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
90
88
  path_params: {'tenantID' => @client.tenant_id},
91
- query_params: {'api-version' => api_version},
89
+ query_params: {'api-version' => @client.api_version},
92
90
  body: request_content,
93
91
  headers: request_headers.merge(custom_headers || {}),
94
92
  base_url: request_url
@@ -109,8 +107,8 @@ module Azure::ARM::Graph
109
107
  if status_code == 201
110
108
  begin
111
109
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
112
- result_mapper = Application.mapper()
113
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
110
+ result_mapper = Azure::ARM::Graph::Models::Application.mapper()
111
+ result.body = @client.deserialize(result_mapper, parsed_response)
114
112
  rescue Exception => e
115
113
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
116
114
  end
@@ -159,7 +157,7 @@ module Azure::ARM::Graph
159
157
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
160
158
  #
161
159
  def list_async(filter = nil, custom_headers = nil)
162
- api_version = '1.6'
160
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
163
161
  fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil?
164
162
 
165
163
 
@@ -168,14 +166,14 @@ module Azure::ARM::Graph
168
166
  # Set Headers
169
167
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
170
168
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
171
- path_template = '/{tenantID}/applications'
169
+ path_template = '{tenantID}/applications'
172
170
 
173
171
  request_url = @base_url || @client.base_url
174
172
 
175
173
  options = {
176
174
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
177
175
  path_params: {'tenantID' => @client.tenant_id},
178
- query_params: {'$filter' => filter,'api-version' => api_version},
176
+ query_params: {'$filter' => filter,'api-version' => @client.api_version},
179
177
  headers: request_headers.merge(custom_headers || {}),
180
178
  base_url: request_url
181
179
  }
@@ -195,8 +193,8 @@ module Azure::ARM::Graph
195
193
  if status_code == 200
196
194
  begin
197
195
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
198
- result_mapper = ApplicationListResult.mapper()
199
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
196
+ result_mapper = Azure::ARM::Graph::Models::ApplicationListResult.mapper()
197
+ result.body = @client.deserialize(result_mapper, parsed_response)
200
198
  rescue Exception => e
201
199
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
202
200
  end
@@ -245,7 +243,7 @@ module Azure::ARM::Graph
245
243
  #
246
244
  def delete_async(application_object_id, custom_headers = nil)
247
245
  fail ArgumentError, 'application_object_id is nil' if application_object_id.nil?
248
- api_version = '1.6'
246
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
249
247
  fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil?
250
248
 
251
249
 
@@ -254,7 +252,7 @@ module Azure::ARM::Graph
254
252
  # Set Headers
255
253
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
256
254
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
257
- path_template = '/{tenantID}/applications/{applicationObjectId}'
255
+ path_template = '{tenantID}/applications/{applicationObjectId}'
258
256
 
259
257
  request_url = @base_url || @client.base_url
260
258
 
@@ -262,7 +260,7 @@ module Azure::ARM::Graph
262
260
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
263
261
  path_params: {'tenantID' => @client.tenant_id},
264
262
  skip_encoding_path_params: {'applicationObjectId' => application_object_id},
265
- query_params: {'api-version' => api_version},
263
+ query_params: {'api-version' => @client.api_version},
266
264
  headers: request_headers.merge(custom_headers || {}),
267
265
  base_url: request_url
268
266
  }
@@ -323,7 +321,7 @@ module Azure::ARM::Graph
323
321
  #
324
322
  def get_async(application_object_id, custom_headers = nil)
325
323
  fail ArgumentError, 'application_object_id is nil' if application_object_id.nil?
326
- api_version = '1.6'
324
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
327
325
  fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil?
328
326
 
329
327
 
@@ -332,7 +330,7 @@ module Azure::ARM::Graph
332
330
  # Set Headers
333
331
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
334
332
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
335
- path_template = '/{tenantID}/applications/{applicationObjectId}'
333
+ path_template = '{tenantID}/applications/{applicationObjectId}'
336
334
 
337
335
  request_url = @base_url || @client.base_url
338
336
 
@@ -340,7 +338,7 @@ module Azure::ARM::Graph
340
338
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
341
339
  path_params: {'tenantID' => @client.tenant_id},
342
340
  skip_encoding_path_params: {'applicationObjectId' => application_object_id},
343
- query_params: {'api-version' => api_version},
341
+ query_params: {'api-version' => @client.api_version},
344
342
  headers: request_headers.merge(custom_headers || {}),
345
343
  base_url: request_url
346
344
  }
@@ -360,8 +358,8 @@ module Azure::ARM::Graph
360
358
  if status_code == 200
361
359
  begin
362
360
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
363
- result_mapper = Application.mapper()
364
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
361
+ result_mapper = Azure::ARM::Graph::Models::Application.mapper()
362
+ result.body = @client.deserialize(result_mapper, parsed_response)
365
363
  rescue Exception => e
366
364
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
367
365
  end
@@ -417,7 +415,7 @@ module Azure::ARM::Graph
417
415
  def patch_async(application_object_id, parameters, custom_headers = nil)
418
416
  fail ArgumentError, 'application_object_id is nil' if application_object_id.nil?
419
417
  fail ArgumentError, 'parameters is nil' if parameters.nil?
420
- api_version = '1.6'
418
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
421
419
  fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil?
422
420
 
423
421
 
@@ -430,11 +428,11 @@ module Azure::ARM::Graph
430
428
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
431
429
 
432
430
  # Serialize Request
433
- request_mapper = ApplicationUpdateParameters.mapper()
434
- request_content = @client.serialize(request_mapper, parameters, 'parameters')
431
+ request_mapper = Azure::ARM::Graph::Models::ApplicationUpdateParameters.mapper()
432
+ request_content = @client.serialize(request_mapper, parameters)
435
433
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
436
434
 
437
- path_template = '/{tenantID}/applications/{applicationObjectId}'
435
+ path_template = '{tenantID}/applications/{applicationObjectId}'
438
436
 
439
437
  request_url = @base_url || @client.base_url
440
438
 
@@ -442,7 +440,7 @@ module Azure::ARM::Graph
442
440
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
443
441
  path_params: {'tenantID' => @client.tenant_id},
444
442
  skip_encoding_path_params: {'applicationObjectId' => application_object_id},
445
- query_params: {'api-version' => api_version},
443
+ query_params: {'api-version' => @client.api_version},
446
444
  body: request_content,
447
445
  headers: request_headers.merge(custom_headers || {}),
448
446
  base_url: request_url
@@ -504,7 +502,7 @@ module Azure::ARM::Graph
504
502
  #
505
503
  def list_key_credentials_async(application_object_id, custom_headers = nil)
506
504
  fail ArgumentError, 'application_object_id is nil' if application_object_id.nil?
507
- api_version = '1.6'
505
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
508
506
  fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil?
509
507
 
510
508
 
@@ -513,7 +511,7 @@ module Azure::ARM::Graph
513
511
  # Set Headers
514
512
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
515
513
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
516
- path_template = '/{tenantID}/applications/{applicationObjectId}/keyCredentials'
514
+ path_template = '{tenantID}/applications/{applicationObjectId}/keyCredentials'
517
515
 
518
516
  request_url = @base_url || @client.base_url
519
517
 
@@ -521,7 +519,7 @@ module Azure::ARM::Graph
521
519
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
522
520
  path_params: {'tenantID' => @client.tenant_id},
523
521
  skip_encoding_path_params: {'applicationObjectId' => application_object_id},
524
- query_params: {'api-version' => api_version},
522
+ query_params: {'api-version' => @client.api_version},
525
523
  headers: request_headers.merge(custom_headers || {}),
526
524
  base_url: request_url
527
525
  }
@@ -541,8 +539,8 @@ module Azure::ARM::Graph
541
539
  if status_code == 200
542
540
  begin
543
541
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
544
- result_mapper = KeyCredentialListResult.mapper()
545
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
542
+ result_mapper = Azure::ARM::Graph::Models::KeyCredentialListResult.mapper()
543
+ result.body = @client.deserialize(result_mapper, parsed_response)
546
544
  rescue Exception => e
547
545
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
548
546
  end
@@ -598,7 +596,7 @@ module Azure::ARM::Graph
598
596
  def update_key_credentials_async(application_object_id, parameters, custom_headers = nil)
599
597
  fail ArgumentError, 'application_object_id is nil' if application_object_id.nil?
600
598
  fail ArgumentError, 'parameters is nil' if parameters.nil?
601
- api_version = '1.6'
599
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
602
600
  fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil?
603
601
 
604
602
 
@@ -611,11 +609,11 @@ module Azure::ARM::Graph
611
609
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
612
610
 
613
611
  # Serialize Request
614
- request_mapper = KeyCredentialsUpdateParameters.mapper()
615
- request_content = @client.serialize(request_mapper, parameters, 'parameters')
612
+ request_mapper = Azure::ARM::Graph::Models::KeyCredentialsUpdateParameters.mapper()
613
+ request_content = @client.serialize(request_mapper, parameters)
616
614
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
617
615
 
618
- path_template = '/{tenantID}/applications/{applicationObjectId}/keyCredentials'
616
+ path_template = '{tenantID}/applications/{applicationObjectId}/keyCredentials'
619
617
 
620
618
  request_url = @base_url || @client.base_url
621
619
 
@@ -623,7 +621,7 @@ module Azure::ARM::Graph
623
621
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
624
622
  path_params: {'tenantID' => @client.tenant_id},
625
623
  skip_encoding_path_params: {'applicationObjectId' => application_object_id},
626
- query_params: {'api-version' => api_version},
624
+ query_params: {'api-version' => @client.api_version},
627
625
  body: request_content,
628
626
  headers: request_headers.merge(custom_headers || {}),
629
627
  base_url: request_url
@@ -685,7 +683,7 @@ module Azure::ARM::Graph
685
683
  #
686
684
  def list_password_credentials_async(application_object_id, custom_headers = nil)
687
685
  fail ArgumentError, 'application_object_id is nil' if application_object_id.nil?
688
- api_version = '1.6'
686
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
689
687
  fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil?
690
688
 
691
689
 
@@ -694,7 +692,7 @@ module Azure::ARM::Graph
694
692
  # Set Headers
695
693
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
696
694
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
697
- path_template = '/{tenantID}/applications/{applicationObjectId}/passwordCredentials'
695
+ path_template = '{tenantID}/applications/{applicationObjectId}/passwordCredentials'
698
696
 
699
697
  request_url = @base_url || @client.base_url
700
698
 
@@ -702,7 +700,7 @@ module Azure::ARM::Graph
702
700
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
703
701
  path_params: {'tenantID' => @client.tenant_id},
704
702
  skip_encoding_path_params: {'applicationObjectId' => application_object_id},
705
- query_params: {'api-version' => api_version},
703
+ query_params: {'api-version' => @client.api_version},
706
704
  headers: request_headers.merge(custom_headers || {}),
707
705
  base_url: request_url
708
706
  }
@@ -722,8 +720,8 @@ module Azure::ARM::Graph
722
720
  if status_code == 200
723
721
  begin
724
722
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
725
- result_mapper = PasswordCredentialListResult.mapper()
726
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
723
+ result_mapper = Azure::ARM::Graph::Models::PasswordCredentialListResult.mapper()
724
+ result.body = @client.deserialize(result_mapper, parsed_response)
727
725
  rescue Exception => e
728
726
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
729
727
  end
@@ -779,7 +777,7 @@ module Azure::ARM::Graph
779
777
  def update_password_credentials_async(application_object_id, parameters, custom_headers = nil)
780
778
  fail ArgumentError, 'application_object_id is nil' if application_object_id.nil?
781
779
  fail ArgumentError, 'parameters is nil' if parameters.nil?
782
- api_version = '1.6'
780
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
783
781
  fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil?
784
782
 
785
783
 
@@ -792,11 +790,11 @@ module Azure::ARM::Graph
792
790
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
793
791
 
794
792
  # Serialize Request
795
- request_mapper = PasswordCredentialsUpdateParameters.mapper()
796
- request_content = @client.serialize(request_mapper, parameters, 'parameters')
793
+ request_mapper = Azure::ARM::Graph::Models::PasswordCredentialsUpdateParameters.mapper()
794
+ request_content = @client.serialize(request_mapper, parameters)
797
795
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
798
796
 
799
- path_template = '/{tenantID}/applications/{applicationObjectId}/passwordCredentials'
797
+ path_template = '{tenantID}/applications/{applicationObjectId}/passwordCredentials'
800
798
 
801
799
  request_url = @base_url || @client.base_url
802
800
 
@@ -804,7 +802,7 @@ module Azure::ARM::Graph
804
802
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
805
803
  path_params: {'tenantID' => @client.tenant_id},
806
804
  skip_encoding_path_params: {'applicationObjectId' => application_object_id},
807
- query_params: {'api-version' => api_version},
805
+ query_params: {'api-version' => @client.api_version},
808
806
  body: request_content,
809
807
  headers: request_headers.merge(custom_headers || {}),
810
808
  base_url: request_url
@@ -866,7 +864,7 @@ module Azure::ARM::Graph
866
864
  #
867
865
  def list_next_async(next_link, custom_headers = nil)
868
866
  fail ArgumentError, 'next_link is nil' if next_link.nil?
869
- api_version = '1.6'
867
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
870
868
  fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil?
871
869
 
872
870
 
@@ -875,7 +873,7 @@ module Azure::ARM::Graph
875
873
  # Set Headers
876
874
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
877
875
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
878
- path_template = '/{tenantID}/{nextLink}'
876
+ path_template = '{tenantID}/{nextLink}'
879
877
 
880
878
  request_url = @base_url || @client.base_url
881
879
 
@@ -883,7 +881,7 @@ module Azure::ARM::Graph
883
881
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
884
882
  path_params: {'tenantID' => @client.tenant_id},
885
883
  skip_encoding_path_params: {'nextLink' => next_link},
886
- query_params: {'api-version' => api_version},
884
+ query_params: {'api-version' => @client.api_version},
887
885
  headers: request_headers.merge(custom_headers || {}),
888
886
  base_url: request_url
889
887
  }
@@ -903,8 +901,8 @@ module Azure::ARM::Graph
903
901
  if status_code == 200
904
902
  begin
905
903
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
906
- result_mapper = ApplicationListResult.mapper()
907
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
904
+ result_mapper = Azure::ARM::Graph::Models::ApplicationListResult.mapper()
905
+ result.body = @client.deserialize(result_mapper, parsed_response)
908
906
  rescue Exception => e
909
907
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
910
908
  end
@@ -0,0 +1,198 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Graph
7
+ #
8
+ # The Graph RBAC Management Client
9
+ #
10
+ class Domains
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Domains class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [GraphRbacManagementClient] reference to the GraphRbacManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Gets a list of domains for the current tenant.
26
+ #
27
+ # @param filter [String] The filter to apply to the operation.
28
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
29
+ # will be added to the HTTP request.
30
+ #
31
+ # @return [DomainListResult] operation results.
32
+ #
33
+ def list(filter = nil, custom_headers = nil)
34
+ response = list_async(filter, custom_headers).value!
35
+ response.body unless response.nil?
36
+ end
37
+
38
+ #
39
+ # Gets a list of domains for the current tenant.
40
+ #
41
+ # @param filter [String] The filter to apply to the operation.
42
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
43
+ # will be added to the HTTP request.
44
+ #
45
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
46
+ #
47
+ def list_with_http_info(filter = nil, custom_headers = nil)
48
+ list_async(filter, custom_headers).value!
49
+ end
50
+
51
+ #
52
+ # Gets a list of domains for the current tenant.
53
+ #
54
+ # @param filter [String] The filter to apply to the operation.
55
+ # @param [Hash{String => String}] A hash of custom headers that will be added
56
+ # to the HTTP request.
57
+ #
58
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
59
+ #
60
+ def list_async(filter = nil, custom_headers = nil)
61
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
62
+ fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil?
63
+
64
+
65
+ request_headers = {}
66
+
67
+ # Set Headers
68
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
69
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
70
+ path_template = '{tenantID}/domains'
71
+
72
+ request_url = @base_url || @client.base_url
73
+
74
+ options = {
75
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
76
+ path_params: {'tenantID' => @client.tenant_id},
77
+ query_params: {'$filter' => filter,'api-version' => @client.api_version},
78
+ headers: request_headers.merge(custom_headers || {}),
79
+ base_url: request_url
80
+ }
81
+ promise = @client.make_request_async(:get, path_template, options)
82
+
83
+ promise = promise.then do |result|
84
+ http_response = result.response
85
+ status_code = http_response.status
86
+ response_content = http_response.body
87
+ unless status_code == 200
88
+ error_model = JSON.load(response_content)
89
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
90
+ end
91
+
92
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-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::ARM::Graph::Models::DomainListResult.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
+ # Gets a specific domain in the current tenant.
112
+ #
113
+ # @param domain_name [String] name of the domain.
114
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
115
+ # will be added to the HTTP request.
116
+ #
117
+ # @return [Domain] operation results.
118
+ #
119
+ def get(domain_name, custom_headers = nil)
120
+ response = get_async(domain_name, custom_headers).value!
121
+ response.body unless response.nil?
122
+ end
123
+
124
+ #
125
+ # Gets a specific domain in the current tenant.
126
+ #
127
+ # @param domain_name [String] name of the domain.
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 get_with_http_info(domain_name, custom_headers = nil)
134
+ get_async(domain_name, custom_headers).value!
135
+ end
136
+
137
+ #
138
+ # Gets a specific domain in the current tenant.
139
+ #
140
+ # @param domain_name [String] name of the domain.
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 get_async(domain_name, custom_headers = nil)
147
+ fail ArgumentError, 'domain_name is nil' if domain_name.nil?
148
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
149
+ fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil?
150
+
151
+
152
+ request_headers = {}
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 = '{tenantID}/domains/{domainName}'
158
+
159
+ request_url = @base_url || @client.base_url
160
+
161
+ options = {
162
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
163
+ path_params: {'domainName' => domain_name,'tenantID' => @client.tenant_id},
164
+ query_params: {'api-version' => @client.api_version},
165
+ headers: request_headers.merge(custom_headers || {}),
166
+ base_url: request_url
167
+ }
168
+ promise = @client.make_request_async(:get, path_template, options)
169
+
170
+ promise = promise.then do |result|
171
+ http_response = result.response
172
+ status_code = http_response.status
173
+ response_content = http_response.body
174
+ unless status_code == 200
175
+ error_model = JSON.load(response_content)
176
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
177
+ end
178
+
179
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
180
+ # Deserialize Response
181
+ if status_code == 200
182
+ begin
183
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
184
+ result_mapper = Azure::ARM::Graph::Models::Domain.mapper()
185
+ result.body = @client.deserialize(result_mapper, parsed_response)
186
+ rescue Exception => e
187
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
188
+ end
189
+ end
190
+
191
+ result
192
+ end
193
+
194
+ promise.execute
195
+ end
196
+
197
+ end
198
+ end