azure_mgmt_resources_management 0.15.1 → 0.17.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/management_groups.rb +21 -18
  3. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/management_groups_api.rb +10 -8
  4. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/error_details.rb +4 -0
  5. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/error_response.rb +2 -0
  6. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group.rb +7 -0
  7. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group_child_info.rb +5 -0
  8. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group_details_properties.rb +6 -0
  9. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group_info.rb +6 -0
  10. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group_list_result.rb +5 -1
  11. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group_recursive_child_info.rb +7 -0
  12. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group_with_children.rb +9 -0
  13. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group_with_hierarchy.rb +9 -0
  14. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/operation.rb +3 -0
  15. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/operation_display.rb +4 -0
  16. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/operation_list_result.rb +5 -1
  17. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/parent_group_info.rb +3 -0
  18. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/operations.rb +15 -13
  19. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management.rb +42 -0
  20. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/management_group_subscriptions.rb +209 -0
  21. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/management_groups.rb +698 -0
  22. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/management_groups_api.rb +137 -0
  23. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_request.rb +59 -0
  24. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/error_details.rb +57 -0
  25. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/error_response.rb +47 -0
  26. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group.rb +130 -0
  27. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group_child_info.rb +91 -0
  28. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group_details.rb +81 -0
  29. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group_info.rb +98 -0
  30. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group_list_result.rb +99 -0
  31. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/operation.rb +59 -0
  32. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/operation_display.rb +83 -0
  33. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/operation_list_result.rb +103 -0
  34. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/parent_group_info.rb +59 -0
  35. data/lib/{2017-08-31-preview/generated/azure_mgmt_resources_management/version.rb → 2017-11-01-preview/generated/azure_mgmt_resources_management/module_definition.rb} +4 -3
  36. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/operations.rb +219 -0
  37. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management.rb +56 -0
  38. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/entities.rb +257 -0
  39. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/management_group_subscriptions.rb +209 -0
  40. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/management_groups.rb +793 -0
  41. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/management_groups_api.rb +254 -0
  42. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/check_name_availability_request.rb +60 -0
  43. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/check_name_availability_result.rb +83 -0
  44. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_child_info.rb +131 -0
  45. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_details.rb +84 -0
  46. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_request.rb +153 -0
  47. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/create_parent_group_info.rb +72 -0
  48. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/entity_hierarchy_item.rb +118 -0
  49. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/entity_info.rb +121 -0
  50. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/entity_list_result.rb +99 -0
  51. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/entity_parent_group_info.rb +48 -0
  52. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/error_details.rb +69 -0
  53. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/error_response.rb +47 -0
  54. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group.rb +150 -0
  55. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group_child_info.rb +125 -0
  56. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group_details.rb +81 -0
  57. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group_info.rb +98 -0
  58. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group_list_result.rb +99 -0
  59. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/operation.rb +59 -0
  60. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/operation_display_properties.rb +83 -0
  61. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/operation_list_result.rb +103 -0
  62. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/operation_results.rb +86 -0
  63. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/parent_group_info.rb +70 -0
  64. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/patch_management_group_request.rb +59 -0
  65. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/reason.rb +16 -0
  66. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/type.rb +15 -0
  67. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/module_definition.rb +9 -0
  68. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/operations.rb +219 -0
  69. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management.rb +58 -0
  70. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/entities.rb +381 -0
  71. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/management_group_subscriptions.rb +202 -0
  72. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/management_groups.rb +799 -0
  73. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/management_groups_api.rb +401 -0
  74. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/check_name_availability_request.rb +60 -0
  75. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/check_name_availability_result.rb +83 -0
  76. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_child_info.rb +131 -0
  77. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_details.rb +84 -0
  78. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_request.rb +153 -0
  79. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/create_parent_group_info.rb +72 -0
  80. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/entity_hierarchy_item.rb +118 -0
  81. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/entity_info.rb +210 -0
  82. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/entity_list_result.rb +111 -0
  83. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/entity_parent_group_info.rb +48 -0
  84. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/error_details.rb +69 -0
  85. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/error_response.rb +47 -0
  86. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/management_group.rb +150 -0
  87. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/management_group_child_info.rb +125 -0
  88. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/management_group_details.rb +81 -0
  89. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/management_group_info.rb +98 -0
  90. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/management_group_list_result.rb +99 -0
  91. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/operation.rb +59 -0
  92. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/operation_display_properties.rb +83 -0
  93. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/operation_list_result.rb +103 -0
  94. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/operation_results.rb +86 -0
  95. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/parent_group_info.rb +70 -0
  96. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/patch_management_group_request.rb +59 -0
  97. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/reason.rb +16 -0
  98. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/status.rb +20 -0
  99. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/tenant_backfill_status_result.rb +63 -0
  100. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/type.rb +15 -0
  101. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/module_definition.rb +9 -0
  102. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/operations.rb +218 -0
  103. data/lib/azure_mgmt_resources_management.rb +3 -0
  104. data/lib/profiles/latest/modules/resourcesmanagement_profile_module.rb +144 -69
  105. data/lib/profiles/latest/resourcesmanagement_latest_profile_client.rb +28 -11
  106. data/lib/profiles/latest/resourcesmanagement_module_definition.rb +0 -1
  107. data/lib/version.rb +1 -1
  108. metadata +95 -9
  109. data/lib/profiles/common/configurable.rb +0 -86
  110. data/lib/profiles/common/default.rb +0 -57
