diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics.rb old mode 100755 new mode 100644 index e548070e4e..1053eee314 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics.rb @@ -17,7 +17,6 @@ require 'concurrent' require 'ms_rest' require 'generated/azure_mgmt_datalake_analytics/module_definition' -require 'ms_rest_azure' module Azure::ARM::DataLakeAnalytics autoload :ComputePolicies, 'generated/azure_mgmt_datalake_analytics/compute_policies.rb' @@ -28,25 +27,26 @@ module Azure::ARM::DataLakeAnalytics autoload :DataLakeAnalyticsAccountManagementClient, 'generated/azure_mgmt_datalake_analytics/data_lake_analytics_account_management_client.rb' module Models + autoload :AddStorageAccountParameters, 'generated/azure_mgmt_datalake_analytics/models/add_storage_account_parameters.rb' autoload :UpdateStorageAccountParameters, 'generated/azure_mgmt_datalake_analytics/models/update_storage_account_parameters.rb' - autoload :AddDataLakeStoreParameters, 'generated/azure_mgmt_datalake_analytics/models/add_data_lake_store_parameters.rb' autoload :StorageContainer, 'generated/azure_mgmt_datalake_analytics/models/storage_container.rb' - autoload :AddStorageAccountParameters, 'generated/azure_mgmt_datalake_analytics/models/add_storage_account_parameters.rb' - autoload :SasTokenInfo, 'generated/azure_mgmt_datalake_analytics/models/sas_token_info.rb' - autoload :OptionalSubResource, 'generated/azure_mgmt_datalake_analytics/models/optional_sub_resource.rb' autoload :ComputePolicyCreateOrUpdateParameters, 'generated/azure_mgmt_datalake_analytics/models/compute_policy_create_or_update_parameters.rb' - autoload :DataLakeAnalyticsAccountListDataLakeStoreResult, 'generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_data_lake_store_result.rb' + autoload :SasTokenInfo, 'generated/azure_mgmt_datalake_analytics/models/sas_token_info.rb' autoload :ComputePolicyListResult, 'generated/azure_mgmt_datalake_analytics/models/compute_policy_list_result.rb' + autoload :ListStorageContainersResult, 'generated/azure_mgmt_datalake_analytics/models/list_storage_containers_result.rb' + autoload :ListSasTokensResult, 'generated/azure_mgmt_datalake_analytics/models/list_sas_tokens_result.rb' + autoload :DataLakeAnalyticsAccountListDataLakeStoreResult, 'generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_data_lake_store_result.rb' + autoload :OptionalSubResource, 'generated/azure_mgmt_datalake_analytics/models/optional_sub_resource.rb' autoload :ComputePolicyAccountCreateParameters, 'generated/azure_mgmt_datalake_analytics/models/compute_policy_account_create_parameters.rb' autoload :DataLakeAnalyticsAccountUpdateParameters, 'generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_update_parameters.rb' - autoload :ListStorageContainersResult, 'generated/azure_mgmt_datalake_analytics/models/list_storage_containers_result.rb' + autoload :AddDataLakeStoreParameters, 'generated/azure_mgmt_datalake_analytics/models/add_data_lake_store_parameters.rb' autoload :DataLakeAnalyticsAccountPropertiesBasic, 'generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_properties_basic.rb' autoload :DataLakeAnalyticsAccountListStorageAccountsResult, 'generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_storage_accounts_result.rb' + autoload :Resource, 'generated/azure_mgmt_datalake_analytics/models/resource.rb' autoload :ComputePolicy, 'generated/azure_mgmt_datalake_analytics/models/compute_policy.rb' autoload :UpdateFirewallRuleParameters, 'generated/azure_mgmt_datalake_analytics/models/update_firewall_rule_parameters.rb' autoload :SubResource, 'generated/azure_mgmt_datalake_analytics/models/sub_resource.rb' autoload :DataLakeAnalyticsAccountListResult, 'generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_result.rb' - autoload :ListSasTokensResult, 'generated/azure_mgmt_datalake_analytics/models/list_sas_tokens_result.rb' autoload :DataLakeAnalyticsFirewallRuleListResult, 'generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_firewall_rule_list_result.rb' autoload :StorageAccountInfo, 'generated/azure_mgmt_datalake_analytics/models/storage_account_info.rb' autoload :DataLakeStoreAccountInfo, 'generated/azure_mgmt_datalake_analytics/models/data_lake_store_account_info.rb' diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/account.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/account.rb old mode 100755 new mode 100644 index 54bc955677..9072e8204f --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/account.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/account.rb @@ -8,7 +8,6 @@ module Azure::ARM::DataLakeAnalytics # Creates an Azure Data Lake Analytics account management client. # class Account - include MsRestAzure # # Creates and initializes a new instance of the Account class. @@ -44,11 +43,11 @@ def initialize(client) # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [DataLakeAnalyticsAccountListResult] operation results. # def list_by_resource_group(resource_group_name, filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil) - first_page = list_by_resource_group_as_lazy(resource_group_name, filter, top, skip, select, orderby, count, custom_headers) - first_page.get_all_items + response = list_by_resource_group_async(resource_group_name, filter, top, skip, select, orderby, count, custom_headers).value! + response.body unless response.nil? end # @@ -74,7 +73,7 @@ def list_by_resource_group(resource_group_name, filter = nil, top = nil, skip = # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def list_by_resource_group_with_http_info(resource_group_name, filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil) list_by_resource_group_async(resource_group_name, filter, top, skip, select, orderby, count, custom_headers).value! @@ -112,10 +111,6 @@ def list_by_resource_group_async(resource_group_name, filter = nil, top = nil, s request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts' request_url = @base_url || @client.base_url @@ -135,10 +130,9 @@ def list_by_resource_group_async(resource_group_name, filter = nil, top = nil, s response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -177,11 +171,11 @@ def list_by_resource_group_async(resource_group_name, filter = nil, top = nil, s # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [DataLakeAnalyticsAccountListResult] operation results. # def list(filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil) - first_page = list_as_lazy(filter, top, skip, select, orderby, count, custom_headers) - first_page.get_all_items + response = list_async(filter, top, skip, select, orderby, count, custom_headers).value! + response.body unless response.nil? end # @@ -205,7 +199,7 @@ def list(filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def list_with_http_info(filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil) list_async(filter, top, skip, select, orderby, count, custom_headers).value! @@ -240,10 +234,6 @@ def list_async(filter = nil, top = nil, skip = nil, select = nil, orderby = nil, request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.DataLakeAnalytics/accounts' request_url = @base_url || @client.base_url @@ -263,10 +253,9 @@ def list_async(filter = nil, top = nil, skip = nil, select = nil, orderby = nil, response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -304,228 +293,6 @@ def create(resource_group_name, account_name, parameters, custom_headers = nil) response.body unless response.nil? end - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Analytics account.the account will be associated with. - # @param account_name [String] The name of the Data Lake Analytics account to - # create. - # @param parameters [DataLakeAnalyticsAccount] Parameters supplied to the - # create Data Lake Analytics account operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Concurrent::Promise] promise which provides async access to http - # response. - # - def create_async(resource_group_name, account_name, parameters, custom_headers = nil) - # Send request - promise = begin_create_async(resource_group_name, account_name, parameters, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::DataLakeAnalytics::Models::DataLakeAnalyticsAccount.mapper() - parsed_response = @client.deserialize(result_mapper, parsed_response) - end - - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) - end - - promise - end - - # - # Updates the Data Lake Analytics account object specified by the accountName - # with the contents of the account object. - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Analytics account. - # @param account_name [String] The name of the Data Lake Analytics account to - # update. - # @param parameters [DataLakeAnalyticsAccountUpdateParameters] Parameters - # supplied to the update Data Lake Analytics account operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataLakeAnalyticsAccount] operation results. - # - def update(resource_group_name, account_name, parameters = nil, custom_headers = nil) - response = update_async(resource_group_name, account_name, parameters, custom_headers).value! - response.body unless response.nil? - end - - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Analytics account. - # @param account_name [String] The name of the Data Lake Analytics account to - # update. - # @param parameters [DataLakeAnalyticsAccountUpdateParameters] Parameters - # supplied to the update Data Lake Analytics account operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Concurrent::Promise] promise which provides async access to http - # response. - # - def update_async(resource_group_name, account_name, parameters = nil, custom_headers = nil) - # Send request - promise = begin_update_async(resource_group_name, account_name, parameters, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::DataLakeAnalytics::Models::DataLakeAnalyticsAccount.mapper() - parsed_response = @client.deserialize(result_mapper, parsed_response) - end - - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) - end - - promise - end - - # - # Begins the delete process for the Data Lake Analytics account object - # specified by the account name. - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Analytics account. - # @param account_name [String] The name of the Data Lake Analytics account to - # delete - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - def delete(resource_group_name, account_name, custom_headers = nil) - response = delete_async(resource_group_name, account_name, custom_headers).value! - nil - end - - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Analytics account. - # @param account_name [String] The name of the Data Lake Analytics account to - # delete - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Concurrent::Promise] promise which provides async access to http - # response. - # - def delete_async(resource_group_name, account_name, custom_headers = nil) - # Send request - promise = begin_delete_async(resource_group_name, account_name, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - end - - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) - end - - promise - end - - # - # Gets details of the specified Data Lake Analytics account. - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Analytics account. - # @param account_name [String] The name of the Data Lake Analytics account to - # retrieve. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataLakeAnalyticsAccount] operation results. - # - def get(resource_group_name, account_name, custom_headers = nil) - response = get_async(resource_group_name, account_name, custom_headers).value! - response.body unless response.nil? - end - - # - # Gets details of the specified Data Lake Analytics account. - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Analytics account. - # @param account_name [String] The name of the Data Lake Analytics account to - # retrieve. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def get_with_http_info(resource_group_name, account_name, custom_headers = nil) - get_async(resource_group_name, account_name, custom_headers).value! - end - - # - # Gets details of the specified Data Lake Analytics account. - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Analytics account. - # @param account_name [String] The name of the Data Lake Analytics account to - # retrieve. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def get_async(resource_group_name, account_name, custom_headers = nil) - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'account_name is nil' if account_name.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}' - - request_url = @base_url || @client.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => @client.api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::DataLakeAnalytics::Models::DataLakeAnalyticsAccount.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - # # Creates the specified Data Lake Analytics account. This supplies the user # with computation services for Data Lake Analytics workloads @@ -539,30 +306,10 @@ def get_async(resource_group_name, account_name, custom_headers = nil) # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [DataLakeAnalyticsAccount] operation results. + # @return [MsRest::HttpOperationResponse] HTTP response information. # - def begin_create(resource_group_name, account_name, parameters, custom_headers = nil) - response = begin_create_async(resource_group_name, account_name, parameters, custom_headers).value! - response.body unless response.nil? - end - - # - # Creates the specified Data Lake Analytics account. This supplies the user - # with computation services for Data Lake Analytics workloads - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Analytics account.the account will be associated with. - # @param account_name [String] The name of the Data Lake Analytics account to - # create. - # @param parameters [DataLakeAnalyticsAccount] Parameters supplied to the - # create Data Lake Analytics account operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def begin_create_with_http_info(resource_group_name, account_name, parameters, custom_headers = nil) - begin_create_async(resource_group_name, account_name, parameters, custom_headers).value! + def create_with_http_info(resource_group_name, account_name, parameters, custom_headers = nil) + create_async(resource_group_name, account_name, parameters, custom_headers).value! end # @@ -580,7 +327,7 @@ def begin_create_with_http_info(resource_group_name, account_name, parameters, c # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_create_async(resource_group_name, account_name, parameters, custom_headers = nil) + def create_async(resource_group_name, account_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? @@ -590,10 +337,6 @@ def begin_create_async(resource_group_name, account_name, parameters, custom_hea request_headers = {} - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request @@ -619,14 +362,13 @@ def begin_create_async(resource_group_name, account_name, parameters, custom_hea http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 201 || status_code == 200 + unless status_code == 200 || status_code == 201 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response - if status_code == 201 + if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::DataLakeAnalytics::Models::DataLakeAnalyticsAccount.mapper() @@ -636,7 +378,7 @@ def begin_create_async(resource_group_name, account_name, parameters, custom_hea end end # Deserialize Response - if status_code == 200 + if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::DataLakeAnalytics::Models::DataLakeAnalyticsAccount.mapper() @@ -667,8 +409,8 @@ def begin_create_async(resource_group_name, account_name, parameters, custom_hea # # @return [DataLakeAnalyticsAccount] operation results. # - def begin_update(resource_group_name, account_name, parameters = nil, custom_headers = nil) - response = begin_update_async(resource_group_name, account_name, parameters, custom_headers).value! + def update(resource_group_name, account_name, parameters = nil, custom_headers = nil) + response = update_async(resource_group_name, account_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -685,10 +427,10 @@ def begin_update(resource_group_name, account_name, parameters = nil, custom_hea # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # - def begin_update_with_http_info(resource_group_name, account_name, parameters = nil, custom_headers = nil) - begin_update_async(resource_group_name, account_name, parameters, custom_headers).value! + def update_with_http_info(resource_group_name, account_name, parameters = nil, custom_headers = nil) + update_async(resource_group_name, account_name, parameters, custom_headers).value! end # @@ -706,7 +448,7 @@ def begin_update_with_http_info(resource_group_name, account_name, parameters = # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_update_async(resource_group_name, account_name, parameters = nil, custom_headers = nil) + def update_async(resource_group_name, account_name, parameters = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -715,10 +457,6 @@ def begin_update_async(resource_group_name, account_name, parameters = nil, cust request_headers = {} - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request @@ -746,10 +484,9 @@ def begin_update_async(resource_group_name, account_name, parameters = nil, cust response_content = http_response.body unless status_code == 200 || status_code == 201 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -789,8 +526,8 @@ def begin_update_async(resource_group_name, account_name, parameters = nil, cust # will be added to the HTTP request. # # - def begin_delete(resource_group_name, account_name, custom_headers = nil) - response = begin_delete_async(resource_group_name, account_name, custom_headers).value! + def delete(resource_group_name, account_name, custom_headers = nil) + response = delete_async(resource_group_name, account_name, custom_headers).value! nil end @@ -805,10 +542,10 @@ def begin_delete(resource_group_name, account_name, custom_headers = nil) # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # - def begin_delete_with_http_info(resource_group_name, account_name, custom_headers = nil) - begin_delete_async(resource_group_name, account_name, custom_headers).value! + def delete_with_http_info(resource_group_name, account_name, custom_headers = nil) + delete_async(resource_group_name, account_name, custom_headers).value! end # @@ -824,7 +561,7 @@ def begin_delete_with_http_info(resource_group_name, account_name, custom_header # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_delete_async(resource_group_name, account_name, custom_headers = nil) + def delete_async(resource_group_name, account_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -832,10 +569,6 @@ def begin_delete_async(resource_group_name, account_name, custom_headers = nil) request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}' request_url = @base_url || @client.base_url @@ -855,100 +588,9 @@ def begin_delete_async(resource_group_name, account_name, custom_headers = nil) response_content = http_response.body unless status_code == 200 || status_code == 202 || status_code == 204 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - - result - end - - promise.execute - end - - # - # Gets the first page of Data Lake Analytics accounts, if any, within a - # specific resource group. This includes a link to the next page, if any. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataLakeAnalyticsAccountListResult] operation results. - # - def list_by_resource_group_next(next_page_link, custom_headers = nil) - response = list_by_resource_group_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? - end - - # - # Gets the first page of Data Lake Analytics accounts, if any, within a - # specific resource group. This includes a link to the next page, if any. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_by_resource_group_next_with_http_info(next_page_link, custom_headers = nil) - list_by_resource_group_next_async(next_page_link, custom_headers).value! - end - - # - # Gets the first page of Data Lake Analytics accounts, if any, within a - # specific resource group. This includes a link to the next page, if any. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def list_by_resource_group_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' - - request_url = @base_url || @client.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::DataLakeAnalytics::Models::DataLakeAnalyticsAccountListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -957,63 +599,66 @@ def list_by_resource_group_next_async(next_page_link, custom_headers = nil) end # - # Gets the first page of Data Lake Analytics accounts, if any, within the - # current subscription. This includes a link to the next page, if any. + # Gets details of the specified Data Lake Analytics account. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] The name of the Azure resource group that + # contains the Data Lake Analytics account. + # @param account_name [String] The name of the Data Lake Analytics account to + # retrieve. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [DataLakeAnalyticsAccountListResult] operation results. + # @return [DataLakeAnalyticsAccount] operation results. # - def list_next(next_page_link, custom_headers = nil) - response = list_next_async(next_page_link, custom_headers).value! + def get(resource_group_name, account_name, custom_headers = nil) + response = get_async(resource_group_name, account_name, custom_headers).value! response.body unless response.nil? end # - # Gets the first page of Data Lake Analytics accounts, if any, within the - # current subscription. This includes a link to the next page, if any. + # Gets details of the specified Data Lake Analytics account. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] The name of the Azure resource group that + # contains the Data Lake Analytics account. + # @param account_name [String] The name of the Data Lake Analytics account to + # retrieve. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # - def list_next_with_http_info(next_page_link, custom_headers = nil) - list_next_async(next_page_link, custom_headers).value! + def get_with_http_info(resource_group_name, account_name, custom_headers = nil) + get_async(resource_group_name, account_name, custom_headers).value! end # - # Gets the first page of Data Lake Analytics accounts, if any, within the - # current subscription. This includes a link to the next page, if any. + # Gets details of the specified Data Lake Analytics account. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] The name of the Azure resource group that + # contains the Data Lake Analytics account. + # @param account_name [String] The name of the Data Lake Analytics account to + # retrieve. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def get_async(resource_group_name, account_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -1025,15 +670,14 @@ def list_next_async(next_page_link, custom_headers = nil) response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::DataLakeAnalytics::Models::DataLakeAnalyticsAccountListResult.mapper() + result_mapper = Azure::ARM::DataLakeAnalytics::Models::DataLakeAnalyticsAccount.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -1046,77 +690,5 @@ def list_next_async(next_page_link, custom_headers = nil) promise.execute end - # - # Gets the first page of Data Lake Analytics accounts, if any, within a - # specific resource group. This includes a link to the next page, if any. - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Analytics account. - # @param filter [String] OData filter. Optional. - # @param top [Integer] The number of items to return. Optional. - # @param skip [Integer] The number of items to skip over before returning - # elements. Optional. - # @param select [String] OData Select statement. Limits the properties on each - # entry to just those requested, e.g. - # Categories?$select=CategoryName,Description. Optional. - # @param orderby [String] OrderBy clause. One or more comma-separated - # expressions with an optional "asc" (the default) or "desc" depending on the - # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName - # desc. Optional. - # @param count [Boolean] The Boolean value of true or false to request a count - # of the matching resources included with the resources in the response, e.g. - # Categories?$count=true. Optional. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataLakeAnalyticsAccountListResult] which provide lazy access to - # pages of the response. - # - def list_by_resource_group_as_lazy(resource_group_name, filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil) - response = list_by_resource_group_async(resource_group_name, filter, top, skip, select, orderby, count, custom_headers).value! - unless response.nil? - page = response.body - page.next_method = Proc.new do |next_page_link| - list_by_resource_group_next_async(next_page_link, custom_headers) - end - page - end - end - - # - # Gets the first page of Data Lake Analytics accounts, if any, within the - # current subscription. This includes a link to the next page, if any. - # - # @param filter [String] OData filter. Optional. - # @param top [Integer] The number of items to return. Optional. - # @param skip [Integer] The number of items to skip over before returning - # elements. Optional. - # @param select [String] OData Select statement. Limits the properties on each - # entry to just those requested, e.g. - # Categories?$select=CategoryName,Description. Optional. - # @param orderby [String] OrderBy clause. One or more comma-separated - # expressions with an optional "asc" (the default) or "desc" depending on the - # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName - # desc. Optional. - # @param count [Boolean] The Boolean value of true or false to request a count - # of the matching resources included with the resources in the response, e.g. - # Categories?$count=true. Optional. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataLakeAnalyticsAccountListResult] which provide lazy access to - # pages of the response. - # - def list_as_lazy(filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil) - response = list_async(filter, top, skip, select, orderby, count, custom_headers).value! - unless response.nil? - page = response.body - page.next_method = Proc.new do |next_page_link| - list_next_async(next_page_link, custom_headers) - end - page - end - end - end end diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/compute_policies.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/compute_policies.rb index 27a294b640..d5932d9e4b 100644 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/compute_policies.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/compute_policies.rb @@ -8,7 +8,6 @@ module Azure::ARM::DataLakeAnalytics # Creates an Azure Data Lake Analytics account management client. # class ComputePolicies - include MsRestAzure # # Creates and initializes a new instance of the ComputePolicies class. @@ -62,7 +61,7 @@ def create_or_update(resource_group_name, account_name, compute_policy_name, par # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def create_or_update_with_http_info(resource_group_name, account_name, compute_policy_name, parameters, custom_headers = nil) create_or_update_async(resource_group_name, account_name, compute_policy_name, parameters, custom_headers).value! @@ -98,10 +97,6 @@ def create_or_update_async(resource_group_name, account_name, compute_policy_nam request_headers = {} - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request @@ -129,10 +124,9 @@ def create_or_update_async(resource_group_name, account_name, compute_policy_nam response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -183,7 +177,7 @@ def update(resource_group_name, account_name, compute_policy_name, parameters = # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def update_with_http_info(resource_group_name, account_name, compute_policy_name, parameters = nil, custom_headers = nil) update_async(resource_group_name, account_name, compute_policy_name, parameters, custom_headers).value! @@ -214,10 +208,6 @@ def update_async(resource_group_name, account_name, compute_policy_name, paramet request_headers = {} - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request @@ -245,10 +235,9 @@ def update_async(resource_group_name, account_name, compute_policy_name, paramet response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -296,7 +285,7 @@ def delete(resource_group_name, account_name, compute_policy_name, custom_header # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def delete_with_http_info(resource_group_name, account_name, compute_policy_name, custom_headers = nil) delete_async(resource_group_name, account_name, compute_policy_name, custom_headers).value! @@ -325,10 +314,6 @@ def delete_async(resource_group_name, account_name, compute_policy_name, custom_ request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}' request_url = @base_url || @client.base_url @@ -348,10 +333,9 @@ def delete_async(resource_group_name, account_name, compute_policy_name, custom_ response_content = http_response.body unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end @@ -390,7 +374,7 @@ def get(resource_group_name, account_name, compute_policy_name, custom_headers = # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def get_with_http_info(resource_group_name, account_name, compute_policy_name, custom_headers = nil) get_async(resource_group_name, account_name, compute_policy_name, custom_headers).value! @@ -419,10 +403,6 @@ def get_async(resource_group_name, account_name, compute_policy_name, custom_hea request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}' request_url = @base_url || @client.base_url @@ -442,10 +422,9 @@ def get_async(resource_group_name, account_name, compute_policy_name, custom_hea response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -474,11 +453,11 @@ def get_async(resource_group_name, account_name, compute_policy_name, custom_hea # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [ComputePolicyListResult] operation results. # def list_by_account(resource_group_name, account_name, custom_headers = nil) - first_page = list_by_account_as_lazy(resource_group_name, account_name, custom_headers) - first_page.get_all_items + response = list_by_account_async(resource_group_name, account_name, custom_headers).value! + response.body unless response.nil? end # @@ -492,7 +471,7 @@ def list_by_account(resource_group_name, account_name, custom_headers = nil) # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def list_by_account_with_http_info(resource_group_name, account_name, custom_headers = nil) list_by_account_async(resource_group_name, account_name, custom_headers).value! @@ -519,10 +498,6 @@ def list_by_account_async(resource_group_name, account_name, custom_headers = ni request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies' request_url = @base_url || @client.base_url @@ -542,10 +517,9 @@ def list_by_account_async(resource_group_name, account_name, custom_headers = ni response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -563,120 +537,5 @@ def list_by_account_async(resource_group_name, account_name, custom_headers = ni promise.execute end - # - # Lists the Data Lake Analytics compute policies within the specified Data Lake - # Analytics account. An account supports, at most, 50 policies - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [ComputePolicyListResult] operation results. - # - def list_by_account_next(next_page_link, custom_headers = nil) - response = list_by_account_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? - end - - # - # Lists the Data Lake Analytics compute policies within the specified Data Lake - # Analytics account. An account supports, at most, 50 policies - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_by_account_next_with_http_info(next_page_link, custom_headers = nil) - list_by_account_next_async(next_page_link, custom_headers).value! - end - - # - # Lists the Data Lake Analytics compute policies within the specified Data Lake - # Analytics account. An account supports, at most, 50 policies - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def list_by_account_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' - - request_url = @base_url || @client.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::DataLakeAnalytics::Models::ComputePolicyListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Lists the Data Lake Analytics compute policies within the specified Data Lake - # Analytics account. An account supports, at most, 50 policies - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Analytics account. - # @param account_name [String] The name of the Data Lake Analytics account from - # which to get the compute policies. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [ComputePolicyListResult] which provide lazy access to pages of the - # response. - # - def list_by_account_as_lazy(resource_group_name, account_name, custom_headers = nil) - response = list_by_account_async(resource_group_name, account_name, custom_headers).value! - unless response.nil? - page = response.body - page.next_method = Proc.new do |next_page_link| - list_by_account_next_async(next_page_link, custom_headers) - end - page - end - end - end end diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/data_lake_analytics_account_management_client.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/data_lake_analytics_account_management_client.rb old mode 100755 new mode 100644 index fe8d612cb3..9ba8044274 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/data_lake_analytics_account_management_client.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/data_lake_analytics_account_management_client.rb @@ -7,34 +7,19 @@ module Azure::ARM::DataLakeAnalytics # # A service client - single point of access to the REST API. # - class DataLakeAnalyticsAccountManagementClient < MsRestAzure::AzureServiceClient - include MsRestAzure - include MsRestAzure::Serialization + class DataLakeAnalyticsAccountManagementClient < MsRest::ServiceClient + include MsRest::Serialization # @return [String] the base URI of the service. attr_accessor :base_url - # @return Credentials needed for the client to connect to Azure. - attr_reader :credentials - # @return [String] Get subscription credentials which uniquely identify # Microsoft Azure subscription. The subscription ID forms part of the URI # for every service call. attr_accessor :subscription_id # @return [String] Client Api Version. - attr_reader :api_version - - # @return [String] Gets or sets the preferred language for the response. - attr_accessor :accept_language - - # @return [Integer] Gets or sets the retry timeout in seconds for Long - # Running Operations. Default value is 30. - attr_accessor :long_running_operation_retry_timeout - - # @return [Boolean] When set to true a unique x-ms-client-request-id value - # is generated and included in each request. Default is true. - attr_accessor :generate_client_request_id + attr_accessor :api_version # @return [ComputePolicies] compute_policies attr_reader :compute_policies @@ -69,10 +54,6 @@ def initialize(credentials = nil, base_url = nil, options = nil) @storage_accounts = StorageAccounts.new(self) @data_lake_store_accounts = DataLakeStoreAccounts.new(self) @account = Account.new(self) - @api_version = '2016-11-01' - @accept_language = 'en-US' - @long_running_operation_retry_timeout = 30 - @generate_client_request_id = true add_telemetry end @@ -102,7 +83,7 @@ def make_request(method, path, options = {}) # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete. # @param path [String] the path, relative to {base_url}. # @param options [Hash{String=>String}] specifying any request options like :body. - # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status. + # @return [MsRest::HttpOperationResponse] Operation response containing the request, response and status. # def make_request_with_http_info(method, path, options = {}) result = make_request_async(method, path, options).value! @@ -124,7 +105,6 @@ def make_request_async(method, path, options = {}) request_url = options[:base_url] || @base_url request_headers = @request_headers - request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil? options.merge!({headers: request_headers.merge(options[:headers] || {})}) options.merge!({credentials: @credentials}) unless @credentials.nil? diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/data_lake_store_accounts.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/data_lake_store_accounts.rb old mode 100755 new mode 100644 index 257f9404be..6a50e18430 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/data_lake_store_accounts.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/data_lake_store_accounts.rb @@ -8,7 +8,6 @@ module Azure::ARM::DataLakeAnalytics # Creates an Azure Data Lake Analytics account management client. # class DataLakeStoreAccounts - include MsRestAzure # # Creates and initializes a new instance of the DataLakeStoreAccounts class. @@ -57,7 +56,7 @@ def add(resource_group_name, account_name, data_lake_store_account_name, paramet # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def add_with_http_info(resource_group_name, account_name, data_lake_store_account_name, parameters = nil, custom_headers = nil) add_async(resource_group_name, account_name, data_lake_store_account_name, parameters, custom_headers).value! @@ -90,10 +89,6 @@ def add_async(resource_group_name, account_name, data_lake_store_account_name, p request_headers = {} - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request @@ -121,10 +116,9 @@ def add_async(resource_group_name, account_name, data_lake_store_account_name, p response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end @@ -164,7 +158,7 @@ def delete(resource_group_name, account_name, data_lake_store_account_name, cust # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def delete_with_http_info(resource_group_name, account_name, data_lake_store_account_name, custom_headers = nil) delete_async(resource_group_name, account_name, data_lake_store_account_name, custom_headers).value! @@ -194,10 +188,6 @@ def delete_async(resource_group_name, account_name, data_lake_store_account_name request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/{dataLakeStoreAccountName}' request_url = @base_url || @client.base_url @@ -217,10 +207,9 @@ def delete_async(resource_group_name, account_name, data_lake_store_account_name response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end @@ -261,7 +250,7 @@ def get(resource_group_name, account_name, data_lake_store_account_name, custom_ # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def get_with_http_info(resource_group_name, account_name, data_lake_store_account_name, custom_headers = nil) get_async(resource_group_name, account_name, data_lake_store_account_name, custom_headers).value! @@ -291,10 +280,6 @@ def get_async(resource_group_name, account_name, data_lake_store_account_name, c request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/{dataLakeStoreAccountName}' request_url = @base_url || @client.base_url @@ -314,10 +299,9 @@ def get_async(resource_group_name, account_name, data_lake_store_account_name, c response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -361,11 +345,11 @@ def get_async(resource_group_name, account_name, data_lake_store_account_name, c # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [DataLakeAnalyticsAccountListDataLakeStoreResult] operation results. # def list_by_account(resource_group_name, account_name, filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil) - first_page = list_by_account_as_lazy(resource_group_name, account_name, filter, top, skip, select, orderby, count, custom_headers) - first_page.get_all_items + response = list_by_account_async(resource_group_name, account_name, filter, top, skip, select, orderby, count, custom_headers).value! + response.body unless response.nil? end # @@ -394,7 +378,7 @@ def list_by_account(resource_group_name, account_name, filter = nil, top = nil, # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def list_by_account_with_http_info(resource_group_name, account_name, filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil) list_by_account_async(resource_group_name, account_name, filter, top, skip, select, orderby, count, custom_headers).value! @@ -436,10 +420,6 @@ def list_by_account_async(resource_group_name, account_name, filter = nil, top = request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/' request_url = @base_url || @client.base_url @@ -459,103 +439,9 @@ def list_by_account_async(resource_group_name, account_name, filter = nil, top = response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::DataLakeAnalytics::Models::DataLakeAnalyticsAccountListDataLakeStoreResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Gets the first page of Data Lake Store accounts linked to the specified Data - # Lake Analytics account. The response includes a link to the next page, if - # any. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataLakeAnalyticsAccountListDataLakeStoreResult] operation results. - # - def list_by_account_next(next_page_link, custom_headers = nil) - response = list_by_account_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? - end - - # - # Gets the first page of Data Lake Store accounts linked to the specified Data - # Lake Analytics account. The response includes a link to the next page, if - # any. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_by_account_next_with_http_info(next_page_link, custom_headers = nil) - list_by_account_next_async(next_page_link, custom_headers).value! - end - - # - # Gets the first page of Data Lake Store accounts linked to the specified Data - # Lake Analytics account. The response includes a link to the next page, if - # any. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def list_by_account_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' - - request_url = @base_url || @client.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -573,45 +459,5 @@ def list_by_account_next_async(next_page_link, custom_headers = nil) promise.execute end - # - # Gets the first page of Data Lake Store accounts linked to the specified Data - # Lake Analytics account. The response includes a link to the next page, if - # any. - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Analytics account. - # @param account_name [String] The name of the Data Lake Analytics account for - # which to list Data Lake Store accounts. - # @param filter [String] OData filter. Optional. - # @param top [Integer] The number of items to return. Optional. - # @param skip [Integer] The number of items to skip over before returning - # elements. Optional. - # @param select [String] OData Select statement. Limits the properties on each - # entry to just those requested, e.g. - # Categories?$select=CategoryName,Description. Optional. - # @param orderby [String] OrderBy clause. One or more comma-separated - # expressions with an optional "asc" (the default) or "desc" depending on the - # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName - # desc. Optional. - # @param count [Boolean] The Boolean value of true or false to request a count - # of the matching resources included with the resources in the response, e.g. - # Categories?$count=true. Optional. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataLakeAnalyticsAccountListDataLakeStoreResult] which provide lazy - # access to pages of the response. - # - def list_by_account_as_lazy(resource_group_name, account_name, filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil) - response = list_by_account_async(resource_group_name, account_name, filter, top, skip, select, orderby, count, custom_headers).value! - unless response.nil? - page = response.body - page.next_method = Proc.new do |next_page_link| - list_by_account_next_async(next_page_link, custom_headers) - end - page - end - end - end end diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/firewall_rules.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/firewall_rules.rb old mode 100755 new mode 100644 index 5e7bf31c51..c70262a0e4 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/firewall_rules.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/firewall_rules.rb @@ -8,7 +8,6 @@ module Azure::ARM::DataLakeAnalytics # Creates an Azure Data Lake Analytics account management client. # class FirewallRules - include MsRestAzure # # Creates and initializes a new instance of the FirewallRules class. @@ -58,7 +57,7 @@ def create_or_update(resource_group_name, account_name, firewall_rule_name, para # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def create_or_update_with_http_info(resource_group_name, account_name, firewall_rule_name, parameters, custom_headers = nil) create_or_update_async(resource_group_name, account_name, firewall_rule_name, parameters, custom_headers).value! @@ -92,10 +91,6 @@ def create_or_update_async(resource_group_name, account_name, firewall_rule_name request_headers = {} - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request @@ -123,10 +118,9 @@ def create_or_update_async(resource_group_name, account_name, firewall_rule_name response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -177,7 +171,7 @@ def update(resource_group_name, account_name, firewall_rule_name, parameters = n # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def update_with_http_info(resource_group_name, account_name, firewall_rule_name, parameters = nil, custom_headers = nil) update_async(resource_group_name, account_name, firewall_rule_name, parameters, custom_headers).value! @@ -208,10 +202,6 @@ def update_async(resource_group_name, account_name, firewall_rule_name, paramete request_headers = {} - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request @@ -239,10 +229,9 @@ def update_async(resource_group_name, account_name, firewall_rule_name, paramete response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -290,7 +279,7 @@ def delete(resource_group_name, account_name, firewall_rule_name, custom_headers # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def delete_with_http_info(resource_group_name, account_name, firewall_rule_name, custom_headers = nil) delete_async(resource_group_name, account_name, firewall_rule_name, custom_headers).value! @@ -319,10 +308,6 @@ def delete_async(resource_group_name, account_name, firewall_rule_name, custom_h request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}' request_url = @base_url || @client.base_url @@ -342,10 +327,9 @@ def delete_async(resource_group_name, account_name, firewall_rule_name, custom_h response_content = http_response.body unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end @@ -382,7 +366,7 @@ def get(resource_group_name, account_name, firewall_rule_name, custom_headers = # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def get_with_http_info(resource_group_name, account_name, firewall_rule_name, custom_headers = nil) get_async(resource_group_name, account_name, firewall_rule_name, custom_headers).value! @@ -410,10 +394,6 @@ def get_async(resource_group_name, account_name, firewall_rule_name, custom_head request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}' request_url = @base_url || @client.base_url @@ -433,10 +413,9 @@ def get_async(resource_group_name, account_name, firewall_rule_name, custom_head response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -465,11 +444,11 @@ def get_async(resource_group_name, account_name, firewall_rule_name, custom_head # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [DataLakeAnalyticsFirewallRuleListResult] operation results. # def list_by_account(resource_group_name, account_name, custom_headers = nil) - first_page = list_by_account_as_lazy(resource_group_name, account_name, custom_headers) - first_page.get_all_items + response = list_by_account_async(resource_group_name, account_name, custom_headers).value! + response.body unless response.nil? end # @@ -483,7 +462,7 @@ def list_by_account(resource_group_name, account_name, custom_headers = nil) # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def list_by_account_with_http_info(resource_group_name, account_name, custom_headers = nil) list_by_account_async(resource_group_name, account_name, custom_headers).value! @@ -510,10 +489,6 @@ def list_by_account_async(resource_group_name, account_name, custom_headers = ni request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules' request_url = @base_url || @client.base_url @@ -533,10 +508,9 @@ def list_by_account_async(resource_group_name, account_name, custom_headers = ni response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -554,120 +528,5 @@ def list_by_account_async(resource_group_name, account_name, custom_headers = ni promise.execute end - # - # Lists the Data Lake Analytics firewall rules within the specified Data Lake - # Analytics account. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataLakeAnalyticsFirewallRuleListResult] operation results. - # - def list_by_account_next(next_page_link, custom_headers = nil) - response = list_by_account_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? - end - - # - # Lists the Data Lake Analytics firewall rules within the specified Data Lake - # Analytics account. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_by_account_next_with_http_info(next_page_link, custom_headers = nil) - list_by_account_next_async(next_page_link, custom_headers).value! - end - - # - # Lists the Data Lake Analytics firewall rules within the specified Data Lake - # Analytics account. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def list_by_account_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' - - request_url = @base_url || @client.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::DataLakeAnalytics::Models::DataLakeAnalyticsFirewallRuleListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Lists the Data Lake Analytics firewall rules within the specified Data Lake - # Analytics account. - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Analytics account. - # @param account_name [String] The name of the Data Lake Analytics account from - # which to get the firewall rules. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataLakeAnalyticsFirewallRuleListResult] which provide lazy access - # to pages of the response. - # - def list_by_account_as_lazy(resource_group_name, account_name, custom_headers = nil) - response = list_by_account_async(resource_group_name, account_name, custom_headers).value! - unless response.nil? - page = response.body - page.next_method = Proc.new do |next_page_link| - list_by_account_next_async(next_page_link, custom_headers) - end - page - end - end - end end diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/aadobject_type.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/aadobject_type.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/add_data_lake_store_parameters.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/add_data_lake_store_parameters.rb old mode 100755 new mode 100644 index 3230f508ae..aadc46f7fb --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/add_data_lake_store_parameters.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/add_data_lake_store_parameters.rb @@ -9,10 +9,6 @@ module Models # Additional Data Lake Store parameters. # class AddDataLakeStoreParameters - - include MsRestAzure - - include MsRest::JSONable # @return [String] the optional suffix for the Data Lake Store account. attr_accessor :suffix diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/add_storage_account_parameters.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/add_storage_account_parameters.rb old mode 100755 new mode 100644 index c25467c70a..cf936ec44d --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/add_storage_account_parameters.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/add_storage_account_parameters.rb @@ -10,10 +10,6 @@ module Models # Lake Analytics account. # class AddStorageAccountParameters - - include MsRestAzure - - include MsRest::JSONable # @return [String] the access key associated with this Azure Storage # account that will be used to connect to it. attr_accessor :access_key diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy.rb old mode 100755 new mode 100644 index 750a0e63e5..994fa008e9 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy.rb @@ -9,10 +9,6 @@ module Models # The parameters used to create a new compute policy. # class ComputePolicy - - include MsRestAzure - - include MsRest::JSONable # @return [String] The name of the compute policy attr_accessor :name diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_account_create_parameters.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_account_create_parameters.rb old mode 100755 new mode 100644 index eb48dd895d..403449d6dd --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_account_create_parameters.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_account_create_parameters.rb @@ -9,10 +9,6 @@ module Models # The parameters used to create a new compute policy. # class ComputePolicyAccountCreateParameters - - include MsRestAzure - - include MsRest::JSONable # @return [String] The unique name of the policy to create attr_accessor :name diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_create_or_update_parameters.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_create_or_update_parameters.rb old mode 100755 new mode 100644 index af1ba692bb..450d97720b --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_create_or_update_parameters.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_create_or_update_parameters.rb @@ -9,10 +9,6 @@ module Models # The parameters used to create a new compute policy. # class ComputePolicyCreateOrUpdateParameters - - include MsRestAzure - - include MsRest::JSONable # @return The AAD object identifier for the entity to create a policy # for. attr_accessor :object_id diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_list_result.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_list_result.rb old mode 100755 new mode 100644 index e61353371c..7fc8a555b1 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_list_result.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_list_result.rb @@ -9,47 +9,12 @@ module Models # The list of compute policies in the account. # class ComputePolicyListResult - - include MsRestAzure - - include MsRest::JSONable # @return [Array] the results of the list operation attr_accessor :value # @return [String] the link (url) to the next page of results. attr_accessor :next_link - # return [Proc] with next page method call. - attr_accessor :next_method - - # - # Gets the rest of the items for the request, enabling auto-pagination. - # - # @return [Array] operation results. - # - def get_all_items - items = @value - page = self - while page.next_link != nil do - page = page.get_next_page - items.concat(page.value) - end - items - end - - # - # Gets the next page of results. - # - # @return [ComputePolicyListResult] with next page content. - # - def get_next_page - response = @next_method.call(@next_link).value! unless @next_method.nil? - unless response.nil? - @next_link = response.body.next_link - @value = response.body.value - self - end - end # # Mapper for ComputePolicyListResult class as Ruby Hash. diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account.rb old mode 100755 new mode 100644 index 6a43971ed6..057c662452 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account.rb @@ -9,11 +9,7 @@ module Models # A Data Lake Analytics account object, containing all information # associated with the named Data Lake Analytics account. # - class DataLakeAnalyticsAccount < MsRestAzure::Resource - - include MsRestAzure - - include MsRest::JSONable + class DataLakeAnalyticsAccount < Resource # @return [DataLakeAnalyticsAccountStatus] the provisioning status of the # Data Lake Analytics account. Possible values include: 'Failed', # 'Creating', 'Running', 'Succeeded', 'Patching', 'Suspending', diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_basic.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_basic.rb index 71f2941535..9eb1ad0071 100644 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_basic.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_basic.rb @@ -9,11 +9,7 @@ module Models # A Data Lake Analytics account object, containing all information # associated with the named Data Lake Analytics account. # - class DataLakeAnalyticsAccountBasic < MsRestAzure::Resource - - include MsRestAzure - - include MsRest::JSONable + class DataLakeAnalyticsAccountBasic < Resource # @return [DataLakeAnalyticsAccountStatus] the provisioning status of the # Data Lake Analytics account. Possible values include: 'Failed', # 'Creating', 'Running', 'Succeeded', 'Patching', 'Suspending', diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_data_lake_store_result.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_data_lake_store_result.rb old mode 100755 new mode 100644 index 046e8ab9cb..f196569ef0 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_data_lake_store_result.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_data_lake_store_result.rb @@ -9,10 +9,6 @@ module Models # Data Lake Account list information. # class DataLakeAnalyticsAccountListDataLakeStoreResult - - include MsRestAzure - - include MsRest::JSONable # @return [Array] the results of the list # operation attr_accessor :value @@ -20,38 +16,6 @@ class DataLakeAnalyticsAccountListDataLakeStoreResult # @return [String] the link (url) to the next page of results. attr_accessor :next_link - # return [Proc] with next page method call. - attr_accessor :next_method - - # - # Gets the rest of the items for the request, enabling auto-pagination. - # - # @return [Array] operation results. - # - def get_all_items - items = @value - page = self - while page.next_link != nil do - page = page.get_next_page - items.concat(page.value) - end - items - end - - # - # Gets the next page of results. - # - # @return [DataLakeAnalyticsAccountListDataLakeStoreResult] with next - # page content. - # - def get_next_page - response = @next_method.call(@next_link).value! unless @next_method.nil? - unless response.nil? - @next_link = response.body.next_link - @value = response.body.value - self - end - end # # Mapper for DataLakeAnalyticsAccountListDataLakeStoreResult class as diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_result.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_result.rb old mode 100755 new mode 100644 index 21cc04223d..5bedfabd70 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_result.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_result.rb @@ -9,10 +9,6 @@ module Models # DataLakeAnalytics Account list information. # class DataLakeAnalyticsAccountListResult - - include MsRestAzure - - include MsRest::JSONable # @return [Array] the results of the list # operation attr_accessor :value @@ -20,37 +16,6 @@ class DataLakeAnalyticsAccountListResult # @return [String] the link (url) to the next page of results. attr_accessor :next_link - # return [Proc] with next page method call. - attr_accessor :next_method - - # - # Gets the rest of the items for the request, enabling auto-pagination. - # - # @return [Array] operation results. - # - def get_all_items - items = @value - page = self - while page.next_link != nil do - page = page.get_next_page - items.concat(page.value) - end - items - end - - # - # Gets the next page of results. - # - # @return [DataLakeAnalyticsAccountListResult] with next page content. - # - def get_next_page - response = @next_method.call(@next_link).value! unless @next_method.nil? - unless response.nil? - @next_link = response.body.next_link - @value = response.body.value - self - end - end # # Mapper for DataLakeAnalyticsAccountListResult class as Ruby Hash. diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_storage_accounts_result.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_storage_accounts_result.rb old mode 100755 new mode 100644 index 7b0dedaa66..7e048a87d8 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_storage_accounts_result.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_storage_accounts_result.rb @@ -9,48 +9,12 @@ module Models # Azure Storage Account list information. # class DataLakeAnalyticsAccountListStorageAccountsResult - - include MsRestAzure - - include MsRest::JSONable # @return [Array] the results of the list operation attr_accessor :value # @return [String] the link (url) to the next page of results. attr_accessor :next_link - # return [Proc] with next page method call. - attr_accessor :next_method - - # - # Gets the rest of the items for the request, enabling auto-pagination. - # - # @return [Array] operation results. - # - def get_all_items - items = @value - page = self - while page.next_link != nil do - page = page.get_next_page - items.concat(page.value) - end - items - end - - # - # Gets the next page of results. - # - # @return [DataLakeAnalyticsAccountListStorageAccountsResult] with next - # page content. - # - def get_next_page - response = @next_method.call(@next_link).value! unless @next_method.nil? - unless response.nil? - @next_link = response.body.next_link - @value = response.body.value - self - end - end # # Mapper for DataLakeAnalyticsAccountListStorageAccountsResult class as diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_properties_basic.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_properties_basic.rb index c8bbeaa302..bd4f101c59 100644 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_properties_basic.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_properties_basic.rb @@ -10,10 +10,6 @@ module Models # underlying Data Lake Analytics account. # class DataLakeAnalyticsAccountPropertiesBasic - - include MsRestAzure - - include MsRest::JSONable # @return [DataLakeAnalyticsAccountStatus] the provisioning status of the # Data Lake Analytics account. Possible values include: 'Failed', # 'Creating', 'Running', 'Succeeded', 'Patching', 'Suspending', diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_state.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_state.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_status.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_status.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_update_parameters.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_update_parameters.rb old mode 100755 new mode 100644 index 01023b911a..39ea1bcef5 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_update_parameters.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_update_parameters.rb @@ -10,10 +10,6 @@ module Models # account. # class DataLakeAnalyticsAccountUpdateParameters - - include MsRestAzure - - include MsRest::JSONable # @return [Hash{String => String}] Resource tags attr_accessor :tags diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_firewall_rule_list_result.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_firewall_rule_list_result.rb old mode 100755 new mode 100644 index f75bad4a18..1db0a1fea8 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_firewall_rule_list_result.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_firewall_rule_list_result.rb @@ -9,48 +9,12 @@ module Models # Data Lake Analytics firewall rule list information. # class DataLakeAnalyticsFirewallRuleListResult - - include MsRestAzure - - include MsRest::JSONable # @return [Array] the results of the list operation attr_accessor :value # @return [String] the link (url) to the next page of results. attr_accessor :next_link - # return [Proc] with next page method call. - attr_accessor :next_method - - # - # Gets the rest of the items for the request, enabling auto-pagination. - # - # @return [Array] operation results. - # - def get_all_items - items = @value - page = self - while page.next_link != nil do - page = page.get_next_page - items.concat(page.value) - end - items - end - - # - # Gets the next page of results. - # - # @return [DataLakeAnalyticsFirewallRuleListResult] with next page - # content. - # - def get_next_page - response = @next_method.call(@next_link).value! unless @next_method.nil? - unless response.nil? - @next_link = response.body.next_link - @value = response.body.value - self - end - end # # Mapper for DataLakeAnalyticsFirewallRuleListResult class as Ruby Hash. diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_store_account_info.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_store_account_info.rb old mode 100755 new mode 100644 index fb44ae4612..808efe7358 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_store_account_info.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_store_account_info.rb @@ -9,10 +9,6 @@ module Models # Data Lake Store account information. # class DataLakeStoreAccountInfo < SubResource - - include MsRestAzure - - include MsRest::JSONable # @return [String] the optional suffix for the Data Lake Store account. attr_accessor :suffix diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/firewall_allow_azure_ips_state.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/firewall_allow_azure_ips_state.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/firewall_rule.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/firewall_rule.rb old mode 100755 new mode 100644 index 9f03553573..555fb95245 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/firewall_rule.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/firewall_rule.rb @@ -9,10 +9,6 @@ module Models # Data Lake Analytics firewall rule information # class FirewallRule < OptionalSubResource - - include MsRestAzure - - include MsRest::JSONable # @return [String] the start IP address for the firewall rule. This can # be either ipv4 or ipv6. Start and End should be in the same protocol. attr_accessor :start_ip_address diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/firewall_state.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/firewall_state.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/list_sas_tokens_result.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/list_sas_tokens_result.rb old mode 100755 new mode 100644 index ecf7336350..e6ce60de07 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/list_sas_tokens_result.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/list_sas_tokens_result.rb @@ -10,47 +10,12 @@ module Models # associated SAS token for connection use. # class ListSasTokensResult - - include MsRestAzure - - include MsRest::JSONable # @return [Array] attr_accessor :value # @return [String] the link (url) to the next page of results. attr_accessor :next_link - # return [Proc] with next page method call. - attr_accessor :next_method - - # - # Gets the rest of the items for the request, enabling auto-pagination. - # - # @return [Array] operation results. - # - def get_all_items - items = @value - page = self - while page.next_link != nil do - page = page.get_next_page - items.concat(page.value) - end - items - end - - # - # Gets the next page of results. - # - # @return [ListSasTokensResult] with next page content. - # - def get_next_page - response = @next_method.call(@next_link).value! unless @next_method.nil? - unless response.nil? - @next_link = response.body.next_link - @value = response.body.value - self - end - end # # Mapper for ListSasTokensResult class as Ruby Hash. diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/list_storage_containers_result.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/list_storage_containers_result.rb old mode 100755 new mode 100644 index ddcbe0d505..7c8574a25c --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/list_storage_containers_result.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/list_storage_containers_result.rb @@ -10,47 +10,12 @@ module Models # to the Data Lake Analytics account. # class ListStorageContainersResult - - include MsRestAzure - - include MsRest::JSONable # @return [Array] the results of the list operation attr_accessor :value # @return [String] the link (url) to the next page of results. attr_accessor :next_link - # return [Proc] with next page method call. - attr_accessor :next_method - - # - # Gets the rest of the items for the request, enabling auto-pagination. - # - # @return [Array] operation results. - # - def get_all_items - items = @value - page = self - while page.next_link != nil do - page = page.get_next_page - items.concat(page.value) - end - items - end - - # - # Gets the next page of results. - # - # @return [ListStorageContainersResult] with next page content. - # - def get_next_page - response = @next_method.call(@next_link).value! unless @next_method.nil? - unless response.nil? - @next_link = response.body.next_link - @value = response.body.value - self - end - end # # Mapper for ListStorageContainersResult class as Ruby Hash. diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/optional_sub_resource.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/optional_sub_resource.rb old mode 100755 new mode 100644 index 7b1e5c48da..b00d5c9e6a --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/optional_sub_resource.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/optional_sub_resource.rb @@ -10,10 +10,6 @@ module Models # properties. # class OptionalSubResource - - include MsRestAzure - - include MsRest::JSONable # @return [String] Resource Id attr_accessor :id diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/resource.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/resource.rb new file mode 100644 index 0000000000..850b0f7d33 --- /dev/null +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/resource.rb @@ -0,0 +1,91 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::DataLakeAnalytics + module Models + # + # The Resource model definition. + # + class Resource + # @return [String] Resource Id + attr_accessor :id + + # @return [String] Resource name + attr_accessor :name + + # @return [String] Resource type + attr_accessor :type + + # @return [String] Resource location + attr_accessor :location + + # @return [Hash{String => String}] Resource tags + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/sas_token_info.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/sas_token_info.rb old mode 100755 new mode 100644 index 116672c1f3..f5781f2345 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/sas_token_info.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/sas_token_info.rb @@ -9,10 +9,6 @@ module Models # SAS token information. # class SasTokenInfo - - include MsRestAzure - - include MsRest::JSONable # @return [String] the access token for the associated Azure Storage # Container. attr_accessor :access_token diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/storage_account_info.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/storage_account_info.rb old mode 100755 new mode 100644 index 2ab6fa4a2b..edbe42ef4d --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/storage_account_info.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/storage_account_info.rb @@ -9,10 +9,6 @@ module Models # Azure Storage account information. # class StorageAccountInfo < SubResource - - include MsRestAzure - - include MsRest::JSONable # @return [String] the access key associated with this Azure Storage # account that will be used to connect to it. attr_accessor :access_key diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/storage_container.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/storage_container.rb old mode 100755 new mode 100644 index ddf72c6567..67c8d3c680 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/storage_container.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/storage_container.rb @@ -9,10 +9,6 @@ module Models # Azure Storage blob container information. # class StorageContainer - - include MsRestAzure - - include MsRest::JSONable # @return [String] the unique identifier of the blob container. attr_accessor :id diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/sub_resource.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/sub_resource.rb old mode 100755 new mode 100644 index 713572415d..c75fd27455 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/sub_resource.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/sub_resource.rb @@ -8,11 +8,10 @@ module Models # # The Sub Resource model definition. # - class SubResource < MsRestAzure::SubResource + class SubResource + # @return [String] Resource Id + attr_accessor :id - include MsRestAzure - - include MsRest::JSONable # @return [String] Resource name attr_accessor :name diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/tier_type.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/tier_type.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/update_firewall_rule_parameters.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/update_firewall_rule_parameters.rb old mode 100755 new mode 100644 index dc767f2476..21d33dc4cf --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/update_firewall_rule_parameters.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/update_firewall_rule_parameters.rb @@ -9,10 +9,6 @@ module Models # Data Lake Analytics firewall rule update parameters # class UpdateFirewallRuleParameters - - include MsRestAzure - - include MsRest::JSONable # @return [String] the start IP address for the firewall rule. This can # be either ipv4 or ipv6. Start and End should be in the same protocol. attr_accessor :start_ip_address diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/update_storage_account_parameters.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/update_storage_account_parameters.rb old mode 100755 new mode 100644 index 5454fe4492..607bb31003 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/update_storage_account_parameters.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/update_storage_account_parameters.rb @@ -10,10 +10,6 @@ module Models # Lake Analytics account. # class UpdateStorageAccountParameters - - include MsRestAzure - - include MsRest::JSONable # @return [String] the updated access key associated with this Azure # Storage account that will be used to connect to it. attr_accessor :access_key diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/module_definition.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/module_definition.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/storage_accounts.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/storage_accounts.rb old mode 100755 new mode 100644 index 169d31349e..a975e7507c --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/storage_accounts.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/storage_accounts.rb @@ -8,7 +8,6 @@ module Azure::ARM::DataLakeAnalytics # Creates an Azure Data Lake Analytics account management client. # class StorageAccounts - include MsRestAzure # # Creates and initializes a new instance of the StorageAccounts class. @@ -57,7 +56,7 @@ def add(resource_group_name, account_name, storage_account_name, parameters, cus # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def add_with_http_info(resource_group_name, account_name, storage_account_name, parameters, custom_headers = nil) add_async(resource_group_name, account_name, storage_account_name, parameters, custom_headers).value! @@ -91,10 +90,6 @@ def add_async(resource_group_name, account_name, storage_account_name, parameter request_headers = {} - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request @@ -122,10 +117,9 @@ def add_async(resource_group_name, account_name, storage_account_name, parameter response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end @@ -169,7 +163,7 @@ def update(resource_group_name, account_name, storage_account_name, parameters = # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def update_with_http_info(resource_group_name, account_name, storage_account_name, parameters = nil, custom_headers = nil) update_async(resource_group_name, account_name, storage_account_name, parameters, custom_headers).value! @@ -202,10 +196,6 @@ def update_async(resource_group_name, account_name, storage_account_name, parame request_headers = {} - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request @@ -233,10 +223,9 @@ def update_async(resource_group_name, account_name, storage_account_name, parame response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end @@ -276,7 +265,7 @@ def delete(resource_group_name, account_name, storage_account_name, custom_heade # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def delete_with_http_info(resource_group_name, account_name, storage_account_name, custom_headers = nil) delete_async(resource_group_name, account_name, storage_account_name, custom_headers).value! @@ -306,10 +295,6 @@ def delete_async(resource_group_name, account_name, storage_account_name, custom request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}' request_url = @base_url || @client.base_url @@ -329,10 +314,9 @@ def delete_async(resource_group_name, account_name, storage_account_name, custom response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end @@ -373,7 +357,7 @@ def get(resource_group_name, account_name, storage_account_name, custom_headers # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def get_with_http_info(resource_group_name, account_name, storage_account_name, custom_headers = nil) get_async(resource_group_name, account_name, storage_account_name, custom_headers).value! @@ -403,10 +387,6 @@ def get_async(resource_group_name, account_name, storage_account_name, custom_he request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}' request_url = @base_url || @client.base_url @@ -426,10 +406,9 @@ def get_async(resource_group_name, account_name, storage_account_name, custom_he response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -484,7 +463,7 @@ def get_storage_container(resource_group_name, account_name, storage_account_nam # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def get_storage_container_with_http_info(resource_group_name, account_name, storage_account_name, container_name, custom_headers = nil) get_storage_container_async(resource_group_name, account_name, storage_account_name, container_name, custom_headers).value! @@ -517,10 +496,6 @@ def get_storage_container_async(resource_group_name, account_name, storage_accou request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers/{containerName}' request_url = @base_url || @client.base_url @@ -540,10 +515,9 @@ def get_storage_container_async(resource_group_name, account_name, storage_accou response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -575,11 +549,11 @@ def get_storage_container_async(resource_group_name, account_name, storage_accou # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [ListStorageContainersResult] operation results. # def list_storage_containers(resource_group_name, account_name, storage_account_name, custom_headers = nil) - first_page = list_storage_containers_as_lazy(resource_group_name, account_name, storage_account_name, custom_headers) - first_page.get_all_items + response = list_storage_containers_async(resource_group_name, account_name, storage_account_name, custom_headers).value! + response.body unless response.nil? end # @@ -596,7 +570,7 @@ def list_storage_containers(resource_group_name, account_name, storage_account_n # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def list_storage_containers_with_http_info(resource_group_name, account_name, storage_account_name, custom_headers = nil) list_storage_containers_async(resource_group_name, account_name, storage_account_name, custom_headers).value! @@ -627,10 +601,6 @@ def list_storage_containers_async(resource_group_name, account_name, storage_acc request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers' request_url = @base_url || @client.base_url @@ -650,10 +620,9 @@ def list_storage_containers_async(resource_group_name, account_name, storage_acc response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -686,11 +655,11 @@ def list_storage_containers_async(resource_group_name, account_name, storage_acc # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [ListSasTokensResult] operation results. # def list_sas_tokens(resource_group_name, account_name, storage_account_name, container_name, custom_headers = nil) - first_page = list_sas_tokens_as_lazy(resource_group_name, account_name, storage_account_name, container_name, custom_headers) - first_page.get_all_items + response = list_sas_tokens_async(resource_group_name, account_name, storage_account_name, container_name, custom_headers).value! + response.body unless response.nil? end # @@ -708,7 +677,7 @@ def list_sas_tokens(resource_group_name, account_name, storage_account_name, con # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def list_sas_tokens_with_http_info(resource_group_name, account_name, storage_account_name, container_name, custom_headers = nil) list_sas_tokens_async(resource_group_name, account_name, storage_account_name, container_name, custom_headers).value! @@ -741,10 +710,6 @@ def list_sas_tokens_async(resource_group_name, account_name, storage_account_nam request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers/{containerName}/listSasTokens' request_url = @base_url || @client.base_url @@ -764,10 +729,9 @@ def list_sas_tokens_async(resource_group_name, account_name, storage_account_nam response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -811,11 +775,12 @@ def list_sas_tokens_async(resource_group_name, account_name, storage_account_nam # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [DataLakeAnalyticsAccountListStorageAccountsResult] operation + # results. # def list_by_account(resource_group_name, account_name, filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil) - first_page = list_by_account_as_lazy(resource_group_name, account_name, filter, top, skip, select, orderby, count, custom_headers) - first_page.get_all_items + response = list_by_account_async(resource_group_name, account_name, filter, top, skip, select, orderby, count, custom_headers).value! + response.body unless response.nil? end # @@ -844,7 +809,7 @@ def list_by_account(resource_group_name, account_name, filter = nil, top = nil, # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def list_by_account_with_http_info(resource_group_name, account_name, filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil) list_by_account_async(resource_group_name, account_name, filter, top, skip, select, orderby, count, custom_headers).value! @@ -886,10 +851,6 @@ def list_by_account_async(resource_group_name, account_name, filter = nil, top = request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/' request_url = @base_url || @client.base_url @@ -909,287 +870,9 @@ def list_by_account_async(resource_group_name, account_name, filter = nil, top = response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::DataLakeAnalytics::Models::DataLakeAnalyticsAccountListStorageAccountsResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Lists the Azure Storage containers, if any, associated with the specified - # Data Lake Analytics and Azure Storage account combination. The response - # includes a link to the next page of results, if any. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [ListStorageContainersResult] operation results. - # - def list_storage_containers_next(next_page_link, custom_headers = nil) - response = list_storage_containers_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? - end - - # - # Lists the Azure Storage containers, if any, associated with the specified - # Data Lake Analytics and Azure Storage account combination. The response - # includes a link to the next page of results, if any. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_storage_containers_next_with_http_info(next_page_link, custom_headers = nil) - list_storage_containers_next_async(next_page_link, custom_headers).value! - end - - # - # Lists the Azure Storage containers, if any, associated with the specified - # Data Lake Analytics and Azure Storage account combination. The response - # includes a link to the next page of results, if any. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def list_storage_containers_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' - - request_url = @base_url || @client.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::DataLakeAnalytics::Models::ListStorageContainersResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Gets the SAS token associated with the specified Data Lake Analytics and - # Azure Storage account and container combination. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [ListSasTokensResult] operation results. - # - def list_sas_tokens_next(next_page_link, custom_headers = nil) - response = list_sas_tokens_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? - end - - # - # Gets the SAS token associated with the specified Data Lake Analytics and - # Azure Storage account and container combination. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_sas_tokens_next_with_http_info(next_page_link, custom_headers = nil) - list_sas_tokens_next_async(next_page_link, custom_headers).value! - end - - # - # Gets the SAS token associated with the specified Data Lake Analytics and - # Azure Storage account and container combination. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def list_sas_tokens_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' - - request_url = @base_url || @client.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:post, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::DataLakeAnalytics::Models::ListSasTokensResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Gets the first page of Azure Storage accounts, if any, linked to the - # specified Data Lake Analytics account. The response includes a link to the - # next page, if any. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataLakeAnalyticsAccountListStorageAccountsResult] operation - # results. - # - def list_by_account_next(next_page_link, custom_headers = nil) - response = list_by_account_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? - end - - # - # Gets the first page of Azure Storage accounts, if any, linked to the - # specified Data Lake Analytics account. The response includes a link to the - # next page, if any. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_by_account_next_with_http_info(next_page_link, custom_headers = nil) - list_by_account_next_async(next_page_link, custom_headers).value! - end - - # - # Gets the first page of Azure Storage accounts, if any, linked to the - # specified Data Lake Analytics account. The response includes a link to the - # next page, if any. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def list_by_account_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' - - request_url = @base_url || @client.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -1207,102 +890,5 @@ def list_by_account_next_async(next_page_link, custom_headers = nil) promise.execute end - # - # Lists the Azure Storage containers, if any, associated with the specified - # Data Lake Analytics and Azure Storage account combination. The response - # includes a link to the next page of results, if any. - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Analytics account. - # @param account_name [String] The name of the Data Lake Analytics account for - # which to list Azure Storage blob containers. - # @param storage_account_name [String] The name of the Azure storage account - # from which to list blob containers. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [ListStorageContainersResult] which provide lazy access to pages of - # the response. - # - def list_storage_containers_as_lazy(resource_group_name, account_name, storage_account_name, custom_headers = nil) - response = list_storage_containers_async(resource_group_name, account_name, storage_account_name, custom_headers).value! - unless response.nil? - page = response.body - page.next_method = Proc.new do |next_page_link| - list_storage_containers_next_async(next_page_link, custom_headers) - end - page - end - end - - # - # Gets the SAS token associated with the specified Data Lake Analytics and - # Azure Storage account and container combination. - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Analytics account. - # @param account_name [String] The name of the Data Lake Analytics account from - # which an Azure Storage account's SAS token is being requested. - # @param storage_account_name [String] The name of the Azure storage account - # for which the SAS token is being requested. - # @param container_name [String] The name of the Azure storage container for - # which the SAS token is being requested. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [ListSasTokensResult] which provide lazy access to pages of the - # response. - # - def list_sas_tokens_as_lazy(resource_group_name, account_name, storage_account_name, container_name, custom_headers = nil) - response = list_sas_tokens_async(resource_group_name, account_name, storage_account_name, container_name, custom_headers).value! - unless response.nil? - page = response.body - page.next_method = Proc.new do |next_page_link| - list_sas_tokens_next_async(next_page_link, custom_headers) - end - page - end - end - - # - # Gets the first page of Azure Storage accounts, if any, linked to the - # specified Data Lake Analytics account. The response includes a link to the - # next page, if any. - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Analytics account. - # @param account_name [String] The name of the Data Lake Analytics account for - # which to list Azure Storage accounts. - # @param filter [String] The OData filter. Optional. - # @param top [Integer] The number of items to return. Optional. - # @param skip [Integer] The number of items to skip over before returning - # elements. Optional. - # @param select [String] OData Select statement. Limits the properties on each - # entry to just those requested, e.g. - # Categories?$select=CategoryName,Description. Optional. - # @param orderby [String] OrderBy clause. One or more comma-separated - # expressions with an optional "asc" (the default) or "desc" depending on the - # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName - # desc. Optional. - # @param count [Boolean] The Boolean value of true or false to request a count - # of the matching resources included with the resources in the response, e.g. - # Categories?$count=true. Optional. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataLakeAnalyticsAccountListStorageAccountsResult] which provide - # lazy access to pages of the response. - # - def list_by_account_as_lazy(resource_group_name, account_name, filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil) - response = list_by_account_async(resource_group_name, account_name, filter, top, skip, select, orderby, count, custom_headers).value! - unless response.nil? - page = response.body - page.next_method = Proc.new do |next_page_link| - list_by_account_next_async(next_page_link, custom_headers) - end - page - end - end - end end diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/version.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/version.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store.rb old mode 100755 new mode 100644 index 612c2b80e6..8656e830c9 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store.rb @@ -17,7 +17,6 @@ require 'concurrent' require 'ms_rest' require 'generated/azure_mgmt_datalake_store/module_definition' -require 'ms_rest_azure' module Azure::ARM::DataLakeStore autoload :FirewallRules, 'generated/azure_mgmt_datalake_store/firewall_rules.rb' @@ -26,19 +25,20 @@ module Azure::ARM::DataLakeStore autoload :DataLakeStoreAccountManagementClient, 'generated/azure_mgmt_datalake_store/data_lake_store_account_management_client.rb' module Models + autoload :EncryptionConfig, 'generated/azure_mgmt_datalake_store/models/encryption_config.rb' autoload :UpdateKeyVaultMetaInfo, 'generated/azure_mgmt_datalake_store/models/update_key_vault_meta_info.rb' + autoload :KeyVaultMetaInfo, 'generated/azure_mgmt_datalake_store/models/key_vault_meta_info.rb' autoload :UpdateFirewallRuleParameters, 'generated/azure_mgmt_datalake_store/models/update_firewall_rule_parameters.rb' + autoload :SubResource, 'generated/azure_mgmt_datalake_store/models/sub_resource.rb' + autoload :Resource, 'generated/azure_mgmt_datalake_store/models/resource.rb' + autoload :DataLakeStoreFirewallRuleListResult, 'generated/azure_mgmt_datalake_store/models/data_lake_store_firewall_rule_list_result.rb' autoload :UpdateEncryptionConfig, 'generated/azure_mgmt_datalake_store/models/update_encryption_config.rb' autoload :UpdateTrustedIdProviderParameters, 'generated/azure_mgmt_datalake_store/models/update_trusted_id_provider_parameters.rb' autoload :DataLakeStoreAccountUpdateParameters, 'generated/azure_mgmt_datalake_store/models/data_lake_store_account_update_parameters.rb' - autoload :DataLakeStoreTrustedIdProviderListResult, 'generated/azure_mgmt_datalake_store/models/data_lake_store_trusted_id_provider_list_result.rb' - autoload :DataLakeStoreFirewallRuleListResult, 'generated/azure_mgmt_datalake_store/models/data_lake_store_firewall_rule_list_result.rb' autoload :EncryptionIdentity, 'generated/azure_mgmt_datalake_store/models/encryption_identity.rb' - autoload :EncryptionConfig, 'generated/azure_mgmt_datalake_store/models/encryption_config.rb' - autoload :SubResource, 'generated/azure_mgmt_datalake_store/models/sub_resource.rb' - autoload :KeyVaultMetaInfo, 'generated/azure_mgmt_datalake_store/models/key_vault_meta_info.rb' - autoload :DataLakeStoreAccountListResult, 'generated/azure_mgmt_datalake_store/models/data_lake_store_account_list_result.rb' autoload :ErrorDetails, 'generated/azure_mgmt_datalake_store/models/error_details.rb' + autoload :DataLakeStoreTrustedIdProviderListResult, 'generated/azure_mgmt_datalake_store/models/data_lake_store_trusted_id_provider_list_result.rb' + autoload :DataLakeStoreAccountListResult, 'generated/azure_mgmt_datalake_store/models/data_lake_store_account_list_result.rb' autoload :FirewallRule, 'generated/azure_mgmt_datalake_store/models/firewall_rule.rb' autoload :TrustedIdProvider, 'generated/azure_mgmt_datalake_store/models/trusted_id_provider.rb' autoload :DataLakeStoreAccount, 'generated/azure_mgmt_datalake_store/models/data_lake_store_account.rb' diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/account.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/account.rb old mode 100755 new mode 100644 index 6641f9e895..a1a8ce9321 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/account.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/account.rb @@ -8,7 +8,6 @@ module Azure::ARM::DataLakeStore # Creates an Azure Data Lake Store account management client. # class Account - include MsRestAzure # # Creates and initializes a new instance of the Account class. @@ -39,6 +38,8 @@ def create(resource_group_name, name, parameters, custom_headers = nil) response.body unless response.nil? end + # + # Creates the specified Data Lake Store account. # # @param resource_group_name [String] The name of the Azure resource group that # contains the Data Lake Store account. @@ -48,25 +49,90 @@ def create(resource_group_name, name, parameters, custom_headers = nil) # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Concurrent::Promise] promise which provides async access to http - # response. + # @return [MsRest::HttpOperationResponse] HTTP response information. + # + def create_with_http_info(resource_group_name, name, parameters, custom_headers = nil) + create_async(resource_group_name, name, parameters, custom_headers).value! + end + + # + # Creates the specified Data Lake Store account. + # + # @param resource_group_name [String] The name of the Azure resource group that + # contains the Data Lake Store account. + # @param name [String] The name of the Data Lake Store account to create. + # @param parameters [DataLakeStoreAccount] Parameters supplied to create the + # Data Lake Store account. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def create_async(resource_group_name, name, parameters, custom_headers = nil) - # Send request - promise = begin_create_async(resource_group_name, name, parameters, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::DataLakeStore::Models::DataLakeStoreAccount.mapper() - parsed_response = @client.deserialize(result_mapper, parsed_response) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::DataLakeStore::Models::DataLakeStoreAccount.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{name}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::DataLakeStore::Models::DataLakeStoreAccount.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::DataLakeStore::Models::DataLakeStoreAccount.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end end - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) + result end - promise + promise.execute end # @@ -87,6 +153,8 @@ def update(resource_group_name, name, parameters, custom_headers = nil) response.body unless response.nil? end + # + # Updates the specified Data Lake Store account information. # # @param resource_group_name [String] The name of the Azure resource group that # contains the Data Lake Store account. @@ -96,25 +164,90 @@ def update(resource_group_name, name, parameters, custom_headers = nil) # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Concurrent::Promise] promise which provides async access to http - # response. + # @return [MsRest::HttpOperationResponse] HTTP response information. + # + def update_with_http_info(resource_group_name, name, parameters, custom_headers = nil) + update_async(resource_group_name, name, parameters, custom_headers).value! + end + + # + # Updates the specified Data Lake Store account information. + # + # @param resource_group_name [String] The name of the Azure resource group that + # contains the Data Lake Store account. + # @param name [String] The name of the Data Lake Store account to update. + # @param parameters [DataLakeStoreAccountUpdateParameters] Parameters supplied + # to update the Data Lake Store account. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def update_async(resource_group_name, name, parameters, custom_headers = nil) - # Send request - promise = begin_update_async(resource_group_name, name, parameters, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::DataLakeStore::Models::DataLakeStoreAccount.mapper() - parsed_response = @client.deserialize(result_mapper, parsed_response) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::DataLakeStore::Models::DataLakeStoreAccountUpdateParameters.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{name}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::DataLakeStore::Models::DataLakeStoreAccount.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::DataLakeStore::Models::DataLakeStoreAccount.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end end - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) + result end - promise + promise.execute end # @@ -126,11 +259,14 @@ def update_async(resource_group_name, name, parameters, custom_headers = nil) # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # def delete(resource_group_name, name, custom_headers = nil) response = delete_async(resource_group_name, name, custom_headers).value! nil end + # + # Deletes the specified Data Lake Store account. # # @param resource_group_name [String] The name of the Azure resource group that # contains the Data Lake Store account. @@ -138,23 +274,58 @@ def delete(resource_group_name, name, custom_headers = nil) # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Concurrent::Promise] promise which provides async access to http - # response. + # @return [MsRest::HttpOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, name, custom_headers = nil) + delete_async(resource_group_name, name, custom_headers).value! + end + + # + # Deletes the specified Data Lake Store account. + # + # @param resource_group_name [String] The name of the Azure resource group that + # contains the Data Lake Store account. + # @param name [String] The name of the Data Lake Store account to delete. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def delete_async(resource_group_name, name, custom_headers = nil) - # Send request - promise = begin_delete_async(resource_group_name, name, custom_headers) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{name}' - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 204 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) + + result end - promise + promise.execute end # @@ -182,7 +353,7 @@ def get(resource_group_name, name, custom_headers = nil) # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def get_with_http_info(resource_group_name, name, custom_headers = nil) get_async(resource_group_name, name, custom_headers).value! @@ -207,10 +378,6 @@ def get_async(resource_group_name, name, custom_headers = nil) request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{name}' request_url = @base_url || @client.base_url @@ -230,10 +397,9 @@ def get_async(resource_group_name, name, custom_headers = nil) response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -279,7 +445,7 @@ def enable_key_vault(resource_group_name, account_name, custom_headers = nil) # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def enable_key_vault_with_http_info(resource_group_name, account_name, custom_headers = nil) enable_key_vault_async(resource_group_name, account_name, custom_headers).value! @@ -306,10 +472,6 @@ def enable_key_vault_async(resource_group_name, account_name, custom_headers = n request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/enableKeyVault' request_url = @base_url || @client.base_url @@ -329,10 +491,9 @@ def enable_key_vault_async(resource_group_name, account_name, custom_headers = n response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end @@ -363,11 +524,11 @@ def enable_key_vault_async(resource_group_name, account_name, custom_headers = n # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [DataLakeStoreAccountListResult] operation results. # def list_by_resource_group(resource_group_name, filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil) - first_page = list_by_resource_group_as_lazy(resource_group_name, filter, top, skip, select, orderby, count, custom_headers) - first_page.get_all_items + response = list_by_resource_group_async(resource_group_name, filter, top, skip, select, orderby, count, custom_headers).value! + response.body unless response.nil? end # @@ -393,7 +554,7 @@ def list_by_resource_group(resource_group_name, filter = nil, top = nil, skip = # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def list_by_resource_group_with_http_info(resource_group_name, filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil) list_by_resource_group_async(resource_group_name, filter, top, skip, select, orderby, count, custom_headers).value! @@ -431,10 +592,6 @@ def list_by_resource_group_async(resource_group_name, filter = nil, top = nil, s request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts' request_url = @base_url || @client.base_url @@ -454,10 +611,9 @@ def list_by_resource_group_async(resource_group_name, filter = nil, top = nil, s response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -496,11 +652,11 @@ def list_by_resource_group_async(resource_group_name, filter = nil, top = nil, s # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [DataLakeStoreAccountListResult] operation results. # def list(filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil) - first_page = list_as_lazy(filter, top, skip, select, orderby, count, custom_headers) - first_page.get_all_items + response = list_async(filter, top, skip, select, orderby, count, custom_headers).value! + response.body unless response.nil? end # @@ -524,7 +680,7 @@ def list(filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def list_with_http_info(filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil) list_async(filter, top, skip, select, orderby, count, custom_headers).value! @@ -559,10 +715,6 @@ def list_async(filter = nil, top = nil, skip = nil, select = nil, orderby = nil, request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.DataLakeStore/accounts' request_url = @base_url || @client.base_url @@ -582,10 +734,9 @@ def list_async(filter = nil, top = nil, skip = nil, select = nil, orderby = nil, response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -603,580 +754,5 @@ def list_async(filter = nil, top = nil, skip = nil, select = nil, orderby = nil, promise.execute end - # - # Creates the specified Data Lake Store account. - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Store account. - # @param name [String] The name of the Data Lake Store account to create. - # @param parameters [DataLakeStoreAccount] Parameters supplied to create the - # Data Lake Store account. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataLakeStoreAccount] operation results. - # - def begin_create(resource_group_name, name, parameters, custom_headers = nil) - response = begin_create_async(resource_group_name, name, parameters, custom_headers).value! - response.body unless response.nil? - end - - # - # Creates the specified Data Lake Store account. - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Store account. - # @param name [String] The name of the Data Lake Store account to create. - # @param parameters [DataLakeStoreAccount] Parameters supplied to create the - # Data Lake Store account. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def begin_create_with_http_info(resource_group_name, name, parameters, custom_headers = nil) - begin_create_async(resource_group_name, name, parameters, custom_headers).value! - end - - # - # Creates the specified Data Lake Store account. - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Store account. - # @param name [String] The name of the Data Lake Store account to create. - # @param parameters [DataLakeStoreAccount] Parameters supplied to create the - # Data Lake Store account. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def begin_create_async(resource_group_name, name, parameters, custom_headers = nil) - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'parameters is nil' if parameters.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::DataLakeStore::Models::DataLakeStoreAccount.mapper() - request_content = @client.serialize(request_mapper, parameters) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{name}' - - request_url = @base_url || @client.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => @client.api_version}, - body: request_content, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:put, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 201 || status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 201 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::DataLakeStore::Models::DataLakeStoreAccount.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::DataLakeStore::Models::DataLakeStoreAccount.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Updates the specified Data Lake Store account information. - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Store account. - # @param name [String] The name of the Data Lake Store account to update. - # @param parameters [DataLakeStoreAccountUpdateParameters] Parameters supplied - # to update the Data Lake Store account. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataLakeStoreAccount] operation results. - # - def begin_update(resource_group_name, name, parameters, custom_headers = nil) - response = begin_update_async(resource_group_name, name, parameters, custom_headers).value! - response.body unless response.nil? - end - - # - # Updates the specified Data Lake Store account information. - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Store account. - # @param name [String] The name of the Data Lake Store account to update. - # @param parameters [DataLakeStoreAccountUpdateParameters] Parameters supplied - # to update the Data Lake Store account. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def begin_update_with_http_info(resource_group_name, name, parameters, custom_headers = nil) - begin_update_async(resource_group_name, name, parameters, custom_headers).value! - end - - # - # Updates the specified Data Lake Store account information. - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Store account. - # @param name [String] The name of the Data Lake Store account to update. - # @param parameters [DataLakeStoreAccountUpdateParameters] Parameters supplied - # to update the Data Lake Store account. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def begin_update_async(resource_group_name, name, parameters, custom_headers = nil) - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'parameters is nil' if parameters.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::DataLakeStore::Models::DataLakeStoreAccountUpdateParameters.mapper() - request_content = @client.serialize(request_mapper, parameters) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{name}' - - request_url = @base_url || @client.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => @client.api_version}, - body: request_content, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:patch, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 || status_code == 201 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::DataLakeStore::Models::DataLakeStoreAccount.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - # Deserialize Response - if status_code == 201 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::DataLakeStore::Models::DataLakeStoreAccount.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Deletes the specified Data Lake Store account. - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Store account. - # @param name [String] The name of the Data Lake Store account to delete. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # - def begin_delete(resource_group_name, name, custom_headers = nil) - response = begin_delete_async(resource_group_name, name, custom_headers).value! - nil - end - - # - # Deletes the specified Data Lake Store account. - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Store account. - # @param name [String] The name of the Data Lake Store account to delete. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def begin_delete_with_http_info(resource_group_name, name, custom_headers = nil) - begin_delete_async(resource_group_name, name, custom_headers).value! - end - - # - # Deletes the specified Data Lake Store account. - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Store account. - # @param name [String] The name of the Data Lake Store account to delete. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def begin_delete_async(resource_group_name, name, custom_headers = nil) - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{name}' - - request_url = @base_url || @client.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => @client.api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:delete, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 || status_code == 204 || status_code == 202 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - - result - end - - promise.execute - end - - # - # Lists the Data Lake Store accounts within a specific resource group. The - # response includes a link to the next page of results, if any. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataLakeStoreAccountListResult] operation results. - # - def list_by_resource_group_next(next_page_link, custom_headers = nil) - response = list_by_resource_group_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? - end - - # - # Lists the Data Lake Store accounts within a specific resource group. The - # response includes a link to the next page of results, if any. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_by_resource_group_next_with_http_info(next_page_link, custom_headers = nil) - list_by_resource_group_next_async(next_page_link, custom_headers).value! - end - - # - # Lists the Data Lake Store accounts within a specific resource group. The - # response includes a link to the next page of results, if any. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def list_by_resource_group_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' - - request_url = @base_url || @client.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::DataLakeStore::Models::DataLakeStoreAccountListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Lists the Data Lake Store accounts within the subscription. The response - # includes a link to the next page of results, if any. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataLakeStoreAccountListResult] operation results. - # - def list_next(next_page_link, custom_headers = nil) - response = list_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? - end - - # - # Lists the Data Lake Store accounts within the subscription. The response - # includes a link to the next page of results, if any. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_next_with_http_info(next_page_link, custom_headers = nil) - list_next_async(next_page_link, custom_headers).value! - end - - # - # Lists the Data Lake Store accounts within the subscription. The response - # includes a link to the next page of results, if any. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def list_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' - - request_url = @base_url || @client.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::DataLakeStore::Models::DataLakeStoreAccountListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Lists the Data Lake Store accounts within a specific resource group. The - # response includes a link to the next page of results, if any. - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Store account(s). - # @param filter [String] OData filter. Optional. - # @param top [Integer] The number of items to return. Optional. - # @param skip [Integer] The number of items to skip over before returning - # elements. Optional. - # @param select [String] OData Select statement. Limits the properties on each - # entry to just those requested, e.g. - # Categories?$select=CategoryName,Description. Optional. - # @param orderby [String] OrderBy clause. One or more comma-separated - # expressions with an optional "asc" (the default) or "desc" depending on the - # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName - # desc. Optional. - # @param count [Boolean] A Boolean value of true or false to request a count of - # the matching resources included with the resources in the response, e.g. - # Categories?$count=true. Optional. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataLakeStoreAccountListResult] which provide lazy access to pages - # of the response. - # - def list_by_resource_group_as_lazy(resource_group_name, filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil) - response = list_by_resource_group_async(resource_group_name, filter, top, skip, select, orderby, count, custom_headers).value! - unless response.nil? - page = response.body - page.next_method = Proc.new do |next_page_link| - list_by_resource_group_next_async(next_page_link, custom_headers) - end - page - end - end - - # - # Lists the Data Lake Store accounts within the subscription. The response - # includes a link to the next page of results, if any. - # - # @param filter [String] OData filter. Optional. - # @param top [Integer] The number of items to return. Optional. - # @param skip [Integer] The number of items to skip over before returning - # elements. Optional. - # @param select [String] OData Select statement. Limits the properties on each - # entry to just those requested, e.g. - # Categories?$select=CategoryName,Description. Optional. - # @param orderby [String] OrderBy clause. One or more comma-separated - # expressions with an optional "asc" (the default) or "desc" depending on the - # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName - # desc. Optional. - # @param count [Boolean] The Boolean value of true or false to request a count - # of the matching resources included with the resources in the response, e.g. - # Categories?$count=true. Optional. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataLakeStoreAccountListResult] which provide lazy access to pages - # of the response. - # - def list_as_lazy(filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil) - response = list_async(filter, top, skip, select, orderby, count, custom_headers).value! - unless response.nil? - page = response.body - page.next_method = Proc.new do |next_page_link| - list_next_async(next_page_link, custom_headers) - end - page - end - end - end end diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/data_lake_store_account_management_client.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/data_lake_store_account_management_client.rb old mode 100755 new mode 100644 index a905495e29..54ed9b1a4f --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/data_lake_store_account_management_client.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/data_lake_store_account_management_client.rb @@ -7,34 +7,19 @@ module Azure::ARM::DataLakeStore # # A service client - single point of access to the REST API. # - class DataLakeStoreAccountManagementClient < MsRestAzure::AzureServiceClient - include MsRestAzure - include MsRestAzure::Serialization + class DataLakeStoreAccountManagementClient < MsRest::ServiceClient + include MsRest::Serialization # @return [String] the base URI of the service. attr_accessor :base_url - # @return Credentials needed for the client to connect to Azure. - attr_reader :credentials - # @return [String] Gets subscription credentials which uniquely identify # Microsoft Azure subscription. The subscription ID forms part of the URI # for every service call. attr_accessor :subscription_id # @return [String] Client Api Version. - attr_reader :api_version - - # @return [String] Gets or sets the preferred language for the response. - attr_accessor :accept_language - - # @return [Integer] Gets or sets the retry timeout in seconds for Long - # Running Operations. Default value is 30. - attr_accessor :long_running_operation_retry_timeout - - # @return [Boolean] When set to true a unique x-ms-client-request-id value - # is generated and included in each request. Default is true. - attr_accessor :generate_client_request_id + attr_accessor :api_version # @return [FirewallRules] firewall_rules attr_reader :firewall_rules @@ -61,10 +46,6 @@ def initialize(credentials = nil, base_url = nil, options = nil) @firewall_rules = FirewallRules.new(self) @trusted_id_providers = TrustedIdProviders.new(self) @account = Account.new(self) - @api_version = '2016-11-01' - @accept_language = 'en-US' - @long_running_operation_retry_timeout = 30 - @generate_client_request_id = true add_telemetry end @@ -94,7 +75,7 @@ def make_request(method, path, options = {}) # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete. # @param path [String] the path, relative to {base_url}. # @param options [Hash{String=>String}] specifying any request options like :body. - # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status. + # @return [MsRest::HttpOperationResponse] Operation response containing the request, response and status. # def make_request_with_http_info(method, path, options = {}) result = make_request_async(method, path, options).value! @@ -116,7 +97,6 @@ def make_request_async(method, path, options = {}) request_url = options[:base_url] || @base_url request_headers = @request_headers - request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil? options.merge!({headers: request_headers.merge(options[:headers] || {})}) options.merge!({credentials: @credentials}) unless @credentials.nil? diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/firewall_rules.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/firewall_rules.rb old mode 100755 new mode 100644 index c2add56c96..2f91524b09 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/firewall_rules.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/firewall_rules.rb @@ -8,7 +8,6 @@ module Azure::ARM::DataLakeStore # Creates an Azure Data Lake Store account management client. # class FirewallRules - include MsRestAzure # # Creates and initializes a new instance of the FirewallRules class. @@ -58,7 +57,7 @@ def create_or_update(resource_group_name, account_name, firewall_rule_name, para # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def create_or_update_with_http_info(resource_group_name, account_name, firewall_rule_name, parameters, custom_headers = nil) create_or_update_async(resource_group_name, account_name, firewall_rule_name, parameters, custom_headers).value! @@ -92,10 +91,6 @@ def create_or_update_async(resource_group_name, account_name, firewall_rule_name request_headers = {} - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request @@ -123,10 +118,9 @@ def create_or_update_async(resource_group_name, account_name, firewall_rule_name response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -177,7 +171,7 @@ def update(resource_group_name, account_name, firewall_rule_name, parameters = n # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def update_with_http_info(resource_group_name, account_name, firewall_rule_name, parameters = nil, custom_headers = nil) update_async(resource_group_name, account_name, firewall_rule_name, parameters, custom_headers).value! @@ -208,10 +202,6 @@ def update_async(resource_group_name, account_name, firewall_rule_name, paramete request_headers = {} - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request @@ -239,10 +229,9 @@ def update_async(resource_group_name, account_name, firewall_rule_name, paramete response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -290,7 +279,7 @@ def delete(resource_group_name, account_name, firewall_rule_name, custom_headers # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def delete_with_http_info(resource_group_name, account_name, firewall_rule_name, custom_headers = nil) delete_async(resource_group_name, account_name, firewall_rule_name, custom_headers).value! @@ -319,10 +308,6 @@ def delete_async(resource_group_name, account_name, firewall_rule_name, custom_h request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}' request_url = @base_url || @client.base_url @@ -342,10 +327,9 @@ def delete_async(resource_group_name, account_name, firewall_rule_name, custom_h response_content = http_response.body unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end @@ -382,7 +366,7 @@ def get(resource_group_name, account_name, firewall_rule_name, custom_headers = # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def get_with_http_info(resource_group_name, account_name, firewall_rule_name, custom_headers = nil) get_async(resource_group_name, account_name, firewall_rule_name, custom_headers).value! @@ -410,10 +394,6 @@ def get_async(resource_group_name, account_name, firewall_rule_name, custom_head request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}' request_url = @base_url || @client.base_url @@ -433,10 +413,9 @@ def get_async(resource_group_name, account_name, firewall_rule_name, custom_head response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -465,11 +444,11 @@ def get_async(resource_group_name, account_name, firewall_rule_name, custom_head # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [DataLakeStoreFirewallRuleListResult] operation results. # def list_by_account(resource_group_name, account_name, custom_headers = nil) - first_page = list_by_account_as_lazy(resource_group_name, account_name, custom_headers) - first_page.get_all_items + response = list_by_account_async(resource_group_name, account_name, custom_headers).value! + response.body unless response.nil? end # @@ -483,7 +462,7 @@ def list_by_account(resource_group_name, account_name, custom_headers = nil) # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def list_by_account_with_http_info(resource_group_name, account_name, custom_headers = nil) list_by_account_async(resource_group_name, account_name, custom_headers).value! @@ -510,10 +489,6 @@ def list_by_account_async(resource_group_name, account_name, custom_headers = ni request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules' request_url = @base_url || @client.base_url @@ -533,10 +508,9 @@ def list_by_account_async(resource_group_name, account_name, custom_headers = ni response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -554,120 +528,5 @@ def list_by_account_async(resource_group_name, account_name, custom_headers = ni promise.execute end - # - # Lists the Data Lake Store firewall rules within the specified Data Lake Store - # account. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataLakeStoreFirewallRuleListResult] operation results. - # - def list_by_account_next(next_page_link, custom_headers = nil) - response = list_by_account_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? - end - - # - # Lists the Data Lake Store firewall rules within the specified Data Lake Store - # account. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_by_account_next_with_http_info(next_page_link, custom_headers = nil) - list_by_account_next_async(next_page_link, custom_headers).value! - end - - # - # Lists the Data Lake Store firewall rules within the specified Data Lake Store - # account. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def list_by_account_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' - - request_url = @base_url || @client.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::DataLakeStore::Models::DataLakeStoreFirewallRuleListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Lists the Data Lake Store firewall rules within the specified Data Lake Store - # account. - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Store account. - # @param account_name [String] The name of the Data Lake Store account from - # which to get the firewall rules. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataLakeStoreFirewallRuleListResult] which provide lazy access to - # pages of the response. - # - def list_by_account_as_lazy(resource_group_name, account_name, custom_headers = nil) - response = list_by_account_async(resource_group_name, account_name, custom_headers).value! - unless response.nil? - page = response.body - page.next_method = Proc.new do |next_page_link| - list_by_account_next_async(next_page_link, custom_headers) - end - page - end - end - end end diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account.rb old mode 100755 new mode 100644 index 79f8670c6c..ab17e7fcd5 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account.rb @@ -8,11 +8,7 @@ module Models # # Data Lake Store account information # - class DataLakeStoreAccount < MsRestAzure::Resource - - include MsRestAzure - - include MsRest::JSONable + class DataLakeStoreAccount < Resource # @return [EncryptionIdentity] The Key Vault encryption identity, if any. attr_accessor :identity diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_basic.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_basic.rb index a66ec6ec40..6a405bde2a 100644 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_basic.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_basic.rb @@ -8,11 +8,7 @@ module Models # # Basic Data Lake Store account information, returned on list calls. # - class DataLakeStoreAccountBasic < MsRestAzure::Resource - - include MsRestAzure - - include MsRest::JSONable + class DataLakeStoreAccountBasic < Resource # @return [DataLakeStoreAccountStatus] the provisioning status of the # Data Lake Store account. Possible values include: 'Failed', 'Creating', # 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_list_result.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_list_result.rb old mode 100755 new mode 100644 index 6951b244a4..0c04f90e4f --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_list_result.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_list_result.rb @@ -9,10 +9,6 @@ module Models # Data Lake Store account list information response. # class DataLakeStoreAccountListResult - - include MsRestAzure - - include MsRest::JSONable # @return [Array] the results of the list # operation attr_accessor :value @@ -20,37 +16,6 @@ class DataLakeStoreAccountListResult # @return [String] the link (url) to the next page of results. attr_accessor :next_link - # return [Proc] with next page method call. - attr_accessor :next_method - - # - # Gets the rest of the items for the request, enabling auto-pagination. - # - # @return [Array] operation results. - # - def get_all_items - items = @value - page = self - while page.next_link != nil do - page = page.get_next_page - items.concat(page.value) - end - items - end - - # - # Gets the next page of results. - # - # @return [DataLakeStoreAccountListResult] with next page content. - # - def get_next_page - response = @next_method.call(@next_link).value! unless @next_method.nil? - unless response.nil? - @next_link = response.body.next_link - @value = response.body.value - self - end - end # # Mapper for DataLakeStoreAccountListResult class as Ruby Hash. diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_state.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_state.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_status.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_status.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_update_parameters.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_update_parameters.rb old mode 100755 new mode 100644 index 33c067b3d0..47d672a0e7 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_update_parameters.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_update_parameters.rb @@ -9,10 +9,6 @@ module Models # Data Lake Store account information to update # class DataLakeStoreAccountUpdateParameters - - include MsRestAzure - - include MsRest::JSONable # @return [Hash{String => String}] Resource tags attr_accessor :tags diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_firewall_rule_list_result.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_firewall_rule_list_result.rb old mode 100755 new mode 100644 index 597649790d..1ff3621177 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_firewall_rule_list_result.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_firewall_rule_list_result.rb @@ -9,47 +9,12 @@ module Models # Data Lake Store firewall rule list information. # class DataLakeStoreFirewallRuleListResult - - include MsRestAzure - - include MsRest::JSONable # @return [Array] the results of the list operation attr_accessor :value # @return [String] the link (url) to the next page of results. attr_accessor :next_link - # return [Proc] with next page method call. - attr_accessor :next_method - - # - # Gets the rest of the items for the request, enabling auto-pagination. - # - # @return [Array] operation results. - # - def get_all_items - items = @value - page = self - while page.next_link != nil do - page = page.get_next_page - items.concat(page.value) - end - items - end - - # - # Gets the next page of results. - # - # @return [DataLakeStoreFirewallRuleListResult] with next page content. - # - def get_next_page - response = @next_method.call(@next_link).value! unless @next_method.nil? - unless response.nil? - @next_link = response.body.next_link - @value = response.body.value - self - end - end # # Mapper for DataLakeStoreFirewallRuleListResult class as Ruby Hash. diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_trusted_id_provider_list_result.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_trusted_id_provider_list_result.rb old mode 100755 new mode 100644 index 88d54248f5..50b23fb4b5 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_trusted_id_provider_list_result.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_trusted_id_provider_list_result.rb @@ -9,48 +9,12 @@ module Models # Data Lake Store trusted identity provider list information. # class DataLakeStoreTrustedIdProviderListResult - - include MsRestAzure - - include MsRest::JSONable # @return [Array] the results of the list operation attr_accessor :value # @return [String] the link (url) to the next page of results. attr_accessor :next_link - # return [Proc] with next page method call. - attr_accessor :next_method - - # - # Gets the rest of the items for the request, enabling auto-pagination. - # - # @return [Array] operation results. - # - def get_all_items - items = @value - page = self - while page.next_link != nil do - page = page.get_next_page - items.concat(page.value) - end - items - end - - # - # Gets the next page of results. - # - # @return [DataLakeStoreTrustedIdProviderListResult] with next page - # content. - # - def get_next_page - response = @next_method.call(@next_link).value! unless @next_method.nil? - unless response.nil? - @next_link = response.body.next_link - @value = response.body.value - self - end - end # # Mapper for DataLakeStoreTrustedIdProviderListResult class as Ruby Hash. diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_config.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_config.rb old mode 100755 new mode 100644 index fef14f7e3e..2c639c32b2 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_config.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_config.rb @@ -9,10 +9,6 @@ module Models # The encryption configuration for the account. # class EncryptionConfig - - include MsRestAzure - - include MsRest::JSONable # @return [EncryptionConfigType] The type of encryption configuration # being used. Currently the only supported types are 'UserManaged' and # 'ServiceManaged'. Possible values include: 'UserManaged', diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_config_type.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_config_type.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_identity.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_identity.rb old mode 100755 new mode 100644 index 18e545c5f7..2a5897dc16 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_identity.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_identity.rb @@ -9,10 +9,6 @@ module Models # The encryption identity properties. # class EncryptionIdentity - - include MsRestAzure - - include MsRest::JSONable # @return [String] The type of encryption being used. Currently the only # supported type is 'SystemAssigned'. Default value: 'SystemAssigned' . attr_accessor :type diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_provisioning_state.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_provisioning_state.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_state.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_state.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/error_details.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/error_details.rb old mode 100755 new mode 100644 index edad98ac45..5d9cacc51e --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/error_details.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/error_details.rb @@ -9,10 +9,6 @@ module Models # Data Lake Store error details information # class ErrorDetails - - include MsRestAzure - - include MsRest::JSONable # @return [String] the HTTP status code or error code associated with # this error attr_accessor :code diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/firewall_allow_azure_ips_state.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/firewall_allow_azure_ips_state.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/firewall_rule.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/firewall_rule.rb old mode 100755 new mode 100644 index c52e4aacc1..97fb88c026 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/firewall_rule.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/firewall_rule.rb @@ -9,10 +9,6 @@ module Models # Data Lake Store firewall rule information # class FirewallRule < SubResource - - include MsRestAzure - - include MsRest::JSONable # @return [String] the start IP address for the firewall rule. This can # be either ipv4 or ipv6. Start and End should be in the same protocol. attr_accessor :start_ip_address diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/firewall_state.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/firewall_state.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/key_vault_meta_info.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/key_vault_meta_info.rb old mode 100755 new mode 100644 index ab178e303a..27b2361548 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/key_vault_meta_info.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/key_vault_meta_info.rb @@ -9,10 +9,6 @@ module Models # Metadata information used by account encryption. # class KeyVaultMetaInfo - - include MsRestAzure - - include MsRest::JSONable # @return [String] The resource identifier for the user managed Key Vault # being used to encrypt. attr_accessor :key_vault_resource_id diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/resource.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/resource.rb new file mode 100644 index 0000000000..f367e181ef --- /dev/null +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/resource.rb @@ -0,0 +1,91 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::DataLakeStore + module Models + # + # The Resource model definition. + # + class Resource + # @return [String] Resource Id + attr_accessor :id + + # @return [String] Resource name + attr_accessor :name + + # @return [String] Resource type + attr_accessor :type + + # @return [String] Resource location + attr_accessor :location + + # @return [Hash{String => String}] Resource tags + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/sub_resource.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/sub_resource.rb old mode 100755 new mode 100644 index d08f4047b8..3764e95369 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/sub_resource.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/sub_resource.rb @@ -8,11 +8,10 @@ module Models # # The Resource model definition for a nested resource. # - class SubResource < MsRestAzure::SubResource + class SubResource + # @return [String] Resource Id + attr_accessor :id - include MsRestAzure - - include MsRest::JSONable # @return [String] Resource name attr_accessor :name diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/tier_type.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/tier_type.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/trusted_id_provider.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/trusted_id_provider.rb old mode 100755 new mode 100644 index 8b375779a0..2d6d537579 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/trusted_id_provider.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/trusted_id_provider.rb @@ -9,10 +9,6 @@ module Models # Data Lake Store Trusted Identity Provider information # class TrustedIdProvider < SubResource - - include MsRestAzure - - include MsRest::JSONable # @return [String] The URL of this trusted identity provider attr_accessor :id_provider diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/trusted_id_provider_state.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/trusted_id_provider_state.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_encryption_config.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_encryption_config.rb old mode 100755 new mode 100644 index 8c7a9323be..c76ad350a3 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_encryption_config.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_encryption_config.rb @@ -9,10 +9,6 @@ module Models # The encryption configuration used to update a user managed Key Vault key. # class UpdateEncryptionConfig - - include MsRestAzure - - include MsRest::JSONable # @return [UpdateKeyVaultMetaInfo] The updated Key Vault key to use in # user managed key rotation. attr_accessor :key_vault_meta_info diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_firewall_rule_parameters.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_firewall_rule_parameters.rb old mode 100755 new mode 100644 index 4238a3a2ee..c08b77af81 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_firewall_rule_parameters.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_firewall_rule_parameters.rb @@ -9,10 +9,6 @@ module Models # Data Lake Analytics firewall rule update parameters # class UpdateFirewallRuleParameters - - include MsRestAzure - - include MsRest::JSONable # @return [String] the start IP address for the firewall rule. This can # be either ipv4 or ipv6. Start and End should be in the same protocol. attr_accessor :start_ip_address diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_key_vault_meta_info.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_key_vault_meta_info.rb old mode 100755 new mode 100644 index 0e12cebfd0..06b582d5cd --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_key_vault_meta_info.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_key_vault_meta_info.rb @@ -9,10 +9,6 @@ module Models # The Key Vault update information used for user managed key rotation. # class UpdateKeyVaultMetaInfo - - include MsRestAzure - - include MsRest::JSONable # @return [String] The version of the user managed encryption key to # update through a key rotation. attr_accessor :encryption_key_version diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_trusted_id_provider_parameters.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_trusted_id_provider_parameters.rb old mode 100755 new mode 100644 index dc7d50ddbe..27425dd026 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_trusted_id_provider_parameters.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_trusted_id_provider_parameters.rb @@ -9,10 +9,6 @@ module Models # Data Lake Store Trusted Identity Provider update parameters # class UpdateTrustedIdProviderParameters - - include MsRestAzure - - include MsRest::JSONable # @return [String] The URL of this trusted identity provider attr_accessor :id_provider diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/module_definition.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/module_definition.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/trusted_id_providers.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/trusted_id_providers.rb old mode 100755 new mode 100644 index 459aa2dba2..02feb37029 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/trusted_id_providers.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/trusted_id_providers.rb @@ -8,7 +8,6 @@ module Azure::ARM::DataLakeStore # Creates an Azure Data Lake Store account management client. # class TrustedIdProviders - include MsRestAzure # # Creates and initializes a new instance of the TrustedIdProviders class. @@ -60,7 +59,7 @@ def create_or_update(resource_group_name, account_name, trusted_id_provider_name # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def create_or_update_with_http_info(resource_group_name, account_name, trusted_id_provider_name, parameters, custom_headers = nil) create_or_update_async(resource_group_name, account_name, trusted_id_provider_name, parameters, custom_headers).value! @@ -95,10 +94,6 @@ def create_or_update_async(resource_group_name, account_name, trusted_id_provide request_headers = {} - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request @@ -126,10 +121,9 @@ def create_or_update_async(resource_group_name, account_name, trusted_id_provide response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -182,7 +176,7 @@ def update(resource_group_name, account_name, trusted_id_provider_name, paramete # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def update_with_http_info(resource_group_name, account_name, trusted_id_provider_name, parameters = nil, custom_headers = nil) update_async(resource_group_name, account_name, trusted_id_provider_name, parameters, custom_headers).value! @@ -214,10 +208,6 @@ def update_async(resource_group_name, account_name, trusted_id_provider_name, pa request_headers = {} - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request @@ -245,10 +235,9 @@ def update_async(resource_group_name, account_name, trusted_id_provider_name, pa response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -298,7 +287,7 @@ def delete(resource_group_name, account_name, trusted_id_provider_name, custom_h # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def delete_with_http_info(resource_group_name, account_name, trusted_id_provider_name, custom_headers = nil) delete_async(resource_group_name, account_name, trusted_id_provider_name, custom_headers).value! @@ -328,10 +317,6 @@ def delete_async(resource_group_name, account_name, trusted_id_provider_name, cu request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders/{trustedIdProviderName}' request_url = @base_url || @client.base_url @@ -351,10 +336,9 @@ def delete_async(resource_group_name, account_name, trusted_id_provider_name, cu response_content = http_response.body unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end @@ -393,7 +377,7 @@ def get(resource_group_name, account_name, trusted_id_provider_name, custom_head # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def get_with_http_info(resource_group_name, account_name, trusted_id_provider_name, custom_headers = nil) get_async(resource_group_name, account_name, trusted_id_provider_name, custom_headers).value! @@ -422,10 +406,6 @@ def get_async(resource_group_name, account_name, trusted_id_provider_name, custo request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders/{trustedIdProviderName}' request_url = @base_url || @client.base_url @@ -445,10 +425,9 @@ def get_async(resource_group_name, account_name, trusted_id_provider_name, custo response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -477,11 +456,11 @@ def get_async(resource_group_name, account_name, trusted_id_provider_name, custo # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [DataLakeStoreTrustedIdProviderListResult] operation results. # def list_by_account(resource_group_name, account_name, custom_headers = nil) - first_page = list_by_account_as_lazy(resource_group_name, account_name, custom_headers) - first_page.get_all_items + response = list_by_account_async(resource_group_name, account_name, custom_headers).value! + response.body unless response.nil? end # @@ -495,7 +474,7 @@ def list_by_account(resource_group_name, account_name, custom_headers = nil) # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [MsRest::HttpOperationResponse] HTTP response information. # def list_by_account_with_http_info(resource_group_name, account_name, custom_headers = nil) list_by_account_async(resource_group_name, account_name, custom_headers).value! @@ -522,10 +501,6 @@ def list_by_account_async(resource_group_name, account_name, custom_headers = ni request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders' request_url = @base_url || @client.base_url @@ -545,10 +520,9 @@ def list_by_account_async(resource_group_name, account_name, custom_headers = ni response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin @@ -566,120 +540,5 @@ def list_by_account_async(resource_group_name, account_name, custom_headers = ni promise.execute end - # - # Lists the Data Lake Store trusted identity providers within the specified - # Data Lake Store account. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataLakeStoreTrustedIdProviderListResult] operation results. - # - def list_by_account_next(next_page_link, custom_headers = nil) - response = list_by_account_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? - end - - # - # Lists the Data Lake Store trusted identity providers within the specified - # Data Lake Store account. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_by_account_next_with_http_info(next_page_link, custom_headers = nil) - list_by_account_next_async(next_page_link, custom_headers).value! - end - - # - # Lists the Data Lake Store trusted identity providers within the specified - # Data Lake Store account. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def list_by_account_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' - - request_url = @base_url || @client.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::DataLakeStore::Models::DataLakeStoreTrustedIdProviderListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Lists the Data Lake Store trusted identity providers within the specified - # Data Lake Store account. - # - # @param resource_group_name [String] The name of the Azure resource group that - # contains the Data Lake Store account. - # @param account_name [String] The name of the Data Lake Store account from - # which to get the trusted identity providers. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataLakeStoreTrustedIdProviderListResult] which provide lazy access - # to pages of the response. - # - def list_by_account_as_lazy(resource_group_name, account_name, custom_headers = nil) - response = list_by_account_async(resource_group_name, account_name, custom_headers).value! - unless response.nil? - page = response.body - page.next_method = Proc.new do |next_page_link| - list_by_account_next_async(next_page_link, custom_headers) - end - page - end - end - end end diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/version.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/version.rb old mode 100755 new mode 100644