@@ -0,0 +1,254 @@
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::ResourcesManagement::Mgmt::V2018_01_01_preview
7
+ #
8
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class ManagementGroupsAPI < MsRestAzure::AzureServiceClient
11
+ include MsRestAzure
12
+ include MsRestAzure::Serialization
13
+
14
+ # @return [String] the base URI of the service.
15
+ attr_accessor :base_url
16
+
17
+ # @return Credentials needed for the client to connect to Azure.
18
+ attr_reader :credentials
19
+
20
+ # @return [String] Version of the API to be used with the client request.
21
+ # The current version is 2018-01-01-preview.
22
+ attr_reader :api_version
23
+
24
+ # @return [CreateManagementGroupRequest] Management group creation
25
+ # parameters.
26
+ attr_accessor :create_management_group_request
27
+
28
+ # @return [PatchManagementGroupRequest] Management group patch parameters.
29
+ attr_accessor :patch_group_request
30
+
31
+ # @return [Enum] The id of the operation result. Possible values include:
32
+ # 'create', 'delete'
33
+ attr_accessor :operation_result_id
34
+
35
+ # @return [CheckNameAvailabilityRequest] Management group name availability
36
+ # check parameters.
37
+ attr_accessor :check_name_availability_request
38
+
39
+ # @return [String] Page continuation token is only used if a previous
40
+ # operation returned a partial result.
41
+ # If a previous response contains a nextLink element, the value of the
42
+ # nextLink element will include a token parameter that specifies a starting
43
+ # point to use for subsequent calls.
44
+ #
45
+ attr_accessor :skiptoken
46
+
47
+ # @return [String] The preferred language for the response.
48
+ attr_accessor :accept_language
49
+
50
+ # @return [Integer] The retry timeout in seconds for Long Running
51
+ # Operations. Default value is 30.
52
+ attr_accessor :long_running_operation_retry_timeout
53
+
54
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
55
+ # generated. When set to true a unique x-ms-client-request-id value is
56
+ # generated and included in each request. Default is true.
57
+ attr_accessor :generate_client_request_id
58
+
59
+ # @return [ManagementGroups] management_groups
60
+ attr_reader :management_groups
61
+
62
+ # @return [ManagementGroupSubscriptions] management_group_subscriptions
63
+ attr_reader :management_group_subscriptions
64
+
65
+ # @return [Operations] operations
66
+ attr_reader :operations
67
+
68
+ # @return [Entities] entities
69
+ attr_reader :entities
70
+
71
+ #
72
+ # Creates initializes a new instance of the ManagementGroupsAPI class.
73
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
74
+ # @param base_url [String] the base URI of the service.
75
+ # @param options [Array] filters to be applied to the HTTP requests.
76
+ #
77
+ def initialize(credentials = nil, base_url = nil, options = nil)
78
+ super(credentials, options)
79
+ @base_url = base_url || 'https://management.azure.com'
80
+
81
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
82
+ @credentials = credentials
83
+
84
+ @management_groups = ManagementGroups.new(self)
85
+ @management_group_subscriptions = ManagementGroupSubscriptions.new(self)
86
+ @operations = Operations.new(self)
87
+ @entities = Entities.new(self)
88
+ @api_version = '2018-01-01-preview'
89
+ @accept_language = 'en-US'
90
+ @long_running_operation_retry_timeout = 30
91
+ @generate_client_request_id = true
92
+ add_telemetry
93
+ end
94
+
95
+ #
96
+ # Makes a request and returns the body of the response.
97
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
98
+ # @param path [String] the path, relative to {base_url}.
99
+ # @param options [Hash{String=>String}] specifying any request options like :body.
100
+ # @return [Hash{String=>String}] containing the body of the response.
101
+ # Example:
102
+ #
103
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
104
+ # path = "/path"
105
+ # options = {
106
+ # body: request_content,
107
+ # query_params: {'api-version' => '2016-02-01'}
108
+ # }
109
+ # result = @client.make_request(:put, path, options)
110
+ #
111
+ def make_request(method, path, options = {})
112
+ result = make_request_with_http_info(method, path, options)
113
+ result.body unless result.nil?
114
+ end
115
+
116
+ #
117
+ # Makes a request and returns the operation response.
118
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
119
+ # @param path [String] the path, relative to {base_url}.
120
+ # @param options [Hash{String=>String}] specifying any request options like :body.
121
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
122
+ #
123
+ def make_request_with_http_info(method, path, options = {})
124
+ result = make_request_async(method, path, options).value!
125
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
126
+ result
127
+ end
128
+
129
+ #
130
+ # Makes a request asynchronously.
131
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
132
+ # @param path [String] the path, relative to {base_url}.
133
+ # @param options [Hash{String=>String}] specifying any request options like :body.
134
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
135
+ #
136
+ def make_request_async(method, path, options = {})
137
+ fail ArgumentError, 'method is nil' if method.nil?
138
+ fail ArgumentError, 'path is nil' if path.nil?
139
+
140
+ request_url = options[:base_url] || @base_url
141
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
142
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
143
+ end
144
+
145
+ request_headers = @request_headers
146
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
147
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
148
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
149
+
150
+ super(request_url, method, path, options)
151
+ end
152
+
153
+ #
154
+ # Checks if the specified management group name is valid and unique
155
+ #
156
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
157
+ # will be added to the HTTP request.
158
+ #
159
+ # @return [CheckNameAvailabilityResult] operation results.
160
+ #
161
+ def check_name_availability(custom_headers:nil)
162
+ response = check_name_availability_async(custom_headers:custom_headers).value!
163
+ response.body unless response.nil?
164
+ end
165
+
166
+ #
167
+ # Checks if the specified management group name is valid and unique
168
+ #
169
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
170
+ # will be added to the HTTP request.
171
+ #
172
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
173
+ #
174
+ def check_name_availability_with_http_info(custom_headers:nil)
175
+ check_name_availability_async(custom_headers:custom_headers).value!
176
+ end
177
+
178
+ #
179
+ # Checks if the specified management group name is valid and unique
180
+ #
181
+ # @param [Hash{String => String}] A hash of custom headers that will be added
182
+ # to the HTTP request.
183
+ #
184
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
185
+ #
186
+ def check_name_availability_async(custom_headers:nil)
187
+ fail ArgumentError, 'api_version is nil' if api_version.nil?
188
+ fail ArgumentError, 'check_name_availability_request is nil' if check_name_availability_request.nil?
189
+
190
+
191
+ request_headers = {}
192
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
193
+
194
+ # Set Headers
195
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
196
+ request_headers['accept-language'] = accept_language unless accept_language.nil?
197
+
198
+ # Serialize Request
199
+ request_mapper = Azure::ResourcesManagement::Mgmt::V2018_01_01_preview::Models::CheckNameAvailabilityRequest.mapper()
200
+ request_content = self.serialize(request_mapper, check_name_availability_request)
201
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
202
+
203
+ path_template = 'providers/Microsoft.Management/checkNameAvailability'
204
+
205
+ request_url = @base_url || self.base_url
206
+
207
+ options = {
208
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
209
+ query_params: {'api-version' => api_version},
210
+ body: request_content,
211
+ headers: request_headers.merge(custom_headers || {}),
212
+ base_url: request_url
213
+ }
214
+ promise = self.make_request_async(:post, path_template, options)
215
+
216
+ promise = promise.then do |result|
217
+ http_response = result.response
218
+ status_code = http_response.status
219
+ response_content = http_response.body
220
+ unless status_code == 200
221
+ error_model = JSON.load(response_content)
222
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
223
+ end
224
+
225
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
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 = Azure::ResourcesManagement::Mgmt::V2018_01_01_preview::Models::CheckNameAvailabilityResult.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
+ private
245
+ #
246
+ # Adds telemetry information.
247
+ #
248
+ def add_telemetry
249
+ sdk_information = 'azure_mgmt_resources_management'
250
+ sdk_information = "#{sdk_information}/0.17.2"
251
+ add_user_agent_information(sdk_information)
252
+ end
253
+ end
254
+ end
@@ -0,0 +1,60 @@
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::ResourcesManagement::Mgmt::V2018_01_01_preview
7
+ module Models
8
+ #
9
+ # Management group name availability check parameters.
10
+ #
11
+ class CheckNameAvailabilityRequest
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] the name to check for availability
16
+ attr_accessor :name
17
+
18
+ # @return [Type] fully qualified resource type which includes provider
19
+ # namespace. Possible values include:
20
+ # '/providers/Microsoft.Management/managementGroups'
21
+ attr_accessor :type
22
+
23
+
24
+ #
25
+ # Mapper for CheckNameAvailabilityRequest class as Ruby Hash.
26
+ # This will be used for serialization/deserialization.
27
+ #
28
+ def self.mapper()
29
+ {
30
+ client_side_validation: true,
31
+ required: false,
32
+ serialized_name: 'CheckNameAvailabilityRequest',
33
+ type: {
34
+ name: 'Composite',
35
+ class_name: 'CheckNameAvailabilityRequest',
36
+ model_properties: {
37
+ name: {
38
+ client_side_validation: true,
39
+ required: false,
40
+ serialized_name: 'name',
41
+ type: {
42
+ name: 'String'
43
+ }
44
+ },
45
+ type: {
46
+ client_side_validation: true,
47
+ required: false,
48
+ serialized_name: 'type',
49
+ type: {
50
+ name: 'Enum',
51
+ module: 'Type'
52
+ }
53
+ }
54
+ }
55
+ }
56
+ }
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,83 @@
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::ResourcesManagement::Mgmt::V2018_01_01_preview
7
+ module Models
8
+ #
9
+ # Describes the result of the request to check management group name
10
+ # availability.
11
+ #
12
+ class CheckNameAvailabilityResult
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [Boolean] Required. True indicates name is valid and available.
17
+ # False indicates the name is invalid, unavailable, or both.
18
+ attr_accessor :name_available
19
+
20
+ # @return [Reason] Required if nameAvailable == false. Invalid indicates
21
+ # the name provided does not match the resource provider's naming
22
+ # requirements (incorrect length, unsupported characters, etc.)
23
+ # AlreadyExists indicates that the name is already in use and is
24
+ # therefore unavailable. Possible values include: 'Invalid',
25
+ # 'AlreadyExists'
26
+ attr_accessor :reason
27
+
28
+ # @return [String] Required if nameAvailable == false. Localized. If
29
+ # reason == invalid, provide the user with the reason why the given name
30
+ # is invalid, and provide the resource naming requirements so that the
31
+ # user can select a valid name. If reason == AlreadyExists, explain that
32
+ # is already in use, and direct them to select a different name.
33
+ attr_accessor :message
34
+
35
+
36
+ #
37
+ # Mapper for CheckNameAvailabilityResult class as Ruby Hash.
38
+ # This will be used for serialization/deserialization.
39
+ #
40
+ def self.mapper()
41
+ {
42
+ client_side_validation: true,
43
+ required: false,
44
+ serialized_name: 'CheckNameAvailabilityResult',
45
+ type: {
46
+ name: 'Composite',
47
+ class_name: 'CheckNameAvailabilityResult',
48
+ model_properties: {
49
+ name_available: {
50
+ client_side_validation: true,
51
+ required: false,
52
+ read_only: true,
53
+ serialized_name: 'nameAvailable',
54
+ type: {
55
+ name: 'Boolean'
56
+ }
57
+ },
58
+ reason: {
59
+ client_side_validation: true,
60
+ required: false,
61
+ read_only: true,
62
+ serialized_name: 'reason',
63
+ type: {
64
+ name: 'Enum',
65
+ module: 'Reason'
66
+ }
67
+ },
68
+ message: {
69
+ client_side_validation: true,
70
+ required: false,
71
+ read_only: true,
72
+ serialized_name: 'message',
73
+ type: {
74
+ name: 'String'
75
+ }
76
+ }
77
+ }
78
+ }
79
+ }
80
+ end
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,131 @@
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::ResourcesManagement::Mgmt::V2018_01_01_preview
7
+ module Models
8
+ #
9
+ # The child information of a management group used during creation.
10
+ #
11
+ class CreateManagementGroupChildInfo
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Enum] The type of child resource. The fully qualified resource
16
+ # type which includes provider namespace (e.g.
17
+ # /providers/Microsoft.Management/managementGroups). Possible values
18
+ # include: '/providers/Microsoft.Management/managementGroups',
19
+ # '/subscriptions'
20
+ attr_accessor :type
21
+
22
+ # @return [String] The fully qualified ID for the child resource
23
+ # (management group or subscription). For example,
24
+ # /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
25
+ attr_accessor :id
26
+
27
+ # @return [String] The name of the child entity.
28
+ attr_accessor :name
29
+
30
+ # @return [String] The friendly name of the child resource.
31
+ attr_accessor :display_name
32
+
33
+ # @return [Array<String>] The roles definitions associated with the
34
+ # management group.
35
+ attr_accessor :roles
36
+
37
+ # @return [Array<CreateManagementGroupChildInfo>] The list of children.
38
+ attr_accessor :children
39
+
40
+
41
+ #
42
+ # Mapper for CreateManagementGroupChildInfo class as Ruby Hash.
43
+ # This will be used for serialization/deserialization.
44
+ #
45
+ def self.mapper()
46
+ {
47
+ client_side_validation: true,
48
+ required: false,
49
+ serialized_name: 'CreateManagementGroupChildInfo',
50
+ type: {
51
+ name: 'Composite',
52
+ class_name: 'CreateManagementGroupChildInfo',
53
+ model_properties: {
54
+ type: {
55
+ client_side_validation: true,
56
+ required: false,
57
+ read_only: true,
58
+ serialized_name: 'type',
59
+ type: {
60
+ name: 'String'
61
+ }
62
+ },
63
+ id: {
64
+ client_side_validation: true,
65
+ required: false,
66
+ read_only: true,
67
+ serialized_name: 'id',
68
+ type: {
69
+ name: 'String'
70
+ }
71
+ },
72
+ name: {
73
+ client_side_validation: true,
74
+ required: false,
75
+ read_only: true,
76
+ serialized_name: 'name',
77
+ type: {
78
+ name: 'String'
79
+ }
80
+ },
81
+ display_name: {
82
+ client_side_validation: true,
83
+ required: false,
84
+ read_only: true,
85
+ serialized_name: 'displayName',
86
+ type: {
87
+ name: 'String'
88
+ }
89
+ },
90
+ roles: {
91
+ client_side_validation: true,
92
+ required: false,
93
+ read_only: true,
94
+ serialized_name: 'roles',
95
+ type: {
96
+ name: 'Sequence',
97
+ element: {
98
+ client_side_validation: true,
99
+ required: false,
100
+ serialized_name: 'StringElementType',
101
+ type: {
102
+ name: 'String'
103
+ }
104
+ }
105
+ }
106
+ },
107
+ children: {
108
+ client_side_validation: true,
109
+ required: false,
110
+ read_only: true,
111
+ serialized_name: 'children',
112
+ type: {
113
+ name: 'Sequence',
114
+ element: {
115
+ client_side_validation: true,
116
+ required: false,
117
+ serialized_name: 'CreateManagementGroupChildInfoElementType',
118
+ type: {
119
+ name: 'Composite',
120
+ class_name: 'CreateManagementGroupChildInfo'
121
+ }
122
+ }
123
+ }
124
+ }
125
+ }
126
+ }
127
+ }
128
+ end
129
+ end
130
+ end
131
+ end