diff --git a/azure_sdk/lib/latest/modules/eventhub_profile_module.rb b/azure_sdk/lib/latest/modules/eventhub_profile_module.rb index 21e8886a95..95a6112c6b 100644 --- a/azure_sdk/lib/latest/modules/eventhub_profile_module.rb +++ b/azure_sdk/lib/latest/modules/eventhub_profile_module.rb @@ -12,31 +12,36 @@ module Mgmt DisasterRecoveryConfigs = Azure::EventHub::Mgmt::V2017_04_01::DisasterRecoveryConfigs EventHubs = Azure::EventHub::Mgmt::V2017_04_01::EventHubs ConsumerGroups = Azure::EventHub::Mgmt::V2017_04_01::ConsumerGroups + Regions = Azure::EventHub::Mgmt::V2017_04_01::Regions module Models + MessagingRegionsProperties = Azure::EventHub::Mgmt::V2017_04_01::Models::MessagingRegionsProperties CaptureDescription = Azure::EventHub::Mgmt::V2017_04_01::Models::CaptureDescription - Destination = Azure::EventHub::Mgmt::V2017_04_01::Models::Destination Resource = Azure::EventHub::Mgmt::V2017_04_01::Models::Resource - Operation = Azure::EventHub::Mgmt::V2017_04_01::Models::Operation ErrorResponse = Azure::EventHub::Mgmt::V2017_04_01::Models::ErrorResponse - OperationListResult = Azure::EventHub::Mgmt::V2017_04_01::Models::OperationListResult + ArmDisasterRecoveryListResult = Azure::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecoveryListResult EventHubListResult = Azure::EventHub::Mgmt::V2017_04_01::Models::EventHubListResult + MessagingRegionsListResult = Azure::EventHub::Mgmt::V2017_04_01::Models::MessagingRegionsListResult AccessKeys = Azure::EventHub::Mgmt::V2017_04_01::Models::AccessKeys - ArmDisasterRecoveryListResult = Azure::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecoveryListResult - Sku = Azure::EventHub::Mgmt::V2017_04_01::Models::Sku ConsumerGroupListResult = Azure::EventHub::Mgmt::V2017_04_01::Models::ConsumerGroupListResult - AuthorizationRuleListResult = Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRuleListResult + Destination = Azure::EventHub::Mgmt::V2017_04_01::Models::Destination CheckNameAvailabilityParameter = Azure::EventHub::Mgmt::V2017_04_01::Models::CheckNameAvailabilityParameter EHNamespaceListResult = Azure::EventHub::Mgmt::V2017_04_01::Models::EHNamespaceListResult CheckNameAvailabilityResult = Azure::EventHub::Mgmt::V2017_04_01::Models::CheckNameAvailabilityResult RegenerateAccessKeyParameters = Azure::EventHub::Mgmt::V2017_04_01::Models::RegenerateAccessKeyParameters OperationDisplay = Azure::EventHub::Mgmt::V2017_04_01::Models::OperationDisplay + AuthorizationRuleListResult = Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRuleListResult + Operation = Azure::EventHub::Mgmt::V2017_04_01::Models::Operation + Sku = Azure::EventHub::Mgmt::V2017_04_01::Models::Sku + OperationListResult = Azure::EventHub::Mgmt::V2017_04_01::Models::OperationListResult TrackedResource = Azure::EventHub::Mgmt::V2017_04_01::Models::TrackedResource EHNamespace = Azure::EventHub::Mgmt::V2017_04_01::Models::EHNamespace AuthorizationRule = Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRule Eventhub = Azure::EventHub::Mgmt::V2017_04_01::Models::Eventhub ConsumerGroup = Azure::EventHub::Mgmt::V2017_04_01::Models::ConsumerGroup ArmDisasterRecovery = Azure::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecovery + MessagingRegions = Azure::EventHub::Mgmt::V2017_04_01::Models::MessagingRegions + MessagingPlan = Azure::EventHub::Mgmt::V2017_04_01::Models::MessagingPlan SkuName = Azure::EventHub::Mgmt::V2017_04_01::Models::SkuName SkuTier = Azure::EventHub::Mgmt::V2017_04_01::Models::SkuTier AccessRights = Azure::EventHub::Mgmt::V2017_04_01::Models::AccessRights @@ -49,7 +54,7 @@ module Models end class EventHubManagementClass - attr_reader :operations, :namespaces, :disaster_recovery_configs, :event_hubs, :consumer_groups, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :namespaces, :disaster_recovery_configs, :event_hubs, :consumer_groups, :regions, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -64,6 +69,7 @@ def initialize(configurable, base_url=nil, options=nil) @disaster_recovery_configs = @client_0.disaster_recovery_configs @event_hubs = @client_0.event_hubs @consumer_groups = @client_0.consumer_groups + @regions = @client_0.regions @model_classes = ModelClasses.new end @@ -82,41 +88,35 @@ def method_missing(method, *args) end class ModelClasses + def messaging_regions_properties + Azure::EventHub::Mgmt::V2017_04_01::Models::MessagingRegionsProperties + end def capture_description Azure::EventHub::Mgmt::V2017_04_01::Models::CaptureDescription end - def destination - Azure::EventHub::Mgmt::V2017_04_01::Models::Destination - end def resource Azure::EventHub::Mgmt::V2017_04_01::Models::Resource end - def operation - Azure::EventHub::Mgmt::V2017_04_01::Models::Operation - end def error_response Azure::EventHub::Mgmt::V2017_04_01::Models::ErrorResponse end - def operation_list_result - Azure::EventHub::Mgmt::V2017_04_01::Models::OperationListResult + def arm_disaster_recovery_list_result + Azure::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecoveryListResult end def event_hub_list_result Azure::EventHub::Mgmt::V2017_04_01::Models::EventHubListResult end + def messaging_regions_list_result + Azure::EventHub::Mgmt::V2017_04_01::Models::MessagingRegionsListResult + end def access_keys Azure::EventHub::Mgmt::V2017_04_01::Models::AccessKeys end - def arm_disaster_recovery_list_result - Azure::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecoveryListResult - end - def sku - Azure::EventHub::Mgmt::V2017_04_01::Models::Sku - end def consumer_group_list_result Azure::EventHub::Mgmt::V2017_04_01::Models::ConsumerGroupListResult end - def authorization_rule_list_result - Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRuleListResult + def destination + Azure::EventHub::Mgmt::V2017_04_01::Models::Destination end def check_name_availability_parameter Azure::EventHub::Mgmt::V2017_04_01::Models::CheckNameAvailabilityParameter @@ -133,6 +133,18 @@ def regenerate_access_key_parameters def operation_display Azure::EventHub::Mgmt::V2017_04_01::Models::OperationDisplay end + def authorization_rule_list_result + Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRuleListResult + end + def operation + Azure::EventHub::Mgmt::V2017_04_01::Models::Operation + end + def sku + Azure::EventHub::Mgmt::V2017_04_01::Models::Sku + end + def operation_list_result + Azure::EventHub::Mgmt::V2017_04_01::Models::OperationListResult + end def tracked_resource Azure::EventHub::Mgmt::V2017_04_01::Models::TrackedResource end @@ -151,6 +163,12 @@ def consumer_group def arm_disaster_recovery Azure::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecovery end + def messaging_regions + Azure::EventHub::Mgmt::V2017_04_01::Models::MessagingRegions + end + def messaging_plan + Azure::EventHub::Mgmt::V2017_04_01::Models::MessagingPlan + end def sku_name Azure::EventHub::Mgmt::V2017_04_01::Models::SkuName end diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/consumer_groups.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/consumer_groups.rb index 2ccb29c7bb..e7331b37cb 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/consumer_groups.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/consumer_groups.rb @@ -37,8 +37,8 @@ def initialize(client) # # @return [ConsumerGroupResource] operation results. # - def create_or_update(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -58,8 +58,8 @@ def create_or_update(resource_group_name, namespace_name, event_hub_name, consum # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers).value! end # @@ -78,31 +78,24 @@ def create_or_update_with_http_info(resource_group_name, namespace_name, event_h # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MaxLength': '50'" if !event_hub_name.nil? && event_hub_name.length > 50 - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 fail ArgumentError, 'consumer_group_name is nil' if consumer_group_name.nil? - fail ArgumentError, "'consumer_group_name' should satisfy the constraint - 'MaxLength': '50'" if !consumer_group_name.nil? && consumer_group_name.length > 50 - fail ArgumentError, "'consumer_group_name' should satisfy the constraint - 'MinLength': '1'" if !consumer_group_name.nil? && consumer_group_name.length < 1 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' # 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::EventHub::Mgmt::V2015_08_01::Models::ConsumerGroupCreateOrUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -161,8 +154,8 @@ def create_or_update_async(resource_group_name, namespace_name, event_hub_name, # will be added to the HTTP request. # # - def delete(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:nil) - response = delete_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:custom_headers).value! + def delete(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers = nil) + response = delete_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers).value! nil end @@ -179,8 +172,8 @@ def delete(resource_group_name, namespace_name, event_hub_name, consumer_group_n # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:nil) - delete_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers = nil) + delete_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers).value! end # @@ -196,25 +189,16 @@ def delete_with_http_info(resource_group_name, namespace_name, event_hub_name, c # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:nil) + def delete_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MaxLength': '50'" if !event_hub_name.nil? && event_hub_name.length > 50 - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 fail ArgumentError, 'consumer_group_name is nil' if consumer_group_name.nil? - fail ArgumentError, "'consumer_group_name' should satisfy the constraint - 'MaxLength': '50'" if !consumer_group_name.nil? && consumer_group_name.length > 50 - fail ArgumentError, "'consumer_group_name' should satisfy the constraint - 'MinLength': '1'" if !consumer_group_name.nil? && consumer_group_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -262,8 +246,8 @@ def delete_async(resource_group_name, namespace_name, event_hub_name, consumer_g # # @return [ConsumerGroupResource] operation results. # - def get(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:nil) - response = get_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:custom_headers).value! + def get(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers = nil) + response = get_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers).value! response.body unless response.nil? end @@ -280,8 +264,8 @@ def get(resource_group_name, namespace_name, event_hub_name, consumer_group_name # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:nil) - get_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers = nil) + get_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers).value! end # @@ -297,25 +281,16 @@ def get_with_http_info(resource_group_name, namespace_name, event_hub_name, cons # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:nil) + def get_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MaxLength': '50'" if !event_hub_name.nil? && event_hub_name.length > 50 - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 fail ArgumentError, 'consumer_group_name is nil' if consumer_group_name.nil? - fail ArgumentError, "'consumer_group_name' should satisfy the constraint - 'MaxLength': '50'" if !consumer_group_name.nil? && consumer_group_name.length > 50 - fail ArgumentError, "'consumer_group_name' should satisfy the constraint - 'MinLength': '1'" if !consumer_group_name.nil? && consumer_group_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -373,8 +348,8 @@ def get_async(resource_group_name, namespace_name, event_hub_name, consumer_grou # # @return [Array] operation results. # - def list_all(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) - first_page = list_all_as_lazy(resource_group_name, namespace_name, event_hub_name, custom_headers:custom_headers) + def list_all(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) + first_page = list_all_as_lazy(resource_group_name, namespace_name, event_hub_name, custom_headers) first_page.get_all_items end @@ -391,8 +366,8 @@ def list_all(resource_group_name, namespace_name, event_hub_name, custom_headers # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_all_with_http_info(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) - list_all_async(resource_group_name, namespace_name, event_hub_name, custom_headers:custom_headers).value! + def list_all_with_http_info(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) + list_all_async(resource_group_name, namespace_name, event_hub_name, custom_headers).value! end # @@ -408,22 +383,15 @@ def list_all_with_http_info(resource_group_name, namespace_name, event_hub_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_all_async(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) + def list_all_async(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MaxLength': '50'" if !event_hub_name.nil? && event_hub_name.length > 50 - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -479,8 +447,8 @@ def list_all_async(resource_group_name, namespace_name, event_hub_name, custom_h # # @return [ConsumerGroupListResult] operation results. # - def list_all_next(next_page_link, custom_headers:nil) - response = list_all_next_async(next_page_link, custom_headers:custom_headers).value! + def list_all_next(next_page_link, custom_headers = nil) + response = list_all_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -495,8 +463,8 @@ def list_all_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_all_next_with_http_info(next_page_link, custom_headers:nil) - list_all_next_async(next_page_link, custom_headers:custom_headers).value! + def list_all_next_with_http_info(next_page_link, custom_headers = nil) + list_all_next_async(next_page_link, custom_headers).value! end # @@ -510,12 +478,11 @@ def list_all_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_all_next_async(next_page_link, custom_headers:nil) + def list_all_next_async(next_page_link, custom_headers = nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -573,12 +540,12 @@ def list_all_next_async(next_page_link, custom_headers:nil) # @return [ConsumerGroupListResult] which provide lazy access to pages of the # response. # - def list_all_as_lazy(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) - response = list_all_async(resource_group_name, namespace_name, event_hub_name, custom_headers:custom_headers).value! + def list_all_as_lazy(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) + response = list_all_async(resource_group_name, namespace_name, event_hub_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_all_next_async(next_page_link, custom_headers:custom_headers) + list_all_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb index de24726f42..54e53c71fb 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb @@ -118,9 +118,6 @@ def make_request_async(method, path, options = {}) fail ArgumentError, 'path is nil' if path.nil? request_url = options[:base_url] || @base_url - if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?) - @request_headers['Content-Type'] = options[:headers]['Content-Type'] - end request_headers = @request_headers request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil? @@ -137,7 +134,9 @@ def make_request_async(method, path, options = {}) # def add_telemetry sdk_information = 'azure_mgmt_event_hub' - sdk_information = "#{sdk_information}/0.16.0" + if defined? Azure::EventHub::Mgmt::V2015_08_01::VERSION + sdk_information = "#{sdk_information}/#{Azure::EventHub::Mgmt::V2015_08_01::VERSION}" + end add_user_agent_information(sdk_information) end end diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/event_hubs.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/event_hubs.rb index ccc8f074ee..b4d267a146 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/event_hubs.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/event_hubs.rb @@ -32,8 +32,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_all(resource_group_name, namespace_name, custom_headers:nil) - first_page = list_all_as_lazy(resource_group_name, namespace_name, custom_headers:custom_headers) + def list_all(resource_group_name, namespace_name, custom_headers = nil) + first_page = list_all_as_lazy(resource_group_name, namespace_name, custom_headers) first_page.get_all_items end @@ -48,8 +48,8 @@ def list_all(resource_group_name, namespace_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_all_with_http_info(resource_group_name, namespace_name, custom_headers:nil) - list_all_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! + def list_all_with_http_info(resource_group_name, namespace_name, custom_headers = nil) + list_all_async(resource_group_name, namespace_name, custom_headers).value! end # @@ -63,19 +63,14 @@ def list_all_with_http_info(resource_group_name, namespace_name, custom_headers: # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_all_async(resource_group_name, namespace_name, custom_headers:nil) + def list_all_async(resource_group_name, namespace_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -134,8 +129,8 @@ def list_all_async(resource_group_name, namespace_name, custom_headers:nil) # # @return [EventHubResource] operation results. # - def create_or_update(resource_group_name, namespace_name, event_hub_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, namespace_name, event_hub_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, namespace_name, event_hub_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, namespace_name, event_hub_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -153,8 +148,8 @@ def create_or_update(resource_group_name, namespace_name, event_hub_name, parame # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, namespace_name, event_hub_name, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, namespace_name, event_hub_name, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, namespace_name, event_hub_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, namespace_name, event_hub_name, parameters, custom_headers).value! end # @@ -171,28 +166,23 @@ def create_or_update_with_http_info(resource_group_name, namespace_name, event_h # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, namespace_name, event_hub_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, namespace_name, event_hub_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MaxLength': '50'" if !event_hub_name.nil? && event_hub_name.length > 50 - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 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' # 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::EventHub::Mgmt::V2015_08_01::Models::EventHubCreateOrUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -250,8 +240,8 @@ def create_or_update_async(resource_group_name, namespace_name, event_hub_name, # will be added to the HTTP request. # # - def delete(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) - response = delete_async(resource_group_name, namespace_name, event_hub_name, custom_headers:custom_headers).value! + def delete(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) + response = delete_async(resource_group_name, namespace_name, event_hub_name, custom_headers).value! nil end @@ -267,8 +257,8 @@ def delete(resource_group_name, namespace_name, event_hub_name, custom_headers:n # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) - delete_async(resource_group_name, namespace_name, event_hub_name, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) + delete_async(resource_group_name, namespace_name, event_hub_name, custom_headers).value! end # @@ -283,22 +273,15 @@ def delete_with_http_info(resource_group_name, namespace_name, event_hub_name, c # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) + def delete_async(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MaxLength': '50'" if !event_hub_name.nil? && event_hub_name.length > 50 - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -345,8 +328,8 @@ def delete_async(resource_group_name, namespace_name, event_hub_name, custom_hea # # @return [EventHubResource] operation results. # - def get(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) - response = get_async(resource_group_name, namespace_name, event_hub_name, custom_headers:custom_headers).value! + def get(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) + response = get_async(resource_group_name, namespace_name, event_hub_name, custom_headers).value! response.body unless response.nil? end @@ -362,8 +345,8 @@ def get(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) - get_async(resource_group_name, namespace_name, event_hub_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) + get_async(resource_group_name, namespace_name, event_hub_name, custom_headers).value! end # @@ -378,22 +361,15 @@ def get_with_http_info(resource_group_name, namespace_name, event_hub_name, cust # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) + def get_async(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MaxLength': '50'" if !event_hub_name.nil? && event_hub_name.length > 50 - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -450,8 +426,8 @@ def get_async(resource_group_name, namespace_name, event_hub_name, custom_header # # @return [Array] operation results. # - def list_authorization_rules(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) - first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, event_hub_name, custom_headers:custom_headers) + def list_authorization_rules(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) + first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, event_hub_name, custom_headers) first_page.get_all_items end @@ -467,8 +443,8 @@ def list_authorization_rules(resource_group_name, namespace_name, event_hub_name # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_authorization_rules_with_http_info(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) - list_authorization_rules_async(resource_group_name, namespace_name, event_hub_name, custom_headers:custom_headers).value! + def list_authorization_rules_with_http_info(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) + list_authorization_rules_async(resource_group_name, namespace_name, event_hub_name, custom_headers).value! end # @@ -483,22 +459,15 @@ def list_authorization_rules_with_http_info(resource_group_name, namespace_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_authorization_rules_async(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) + def list_authorization_rules_async(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MaxLength': '50'" if !event_hub_name.nil? && event_hub_name.length > 50 - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -558,8 +527,8 @@ def list_authorization_rules_async(resource_group_name, namespace_name, event_hu # # @return [SharedAccessAuthorizationRuleResource] operation results. # - def create_or_update_authorization_rule(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers:nil) - response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers:custom_headers).value! + def create_or_update_authorization_rule(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers = nil) + response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -578,8 +547,8 @@ def create_or_update_authorization_rule(resource_group_name, namespace_name, eve # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_authorization_rule_with_http_info(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers:nil) - create_or_update_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers:custom_headers).value! + def create_or_update_authorization_rule_with_http_info(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers = nil) + create_or_update_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers).value! end # @@ -597,31 +566,24 @@ def create_or_update_authorization_rule_with_http_info(resource_group_name, name # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers:nil) + def create_or_update_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MaxLength': '50'" if !event_hub_name.nil? && event_hub_name.length > 50 - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MaxLength': '50'" if !authorization_rule_name.nil? && authorization_rule_name.length > 50 - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1 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' # 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::EventHub::Mgmt::V2015_08_01::Models::SharedAccessAuthorizationRuleCreateOrUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -681,8 +643,8 @@ def create_or_update_authorization_rule_async(resource_group_name, namespace_nam # # @return [SharedAccessAuthorizationRuleResource] operation results. # - def get_authorization_rule(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:nil) - response = get_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:custom_headers).value! + def get_authorization_rule(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers = nil) + response = get_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers).value! response.body unless response.nil? end @@ -699,8 +661,8 @@ def get_authorization_rule(resource_group_name, namespace_name, event_hub_name, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_authorization_rule_with_http_info(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:nil) - get_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:custom_headers).value! + def get_authorization_rule_with_http_info(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers = nil) + get_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers).value! end # @@ -716,25 +678,16 @@ def get_authorization_rule_with_http_info(resource_group_name, namespace_name, e # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:nil) + def get_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MaxLength': '50'" if !event_hub_name.nil? && event_hub_name.length > 50 - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MaxLength': '50'" if !authorization_rule_name.nil? && authorization_rule_name.length > 50 - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -779,6 +732,108 @@ def get_authorization_rule_async(resource_group_name, namespace_name, event_hub_ promise.execute end + # + # Gets an AuthorizationRule for an Event Hub by rule name. + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @param event_hub_name [String] The Event Hub name + # @param authorization_rule_name [String] The authorization rule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SharedAccessAuthorizationRuleResource] operation results. + # + def postt_authorization_rule(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers = nil) + response = postt_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets an AuthorizationRule for an Event Hub by rule name. + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @param event_hub_name [String] The Event Hub name + # @param authorization_rule_name [String] The authorization rule 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. + # + def postt_authorization_rule_with_http_info(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers = nil) + postt_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers).value! + end + + # + # Gets an AuthorizationRule for an Event Hub by rule name. + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @param event_hub_name [String] The Event Hub name + # @param authorization_rule_name [String] The authorization rule name. + # @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 postt_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? + fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'eventHubName' => event_hub_name,'authorizationRuleName' => authorization_rule_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(: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::EventHub::Mgmt::V2015_08_01::Models::SharedAccessAuthorizationRuleResource.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 an Event Hub AuthorizationRule. # @@ -791,8 +846,8 @@ def get_authorization_rule_async(resource_group_name, namespace_name, event_hub_ # will be added to the HTTP request. # # - def delete_authorization_rule(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:nil) - response = delete_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:custom_headers).value! + def delete_authorization_rule(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers = nil) + response = delete_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers).value! nil end @@ -809,8 +864,8 @@ def delete_authorization_rule(resource_group_name, namespace_name, event_hub_nam # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_authorization_rule_with_http_info(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:nil) - delete_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:custom_headers).value! + def delete_authorization_rule_with_http_info(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers = nil) + delete_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers).value! end # @@ -826,25 +881,16 @@ def delete_authorization_rule_with_http_info(resource_group_name, namespace_name # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:nil) + def delete_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MaxLength': '50'" if !event_hub_name.nil? && event_hub_name.length > 50 - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MaxLength': '50'" if !authorization_rule_name.nil? && authorization_rule_name.length > 50 - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -892,8 +938,8 @@ def delete_authorization_rule_async(resource_group_name, namespace_name, event_h # # @return [ResourceListKeys] operation results. # - def list_keys(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:nil) - response = list_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:custom_headers).value! + def list_keys(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers = nil) + response = list_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers).value! response.body unless response.nil? end @@ -910,8 +956,8 @@ def list_keys(resource_group_name, namespace_name, event_hub_name, authorization # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_keys_with_http_info(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:nil) - list_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:custom_headers).value! + def list_keys_with_http_info(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers = nil) + list_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers).value! end # @@ -927,25 +973,16 @@ def list_keys_with_http_info(resource_group_name, namespace_name, event_hub_name # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:nil) + def list_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MaxLength': '50'" if !event_hub_name.nil? && event_hub_name.length > 50 - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MaxLength': '50'" if !authorization_rule_name.nil? && authorization_rule_name.length > 50 - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1005,8 +1042,8 @@ def list_keys_async(resource_group_name, namespace_name, event_hub_name, authori # # @return [ResourceListKeys] operation results. # - def regenerate_keys(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers:nil) - response = regenerate_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers:custom_headers).value! + def regenerate_keys(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers = nil) + response = regenerate_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1025,8 +1062,8 @@ def regenerate_keys(resource_group_name, namespace_name, event_hub_name, authori # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def regenerate_keys_with_http_info(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers:nil) - regenerate_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers:custom_headers).value! + def regenerate_keys_with_http_info(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers = nil) + regenerate_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers).value! end # @@ -1044,31 +1081,24 @@ def regenerate_keys_with_http_info(resource_group_name, namespace_name, event_hu # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def regenerate_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers:nil) + def regenerate_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MaxLength': '50'" if !event_hub_name.nil? && event_hub_name.length > 50 - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MaxLength': '50'" if !authorization_rule_name.nil? && authorization_rule_name.length > 50 - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1 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' # 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::EventHub::Mgmt::V2015_08_01::Models::RegenerateKeysParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1125,8 +1155,8 @@ def regenerate_keys_async(resource_group_name, namespace_name, event_hub_name, a # # @return [EventHubListResult] operation results. # - def list_all_next(next_page_link, custom_headers:nil) - response = list_all_next_async(next_page_link, custom_headers:custom_headers).value! + def list_all_next(next_page_link, custom_headers = nil) + response = list_all_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -1140,8 +1170,8 @@ def list_all_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_all_next_with_http_info(next_page_link, custom_headers:nil) - list_all_next_async(next_page_link, custom_headers:custom_headers).value! + def list_all_next_with_http_info(next_page_link, custom_headers = nil) + list_all_next_async(next_page_link, custom_headers).value! end # @@ -1154,12 +1184,11 @@ def list_all_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_all_next_async(next_page_link, custom_headers:nil) + def list_all_next_async(next_page_link, custom_headers = nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1213,8 +1242,8 @@ def list_all_next_async(next_page_link, custom_headers:nil) # # @return [SharedAccessAuthorizationRuleListResult] operation results. # - def list_authorization_rules_next(next_page_link, custom_headers:nil) - response = list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value! + def list_authorization_rules_next(next_page_link, custom_headers = nil) + response = list_authorization_rules_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -1228,8 +1257,8 @@ def list_authorization_rules_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_authorization_rules_next_with_http_info(next_page_link, custom_headers:nil) - list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value! + def list_authorization_rules_next_with_http_info(next_page_link, custom_headers = nil) + list_authorization_rules_next_async(next_page_link, custom_headers).value! end # @@ -1242,12 +1271,11 @@ def list_authorization_rules_next_with_http_info(next_page_link, custom_headers: # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_authorization_rules_next_async(next_page_link, custom_headers:nil) + def list_authorization_rules_next_async(next_page_link, custom_headers = nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1303,12 +1331,12 @@ def list_authorization_rules_next_async(next_page_link, custom_headers:nil) # @return [EventHubListResult] which provide lazy access to pages of the # response. # - def list_all_as_lazy(resource_group_name, namespace_name, custom_headers:nil) - response = list_all_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! + def list_all_as_lazy(resource_group_name, namespace_name, custom_headers = nil) + response = list_all_async(resource_group_name, namespace_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_all_next_async(next_page_link, custom_headers:custom_headers) + list_all_next_async(next_page_link, custom_headers) end page end @@ -1327,12 +1355,12 @@ def list_all_as_lazy(resource_group_name, namespace_name, custom_headers:nil) # @return [SharedAccessAuthorizationRuleListResult] which provide lazy access # to pages of the response. # - def list_authorization_rules_as_lazy(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) - response = list_authorization_rules_async(resource_group_name, namespace_name, event_hub_name, custom_headers:custom_headers).value! + def list_authorization_rules_as_lazy(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) + response = list_authorization_rules_async(resource_group_name, namespace_name, event_hub_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers) + list_authorization_rules_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb index 10bcff3ce8..d594f06f17 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb @@ -22,7 +22,6 @@ class CheckNameAvailabilityParameter # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'CheckNameAvailabilityParameter', type: { @@ -30,7 +29,6 @@ def self.mapper() class_name: 'CheckNameAvailabilityParameter', model_properties: { name: { - client_side_validation: true, required: true, serialized_name: 'name', type: { diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/check_name_availability_result.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/check_name_availability_result.rb index 815afb0d4d..d6073c0172 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/check_name_availability_result.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/check_name_availability_result.rb @@ -33,7 +33,6 @@ class CheckNameAvailabilityResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'CheckNameAvailabilityResult', type: { @@ -41,7 +40,6 @@ def self.mapper() class_name: 'CheckNameAvailabilityResult', model_properties: { name_available: { - client_side_validation: true, required: false, serialized_name: 'nameAvailable', type: { @@ -49,7 +47,6 @@ def self.mapper() } }, reason: { - client_side_validation: true, required: false, serialized_name: 'reason', type: { @@ -58,7 +55,6 @@ def self.mapper() } }, message: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'message', diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/consumer_group_create_or_update_parameters.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/consumer_group_create_or_update_parameters.rb index 6b808e2c38..0d333c5adc 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/consumer_group_create_or_update_parameters.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/consumer_group_create_or_update_parameters.rb @@ -40,7 +40,6 @@ class ConsumerGroupCreateOrUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ConsumerGroupCreateOrUpdateParameters', type: { @@ -48,7 +47,6 @@ def self.mapper() class_name: 'ConsumerGroupCreateOrUpdateParameters', model_properties: { location: { - client_side_validation: true, required: true, serialized_name: 'location', type: { @@ -56,7 +54,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, serialized_name: 'type', type: { @@ -64,7 +61,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, serialized_name: 'name', type: { @@ -72,7 +68,6 @@ def self.mapper() } }, created_at: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.createdAt', @@ -81,7 +76,6 @@ def self.mapper() } }, event_hub_path: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.eventHubPath', @@ -90,7 +84,6 @@ def self.mapper() } }, updated_at: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.updatedAt', @@ -99,7 +92,6 @@ def self.mapper() } }, user_metadata: { - client_side_validation: true, required: false, serialized_name: 'properties.userMetadata', type: { diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb index 016c355b4a..a14d4f5099 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb @@ -59,7 +59,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ConsumerGroupListResult', type: { @@ -67,13 +66,11 @@ def self.mapper() class_name: 'ConsumerGroupListResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ConsumerGroupResourceElementType', type: { @@ -84,7 +81,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/consumer_group_resource.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/consumer_group_resource.rb index 7f66dcbd30..efa6f7c2f6 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/consumer_group_resource.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/consumer_group_resource.rb @@ -31,7 +31,6 @@ class ConsumerGroupResource < Resource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ConsumerGroupResource', type: { @@ -39,7 +38,6 @@ def self.mapper() class_name: 'ConsumerGroupResource', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -48,7 +46,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -57,7 +54,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, serialized_name: 'location', type: { @@ -65,7 +61,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -74,7 +69,6 @@ def self.mapper() } }, created_at: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.createdAt', @@ -83,7 +77,6 @@ def self.mapper() } }, event_hub_path: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.eventHubPath', @@ -92,7 +85,6 @@ def self.mapper() } }, updated_at: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.updatedAt', @@ -101,7 +93,6 @@ def self.mapper() } }, user_metadata: { - client_side_validation: true, required: false, serialized_name: 'properties.userMetadata', type: { diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/event_hub_create_or_update_parameters.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/event_hub_create_or_update_parameters.rb index ae0d434c8d..f95beca97e 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/event_hub_create_or_update_parameters.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/event_hub_create_or_update_parameters.rb @@ -50,7 +50,6 @@ class EventHubCreateOrUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'EventHubCreateOrUpdateParameters', type: { @@ -58,7 +57,6 @@ def self.mapper() class_name: 'EventHubCreateOrUpdateParameters', model_properties: { location: { - client_side_validation: true, required: true, serialized_name: 'location', type: { @@ -66,7 +64,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, serialized_name: 'type', type: { @@ -74,7 +71,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, serialized_name: 'name', type: { @@ -82,7 +78,6 @@ def self.mapper() } }, created_at: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.createdAt', @@ -91,7 +86,6 @@ def self.mapper() } }, message_retention_in_days: { - client_side_validation: true, required: false, serialized_name: 'properties.messageRetentionInDays', type: { @@ -99,7 +93,6 @@ def self.mapper() } }, partition_count: { - client_side_validation: true, required: false, serialized_name: 'properties.partitionCount', type: { @@ -107,14 +100,12 @@ def self.mapper() } }, partition_ids: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.partitionIds', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -124,7 +115,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, serialized_name: 'properties.status', type: { @@ -133,7 +123,6 @@ def self.mapper() } }, updated_at: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.updatedAt', diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb index a9f64b6bb8..874abe5bc0 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb @@ -59,7 +59,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'EventHubListResult', type: { @@ -67,13 +66,11 @@ def self.mapper() class_name: 'EventHubListResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'EventHubResourceElementType', type: { @@ -84,7 +81,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/event_hub_resource.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/event_hub_resource.rb index 61180b8b45..40478d6523 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/event_hub_resource.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/event_hub_resource.rb @@ -41,7 +41,6 @@ class EventHubResource < Resource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'EventHubResource', type: { @@ -49,7 +48,6 @@ def self.mapper() class_name: 'EventHubResource', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -58,7 +56,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -67,7 +64,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, serialized_name: 'location', type: { @@ -75,7 +71,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -84,7 +79,6 @@ def self.mapper() } }, created_at: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.createdAt', @@ -93,7 +87,6 @@ def self.mapper() } }, message_retention_in_days: { - client_side_validation: true, required: false, serialized_name: 'properties.messageRetentionInDays', type: { @@ -101,7 +94,6 @@ def self.mapper() } }, partition_count: { - client_side_validation: true, required: false, serialized_name: 'properties.partitionCount', type: { @@ -109,14 +101,12 @@ def self.mapper() } }, partition_ids: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.partitionIds', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -126,7 +116,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, serialized_name: 'properties.status', type: { @@ -135,7 +124,6 @@ def self.mapper() } }, updated_at: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.updatedAt', diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/namespace_create_or_update_parameters.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/namespace_create_or_update_parameters.rb index cf428c1b27..a57fc38368 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/namespace_create_or_update_parameters.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/namespace_create_or_update_parameters.rb @@ -53,7 +53,6 @@ class NamespaceCreateOrUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'NamespaceCreateOrUpdateParameters', type: { @@ -61,7 +60,6 @@ def self.mapper() class_name: 'NamespaceCreateOrUpdateParameters', model_properties: { location: { - client_side_validation: true, required: true, serialized_name: 'location', type: { @@ -69,7 +67,6 @@ def self.mapper() } }, sku: { - client_side_validation: true, required: false, serialized_name: 'sku', type: { @@ -78,13 +75,11 @@ def self.mapper() } }, tags: { - client_side_validation: true, required: false, serialized_name: 'tags', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -94,7 +89,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, serialized_name: 'properties.status', type: { @@ -103,7 +97,6 @@ def self.mapper() } }, provisioning_state: { - client_side_validation: true, required: false, serialized_name: 'properties.provisioningState', type: { @@ -111,7 +104,6 @@ def self.mapper() } }, created_at: { - client_side_validation: true, required: false, serialized_name: 'properties.createdAt', type: { @@ -119,7 +111,6 @@ def self.mapper() } }, updated_at: { - client_side_validation: true, required: false, serialized_name: 'properties.updatedAt', type: { @@ -127,7 +118,6 @@ def self.mapper() } }, service_bus_endpoint: { - client_side_validation: true, required: false, serialized_name: 'properties.serviceBusEndpoint', type: { @@ -135,7 +125,6 @@ def self.mapper() } }, metric_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.metricId', @@ -144,7 +133,6 @@ def self.mapper() } }, enabled: { - client_side_validation: true, required: false, serialized_name: 'properties.enabled', type: { diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/namespace_list_result.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/namespace_list_result.rb index 24f8b6bd04..836e00ac88 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/namespace_list_result.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/namespace_list_result.rb @@ -59,7 +59,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'NamespaceListResult', type: { @@ -67,13 +66,11 @@ def self.mapper() class_name: 'NamespaceListResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'NamespaceResourceElementType', type: { @@ -84,7 +81,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/namespace_resource.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/namespace_resource.rb index b99635bc02..d2df70cdf2 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/namespace_resource.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/namespace_resource.rb @@ -47,7 +47,6 @@ class NamespaceResource < TrackedResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'NamespaceResource', type: { @@ -55,7 +54,6 @@ def self.mapper() class_name: 'NamespaceResource', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -64,7 +62,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -73,7 +70,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, serialized_name: 'location', type: { @@ -81,7 +77,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -90,13 +85,11 @@ def self.mapper() } }, tags: { - client_side_validation: true, required: false, serialized_name: 'tags', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -106,7 +99,6 @@ def self.mapper() } }, sku: { - client_side_validation: true, required: false, serialized_name: 'sku', type: { @@ -115,7 +107,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, serialized_name: 'properties.status', type: { @@ -124,7 +115,6 @@ def self.mapper() } }, provisioning_state: { - client_side_validation: true, required: false, serialized_name: 'properties.provisioningState', type: { @@ -132,7 +122,6 @@ def self.mapper() } }, created_at: { - client_side_validation: true, required: false, serialized_name: 'properties.createdAt', type: { @@ -140,7 +129,6 @@ def self.mapper() } }, updated_at: { - client_side_validation: true, required: false, serialized_name: 'properties.updatedAt', type: { @@ -148,7 +136,6 @@ def self.mapper() } }, service_bus_endpoint: { - client_side_validation: true, required: false, serialized_name: 'properties.serviceBusEndpoint', type: { @@ -156,7 +143,6 @@ def self.mapper() } }, metric_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.metricId', @@ -165,7 +151,6 @@ def self.mapper() } }, enabled: { - client_side_validation: true, required: false, serialized_name: 'properties.enabled', type: { diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/namespace_update_parameter.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/namespace_update_parameter.rb index 3ce75225bb..e45b9d73c6 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/namespace_update_parameter.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/namespace_update_parameter.rb @@ -25,7 +25,6 @@ class NamespaceUpdateParameter # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'NamespaceUpdateParameter', type: { @@ -33,13 +32,11 @@ def self.mapper() class_name: 'NamespaceUpdateParameter', model_properties: { tags: { - client_side_validation: true, required: false, serialized_name: 'tags', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -49,7 +46,6 @@ def self.mapper() } }, sku: { - client_side_validation: true, required: false, serialized_name: 'sku', type: { diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/operation.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/operation.rb index 5a613719c6..274ad31ace 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/operation.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/operation.rb @@ -25,7 +25,6 @@ class Operation # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Operation', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'Operation', model_properties: { name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -42,7 +40,6 @@ def self.mapper() } }, display: { - client_side_validation: true, required: false, serialized_name: 'display', type: { diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/operation_display.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/operation_display.rb index 7f902459e4..9eec338aef 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/operation_display.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/operation_display.rb @@ -29,7 +29,6 @@ class OperationDisplay # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Operation_display', type: { @@ -37,7 +36,6 @@ def self.mapper() class_name: 'OperationDisplay', model_properties: { provider: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'provider', @@ -46,7 +44,6 @@ def self.mapper() } }, resource: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'resource', @@ -55,7 +52,6 @@ def self.mapper() } }, operation: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'operation', diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/operation_list_result.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/operation_list_result.rb index 7d15fc48ed..e422887ea3 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/operation_list_result.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/operation_list_result.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OperationListResult', type: { @@ -68,14 +67,12 @@ def self.mapper() class_name: 'OperationListResult', model_properties: { value: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'OperationElementType', type: { @@ -86,7 +83,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'nextLink', diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/regenerate_keys_parameters.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/regenerate_keys_parameters.rb index b6aceb0e31..4219f306f7 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/regenerate_keys_parameters.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/regenerate_keys_parameters.rb @@ -23,7 +23,6 @@ class RegenerateKeysParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RegenerateKeysParameters', type: { @@ -31,7 +30,6 @@ def self.mapper() class_name: 'RegenerateKeysParameters', model_properties: { policykey: { - client_side_validation: true, required: false, serialized_name: 'policykey', type: { diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/resource.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/resource.rb index 994ca948ce..58ba4907dd 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/resource.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/resource.rb @@ -31,7 +31,6 @@ class Resource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Resource', type: { @@ -39,7 +38,6 @@ def self.mapper() class_name: 'Resource', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -48,7 +46,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -57,7 +54,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, serialized_name: 'location', type: { @@ -65,7 +61,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/resource_list_keys.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/resource_list_keys.rb index 8df3e50e80..e05e4781e9 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/resource_list_keys.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/resource_list_keys.rb @@ -38,7 +38,6 @@ class ResourceListKeys # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ResourceListKeys', type: { @@ -46,7 +45,6 @@ def self.mapper() class_name: 'ResourceListKeys', model_properties: { primary_connection_string: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'primaryConnectionString', @@ -55,7 +53,6 @@ def self.mapper() } }, secondary_connection_string: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'secondaryConnectionString', @@ -64,7 +61,6 @@ def self.mapper() } }, primary_key: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'primaryKey', @@ -73,7 +69,6 @@ def self.mapper() } }, secondary_key: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'secondaryKey', @@ -82,7 +77,6 @@ def self.mapper() } }, key_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'keyName', diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_create_or_update_parameters.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_create_or_update_parameters.rb index b842940496..857315807f 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_create_or_update_parameters.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_create_or_update_parameters.rb @@ -30,7 +30,6 @@ class SharedAccessAuthorizationRuleCreateOrUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SharedAccessAuthorizationRuleCreateOrUpdateParameters', type: { @@ -38,7 +37,6 @@ def self.mapper() class_name: 'SharedAccessAuthorizationRuleCreateOrUpdateParameters', model_properties: { location: { - client_side_validation: true, required: false, serialized_name: 'location', type: { @@ -46,7 +44,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, serialized_name: 'name', type: { @@ -54,13 +51,11 @@ def self.mapper() } }, rights: { - client_side_validation: true, required: true, serialized_name: 'properties.rights', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'AccessRightsElementType', type: { diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_list_result.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_list_result.rb index 07bd32ad5d..4411f1b136 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_list_result.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_list_result.rb @@ -61,7 +61,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SharedAccessAuthorizationRuleListResult', type: { @@ -69,13 +68,11 @@ def self.mapper() class_name: 'SharedAccessAuthorizationRuleListResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'SharedAccessAuthorizationRuleResourceElementType', type: { @@ -86,7 +83,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_resource.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_resource.rb index f030ee9f63..9ab0757a5d 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_resource.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_resource.rb @@ -22,7 +22,6 @@ class SharedAccessAuthorizationRuleResource < Resource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SharedAccessAuthorizationRuleResource', type: { @@ -30,7 +29,6 @@ def self.mapper() class_name: 'SharedAccessAuthorizationRuleResource', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -39,7 +37,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -48,7 +45,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, serialized_name: 'location', type: { @@ -56,7 +52,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -65,13 +60,11 @@ def self.mapper() } }, rights: { - client_side_validation: true, required: true, serialized_name: 'properties.rights', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'AccessRightsElementType', type: { diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/sku.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/sku.rb index ff9223480b..08d08bac00 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/sku.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/sku.rb @@ -30,7 +30,6 @@ class Sku # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Sku', type: { @@ -38,7 +37,6 @@ def self.mapper() class_name: 'Sku', model_properties: { name: { - client_side_validation: true, required: false, serialized_name: 'name', type: { @@ -46,7 +44,6 @@ def self.mapper() } }, tier: { - client_side_validation: true, required: true, serialized_name: 'tier', type: { @@ -54,7 +51,6 @@ def self.mapper() } }, capacity: { - client_side_validation: true, required: false, serialized_name: 'capacity', type: { diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/tracked_resource.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/tracked_resource.rb index 5d7d587e90..7547279378 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/tracked_resource.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/models/tracked_resource.rb @@ -22,7 +22,6 @@ class TrackedResource < Resource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'TrackedResource', type: { @@ -30,7 +29,6 @@ def self.mapper() class_name: 'TrackedResource', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -39,7 +37,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -48,7 +45,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, serialized_name: 'location', type: { @@ -56,7 +52,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -65,13 +60,11 @@ def self.mapper() } }, tags: { - client_side_validation: true, required: false, serialized_name: 'tags', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/namespaces.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/namespaces.rb index 8bf662e98b..8b418393aa 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/namespaces.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/namespaces.rb @@ -31,8 +31,8 @@ def initialize(client) # # @return [CheckNameAvailabilityResult] operation results. # - def check_name_availability(parameters, custom_headers:nil) - response = check_name_availability_async(parameters, custom_headers:custom_headers).value! + def check_name_availability(parameters, custom_headers = nil) + response = check_name_availability_async(parameters, custom_headers).value! response.body unless response.nil? end @@ -46,8 +46,8 @@ def check_name_availability(parameters, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def check_name_availability_with_http_info(parameters, custom_headers:nil) - check_name_availability_async(parameters, custom_headers:custom_headers).value! + def check_name_availability_with_http_info(parameters, custom_headers = nil) + check_name_availability_async(parameters, custom_headers).value! end # @@ -60,19 +60,20 @@ def check_name_availability_with_http_info(parameters, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def check_name_availability_async(parameters, custom_headers:nil) + def check_name_availability_async(parameters, custom_headers = 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? fail ArgumentError, 'parameters is nil' if parameters.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::EventHub::Mgmt::V2015_08_01::Models::CheckNameAvailabilityParameter.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -128,8 +129,8 @@ def check_name_availability_async(parameters, custom_headers:nil) # # @return [Array] operation results. # - def list_by_subscription(custom_headers:nil) - first_page = list_by_subscription_as_lazy(custom_headers:custom_headers) + def list_by_subscription(custom_headers = nil) + first_page = list_by_subscription_as_lazy(custom_headers) first_page.get_all_items end @@ -142,8 +143,8 @@ def list_by_subscription(custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_subscription_with_http_info(custom_headers:nil) - list_by_subscription_async(custom_headers:custom_headers).value! + def list_by_subscription_with_http_info(custom_headers = nil) + list_by_subscription_async(custom_headers).value! end # @@ -155,13 +156,12 @@ def list_by_subscription_with_http_info(custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_subscription_async(custom_headers:nil) + def list_by_subscription_async(custom_headers = 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -216,8 +216,8 @@ def list_by_subscription_async(custom_headers:nil) # # @return [Array] operation results. # - def list_by_resource_group(resource_group_name, custom_headers:nil) - first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers) + def list_by_resource_group(resource_group_name, custom_headers = nil) + first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers) first_page.get_all_items end @@ -231,8 +231,8 @@ def list_by_resource_group(resource_group_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil) - list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value! + def list_by_resource_group_with_http_info(resource_group_name, custom_headers = nil) + list_by_resource_group_async(resource_group_name, custom_headers).value! end # @@ -245,16 +245,13 @@ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:ni # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_resource_group_async(resource_group_name, custom_headers:nil) + def list_by_resource_group_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -313,8 +310,8 @@ def list_by_resource_group_async(resource_group_name, custom_headers:nil) # # @return [NamespaceResource] operation results. # - def create_or_update(resource_group_name, namespace_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, namespace_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -330,9 +327,9 @@ def create_or_update(resource_group_name, namespace_name, parameters, custom_hea # @return [Concurrent::Promise] promise which provides async access to http # response. # - def create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers = nil) # Send request - promise = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers) + promise = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -358,8 +355,8 @@ def create_or_update_async(resource_group_name, namespace_name, parameters, cust # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - def delete(resource_group_name, namespace_name, custom_headers:nil) - response = delete_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! + def delete(resource_group_name, namespace_name, custom_headers = nil) + response = delete_async(resource_group_name, namespace_name, custom_headers).value! nil end @@ -373,9 +370,9 @@ def delete(resource_group_name, namespace_name, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def delete_async(resource_group_name, namespace_name, custom_headers:nil) + def delete_async(resource_group_name, namespace_name, custom_headers = nil) # Send request - promise = begin_delete_async(resource_group_name, namespace_name, custom_headers:custom_headers) + promise = begin_delete_async(resource_group_name, namespace_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -400,8 +397,8 @@ def delete_async(resource_group_name, namespace_name, custom_headers:nil) # # @return [NamespaceResource] operation results. # - def get(resource_group_name, namespace_name, custom_headers:nil) - response = get_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! + def get(resource_group_name, namespace_name, custom_headers = nil) + response = get_async(resource_group_name, namespace_name, custom_headers).value! response.body unless response.nil? end @@ -416,8 +413,8 @@ def get(resource_group_name, namespace_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, namespace_name, custom_headers:nil) - get_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, namespace_name, custom_headers = nil) + get_async(resource_group_name, namespace_name, custom_headers).value! end # @@ -431,19 +428,14 @@ def get_with_http_info(resource_group_name, namespace_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, namespace_name, custom_headers:nil) + def get_async(resource_group_name, namespace_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -512,8 +504,8 @@ def get_async(resource_group_name, namespace_name, custom_headers:nil) # # @return [NamespaceResource] operation results. # - def update(resource_group_name, namespace_name, parameters, custom_headers:nil) - response = update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value! + def update(resource_group_name, namespace_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, namespace_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -531,8 +523,8 @@ def update(resource_group_name, namespace_name, parameters, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil) - update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers = nil) + update_async(resource_group_name, namespace_name, parameters, custom_headers).value! end # @@ -549,25 +541,22 @@ def update_with_http_info(resource_group_name, namespace_name, parameters, custo # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, namespace_name, parameters, custom_headers:nil) + def update_async(resource_group_name, namespace_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 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' # 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::EventHub::Mgmt::V2015_08_01::Models::NamespaceUpdateParameter.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -635,8 +624,8 @@ def update_async(resource_group_name, namespace_name, parameters, custom_headers # # @return [Array] operation results. # - def list_authorization_rules(resource_group_name, namespace_name, custom_headers:nil) - first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers:custom_headers) + def list_authorization_rules(resource_group_name, namespace_name, custom_headers = nil) + first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers) first_page.get_all_items end @@ -651,8 +640,8 @@ def list_authorization_rules(resource_group_name, namespace_name, custom_headers # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_authorization_rules_with_http_info(resource_group_name, namespace_name, custom_headers:nil) - list_authorization_rules_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! + def list_authorization_rules_with_http_info(resource_group_name, namespace_name, custom_headers = nil) + list_authorization_rules_async(resource_group_name, namespace_name, custom_headers).value! end # @@ -666,19 +655,14 @@ def list_authorization_rules_with_http_info(resource_group_name, namespace_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_authorization_rules_async(resource_group_name, namespace_name, custom_headers:nil) + def list_authorization_rules_async(resource_group_name, namespace_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -737,8 +721,8 @@ def list_authorization_rules_async(resource_group_name, namespace_name, custom_h # # @return [SharedAccessAuthorizationRuleResource] operation results. # - def create_or_update_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil) - response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:custom_headers).value! + def create_or_update_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil) + response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -756,8 +740,8 @@ def create_or_update_authorization_rule(resource_group_name, namespace_name, aut # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil) - create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:custom_headers).value! + def create_or_update_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil) + create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value! end # @@ -774,28 +758,23 @@ def create_or_update_authorization_rule_with_http_info(resource_group_name, name # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil) + def create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MaxLength': '50'" if !authorization_rule_name.nil? && authorization_rule_name.length > 50 - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1 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' # 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::EventHub::Mgmt::V2015_08_01::Models::SharedAccessAuthorizationRuleCreateOrUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -853,8 +832,8 @@ def create_or_update_authorization_rule_async(resource_group_name, namespace_nam # will be added to the HTTP request. # # - def delete_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil) - response = delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value! + def delete_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) + response = delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value! nil end @@ -870,8 +849,8 @@ def delete_authorization_rule(resource_group_name, namespace_name, authorization # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil) - delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value! + def delete_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) + delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value! end # @@ -886,22 +865,15 @@ def delete_authorization_rule_with_http_info(resource_group_name, namespace_name # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil) + def delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MaxLength': '50'" if !authorization_rule_name.nil? && authorization_rule_name.length > 50 - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -948,8 +920,8 @@ def delete_authorization_rule_async(resource_group_name, namespace_name, authori # # @return [SharedAccessAuthorizationRuleResource] operation results. # - def get_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil) - response = get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value! + def get_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) + response = get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value! response.body unless response.nil? end @@ -965,8 +937,8 @@ def get_authorization_rule(resource_group_name, namespace_name, authorization_ru # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil) - get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value! + def get_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) + get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value! end # @@ -981,22 +953,15 @@ def get_authorization_rule_with_http_info(resource_group_name, namespace_name, a # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil) + def get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MaxLength': '50'" if !authorization_rule_name.nil? && authorization_rule_name.length > 50 - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1053,8 +1018,8 @@ def get_authorization_rule_async(resource_group_name, namespace_name, authorizat # # @return [ResourceListKeys] operation results. # - def list_keys(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil) - response = list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value! + def list_keys(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) + response = list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value! response.body unless response.nil? end @@ -1070,8 +1035,8 @@ def list_keys(resource_group_name, namespace_name, authorization_rule_name, cust # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil) - list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value! + def list_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) + list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value! end # @@ -1086,22 +1051,15 @@ def list_keys_with_http_info(resource_group_name, namespace_name, authorization_ # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil) + def list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MaxLength': '50'" if !authorization_rule_name.nil? && authorization_rule_name.length > 50 - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1161,8 +1119,8 @@ def list_keys_async(resource_group_name, namespace_name, authorization_rule_name # # @return [ResourceListKeys] operation results. # - def regenerate_keys(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil) - response = regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:custom_headers).value! + def regenerate_keys(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil) + response = regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1181,8 +1139,8 @@ def regenerate_keys(resource_group_name, namespace_name, authorization_rule_name # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def regenerate_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil) - regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:custom_headers).value! + def regenerate_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil) + regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value! end # @@ -1200,28 +1158,23 @@ def regenerate_keys_with_http_info(resource_group_name, namespace_name, authoriz # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil) + def regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MaxLength': '50'" if !authorization_rule_name.nil? && authorization_rule_name.length > 50 - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1 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' # 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::EventHub::Mgmt::V2015_08_01::Models::RegenerateKeysParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1282,8 +1235,8 @@ def regenerate_keys_async(resource_group_name, namespace_name, authorization_rul # # @return [NamespaceResource] operation results. # - def begin_create_or_update(resource_group_name, namespace_name, parameters, custom_headers:nil) - response = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update(resource_group_name, namespace_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1301,8 +1254,8 @@ def begin_create_or_update(resource_group_name, namespace_name, parameters, cust # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_create_or_update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil) - begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers).value! end # @@ -1319,25 +1272,22 @@ def begin_create_or_update_with_http_info(resource_group_name, namespace_name, p # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:nil) + def begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 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' # 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::EventHub::Mgmt::V2015_08_01::Models::NamespaceCreateOrUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1405,8 +1355,8 @@ def begin_create_or_update_async(resource_group_name, namespace_name, parameters # will be added to the HTTP request. # # - def begin_delete(resource_group_name, namespace_name, custom_headers:nil) - response = begin_delete_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! + def begin_delete(resource_group_name, namespace_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, namespace_name, custom_headers).value! nil end @@ -1422,8 +1372,8 @@ def begin_delete(resource_group_name, namespace_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_delete_with_http_info(resource_group_name, namespace_name, custom_headers:nil) - begin_delete_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! + def begin_delete_with_http_info(resource_group_name, namespace_name, custom_headers = nil) + begin_delete_async(resource_group_name, namespace_name, custom_headers).value! end # @@ -1438,19 +1388,14 @@ def begin_delete_with_http_info(resource_group_name, namespace_name, custom_head # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_delete_async(resource_group_name, namespace_name, custom_headers:nil) + def begin_delete_async(resource_group_name, namespace_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1496,8 +1441,8 @@ def begin_delete_async(resource_group_name, namespace_name, custom_headers:nil) # # @return [NamespaceListResult] operation results. # - def list_by_subscription_next(next_page_link, custom_headers:nil) - response = list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_subscription_next(next_page_link, custom_headers = nil) + response = list_by_subscription_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -1512,8 +1457,8 @@ def list_by_subscription_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_subscription_next_with_http_info(next_page_link, custom_headers:nil) - list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_subscription_next_with_http_info(next_page_link, custom_headers = nil) + list_by_subscription_next_async(next_page_link, custom_headers).value! end # @@ -1527,12 +1472,11 @@ def list_by_subscription_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_subscription_next_async(next_page_link, custom_headers:nil) + def list_by_subscription_next_async(next_page_link, custom_headers = nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1586,8 +1530,8 @@ def list_by_subscription_next_async(next_page_link, custom_headers:nil) # # @return [NamespaceListResult] 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:custom_headers).value! + 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 @@ -1601,8 +1545,8 @@ def list_by_resource_group_next(next_page_link, custom_headers:nil) # # @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:custom_headers).value! + 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 # @@ -1615,12 +1559,11 @@ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:ni # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_resource_group_next_async(next_page_link, custom_headers:nil) + 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 = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1674,8 +1617,8 @@ def list_by_resource_group_next_async(next_page_link, custom_headers:nil) # # @return [SharedAccessAuthorizationRuleListResult] operation results. # - def list_authorization_rules_next(next_page_link, custom_headers:nil) - response = list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value! + def list_authorization_rules_next(next_page_link, custom_headers = nil) + response = list_authorization_rules_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -1689,8 +1632,8 @@ def list_authorization_rules_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_authorization_rules_next_with_http_info(next_page_link, custom_headers:nil) - list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value! + def list_authorization_rules_next_with_http_info(next_page_link, custom_headers = nil) + list_authorization_rules_next_async(next_page_link, custom_headers).value! end # @@ -1703,12 +1646,11 @@ def list_authorization_rules_next_with_http_info(next_page_link, custom_headers: # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_authorization_rules_next_async(next_page_link, custom_headers:nil) + def list_authorization_rules_next_async(next_page_link, custom_headers = nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1762,12 +1704,12 @@ def list_authorization_rules_next_async(next_page_link, custom_headers:nil) # @return [NamespaceListResult] which provide lazy access to pages of the # response. # - def list_by_subscription_as_lazy(custom_headers:nil) - response = list_by_subscription_async(custom_headers:custom_headers).value! + def list_by_subscription_as_lazy(custom_headers = nil) + response = list_by_subscription_async(custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_subscription_next_async(next_page_link, custom_headers:custom_headers) + list_by_subscription_next_async(next_page_link, custom_headers) end page end @@ -1784,12 +1726,12 @@ def list_by_subscription_as_lazy(custom_headers:nil) # @return [NamespaceListResult] which provide lazy access to pages of the # response. # - def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil) - response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value! + def list_by_resource_group_as_lazy(resource_group_name, custom_headers = nil) + response = list_by_resource_group_async(resource_group_name, 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:custom_headers) + list_by_resource_group_next_async(next_page_link, custom_headers) end page end @@ -1807,12 +1749,12 @@ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil) # @return [SharedAccessAuthorizationRuleListResult] which provide lazy access # to pages of the response. # - def list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers:nil) - response = list_authorization_rules_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! + def list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers = nil) + response = list_authorization_rules_async(resource_group_name, namespace_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers) + list_authorization_rules_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/operations.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/operations.rb index 4e22e6fda4..1992619dfc 100644 --- a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/operations.rb +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/operations.rb @@ -29,8 +29,8 @@ def initialize(client) # # @return [Array] operation results. # - def list(custom_headers:nil) - first_page = list_as_lazy(custom_headers:custom_headers) + def list(custom_headers = nil) + first_page = list_as_lazy(custom_headers) first_page.get_all_items end @@ -42,8 +42,8 @@ def list(custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_with_http_info(custom_headers:nil) - list_async(custom_headers:custom_headers).value! + def list_with_http_info(custom_headers = nil) + list_async(custom_headers).value! end # @@ -54,12 +54,11 @@ def list_with_http_info(custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_async(custom_headers:nil) + def list_async(custom_headers = nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -113,8 +112,8 @@ def list_async(custom_headers:nil) # # @return [OperationListResult] operation results. # - def list_next(next_page_link, custom_headers:nil) - response = list_next_async(next_page_link, custom_headers:custom_headers).value! + 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 @@ -128,8 +127,8 @@ def list_next(next_page_link, custom_headers:nil) # # @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:custom_headers).value! + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! end # @@ -142,12 +141,11 @@ def list_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_next_async(next_page_link, custom_headers:nil) + def list_next_async(next_page_link, custom_headers = nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -200,12 +198,12 @@ def list_next_async(next_page_link, custom_headers:nil) # @return [OperationListResult] which provide lazy access to pages of the # response. # - def list_as_lazy(custom_headers:nil) - response = list_async(custom_headers:custom_headers).value! + def list_as_lazy(custom_headers = nil) + response = list_async(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:custom_headers) + list_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/version.rb b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/version.rb new file mode 100644 index 0000000000..15f5bd2c1b --- /dev/null +++ b/management/azure_mgmt_event_hub/lib/2015-08-01/generated/azure_mgmt_event_hub/version.rb @@ -0,0 +1,8 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::EventHub::Mgmt::V2015_08_01 + VERSION = '0.16.0' +end diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub.rb index 727bd575c9..25b8c61ec7 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub.rb @@ -25,32 +25,37 @@ module Azure::EventHub::Mgmt::V2017_04_01 autoload :DisasterRecoveryConfigs, '2017-04-01/generated/azure_mgmt_event_hub/disaster_recovery_configs.rb' autoload :EventHubs, '2017-04-01/generated/azure_mgmt_event_hub/event_hubs.rb' autoload :ConsumerGroups, '2017-04-01/generated/azure_mgmt_event_hub/consumer_groups.rb' + autoload :Regions, '2017-04-01/generated/azure_mgmt_event_hub/regions.rb' autoload :EventHubManagementClient, '2017-04-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb' module Models + autoload :MessagingRegionsProperties, '2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions_properties.rb' autoload :CaptureDescription, '2017-04-01/generated/azure_mgmt_event_hub/models/capture_description.rb' - autoload :Destination, '2017-04-01/generated/azure_mgmt_event_hub/models/destination.rb' autoload :Resource, '2017-04-01/generated/azure_mgmt_event_hub/models/resource.rb' - autoload :Operation, '2017-04-01/generated/azure_mgmt_event_hub/models/operation.rb' autoload :ErrorResponse, '2017-04-01/generated/azure_mgmt_event_hub/models/error_response.rb' - autoload :OperationListResult, '2017-04-01/generated/azure_mgmt_event_hub/models/operation_list_result.rb' + autoload :ArmDisasterRecoveryListResult, '2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery_list_result.rb' autoload :EventHubListResult, '2017-04-01/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb' + autoload :MessagingRegionsListResult, '2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions_list_result.rb' autoload :AccessKeys, '2017-04-01/generated/azure_mgmt_event_hub/models/access_keys.rb' - autoload :ArmDisasterRecoveryListResult, '2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery_list_result.rb' - autoload :Sku, '2017-04-01/generated/azure_mgmt_event_hub/models/sku.rb' autoload :ConsumerGroupListResult, '2017-04-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb' - autoload :AuthorizationRuleListResult, '2017-04-01/generated/azure_mgmt_event_hub/models/authorization_rule_list_result.rb' + autoload :Destination, '2017-04-01/generated/azure_mgmt_event_hub/models/destination.rb' autoload :CheckNameAvailabilityParameter, '2017-04-01/generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb' autoload :EHNamespaceListResult, '2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb' autoload :CheckNameAvailabilityResult, '2017-04-01/generated/azure_mgmt_event_hub/models/check_name_availability_result.rb' autoload :RegenerateAccessKeyParameters, '2017-04-01/generated/azure_mgmt_event_hub/models/regenerate_access_key_parameters.rb' autoload :OperationDisplay, '2017-04-01/generated/azure_mgmt_event_hub/models/operation_display.rb' + autoload :AuthorizationRuleListResult, '2017-04-01/generated/azure_mgmt_event_hub/models/authorization_rule_list_result.rb' + autoload :Operation, '2017-04-01/generated/azure_mgmt_event_hub/models/operation.rb' + autoload :Sku, '2017-04-01/generated/azure_mgmt_event_hub/models/sku.rb' + autoload :OperationListResult, '2017-04-01/generated/azure_mgmt_event_hub/models/operation_list_result.rb' autoload :TrackedResource, '2017-04-01/generated/azure_mgmt_event_hub/models/tracked_resource.rb' autoload :EHNamespace, '2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace.rb' autoload :AuthorizationRule, '2017-04-01/generated/azure_mgmt_event_hub/models/authorization_rule.rb' autoload :Eventhub, '2017-04-01/generated/azure_mgmt_event_hub/models/eventhub.rb' autoload :ConsumerGroup, '2017-04-01/generated/azure_mgmt_event_hub/models/consumer_group.rb' autoload :ArmDisasterRecovery, '2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery.rb' + autoload :MessagingRegions, '2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions.rb' + autoload :MessagingPlan, '2017-04-01/generated/azure_mgmt_event_hub/models/messaging_plan.rb' autoload :SkuName, '2017-04-01/generated/azure_mgmt_event_hub/models/sku_name.rb' autoload :SkuTier, '2017-04-01/generated/azure_mgmt_event_hub/models/sku_tier.rb' autoload :AccessRights, '2017-04-01/generated/azure_mgmt_event_hub/models/access_rights.rb' diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/consumer_groups.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/consumer_groups.rb index a393ad69f1..585a8c1a24 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/consumer_groups.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/consumer_groups.rb @@ -37,8 +37,8 @@ def initialize(client) # # @return [ConsumerGroup] operation results. # - def create_or_update(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -58,8 +58,8 @@ def create_or_update(resource_group_name, namespace_name, event_hub_name, consum # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers).value! end # @@ -78,30 +78,24 @@ def create_or_update_with_http_info(resource_group_name, namespace_name, event_h # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 fail ArgumentError, 'consumer_group_name is nil' if consumer_group_name.nil? - fail ArgumentError, "'consumer_group_name' should satisfy the constraint - 'MaxLength': '50'" if !consumer_group_name.nil? && consumer_group_name.length > 50 - fail ArgumentError, "'consumer_group_name' should satisfy the constraint - 'MinLength': '1'" if !consumer_group_name.nil? && consumer_group_name.length < 1 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' # 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::EventHub::Mgmt::V2017_04_01::Models::ConsumerGroup.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -160,8 +154,8 @@ def create_or_update_async(resource_group_name, namespace_name, event_hub_name, # will be added to the HTTP request. # # - def delete(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:nil) - response = delete_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:custom_headers).value! + def delete(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers = nil) + response = delete_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers).value! nil end @@ -178,8 +172,8 @@ def delete(resource_group_name, namespace_name, event_hub_name, consumer_group_n # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:nil) - delete_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers = nil) + delete_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers).value! end # @@ -195,24 +189,16 @@ def delete_with_http_info(resource_group_name, namespace_name, event_hub_name, c # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:nil) + def delete_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 fail ArgumentError, 'consumer_group_name is nil' if consumer_group_name.nil? - fail ArgumentError, "'consumer_group_name' should satisfy the constraint - 'MaxLength': '50'" if !consumer_group_name.nil? && consumer_group_name.length > 50 - fail ArgumentError, "'consumer_group_name' should satisfy the constraint - 'MinLength': '1'" if !consumer_group_name.nil? && consumer_group_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -260,8 +246,8 @@ def delete_async(resource_group_name, namespace_name, event_hub_name, consumer_g # # @return [ConsumerGroup] operation results. # - def get(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:nil) - response = get_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:custom_headers).value! + def get(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers = nil) + response = get_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers).value! response.body unless response.nil? end @@ -278,8 +264,8 @@ def get(resource_group_name, namespace_name, event_hub_name, consumer_group_name # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:nil) - get_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers = nil) + get_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers).value! end # @@ -295,24 +281,16 @@ def get_with_http_info(resource_group_name, namespace_name, event_hub_name, cons # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:nil) + def get_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 fail ArgumentError, 'consumer_group_name is nil' if consumer_group_name.nil? - fail ArgumentError, "'consumer_group_name' should satisfy the constraint - 'MaxLength': '50'" if !consumer_group_name.nil? && consumer_group_name.length > 50 - fail ArgumentError, "'consumer_group_name' should satisfy the constraint - 'MinLength': '1'" if !consumer_group_name.nil? && consumer_group_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -365,13 +343,19 @@ def get_async(resource_group_name, namespace_name, event_hub_name, consumer_grou # azure subscription. # @param namespace_name [String] The Namespace name # @param event_hub_name [String] The Event Hub name + # @param skip [Integer] Skip is only used if a previous operation returned a + # partial result. If a previous response contains a nextLink element, the value + # of the nextLink element will include a skip parameter that specifies a + # starting point to use for subsequent calls. + # @param top [Integer] May be used to limit the number of results to the most + # recent N usageDetails. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [Array] operation results. # - def list_by_event_hub(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) - first_page = list_by_event_hub_as_lazy(resource_group_name, namespace_name, event_hub_name, custom_headers:custom_headers) + def list_by_event_hub(resource_group_name, namespace_name, event_hub_name, skip = nil, top = nil, custom_headers = nil) + first_page = list_by_event_hub_as_lazy(resource_group_name, namespace_name, event_hub_name, skip, top, custom_headers) first_page.get_all_items end @@ -383,13 +367,19 @@ def list_by_event_hub(resource_group_name, namespace_name, event_hub_name, custo # azure subscription. # @param namespace_name [String] The Namespace name # @param event_hub_name [String] The Event Hub name + # @param skip [Integer] Skip is only used if a previous operation returned a + # partial result. If a previous response contains a nextLink element, the value + # of the nextLink element will include a skip parameter that specifies a + # starting point to use for subsequent calls. + # @param top [Integer] May be used to limit the number of results to the most + # recent N usageDetails. # @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_event_hub_with_http_info(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) - list_by_event_hub_async(resource_group_name, namespace_name, event_hub_name, custom_headers:custom_headers).value! + def list_by_event_hub_with_http_info(resource_group_name, namespace_name, event_hub_name, skip = nil, top = nil, custom_headers = nil) + list_by_event_hub_async(resource_group_name, namespace_name, event_hub_name, skip, top, custom_headers).value! end # @@ -400,26 +390,26 @@ def list_by_event_hub_with_http_info(resource_group_name, namespace_name, event_ # azure subscription. # @param namespace_name [String] The Namespace name # @param event_hub_name [String] The Event Hub name + # @param skip [Integer] Skip is only used if a previous operation returned a + # partial result. If a previous response contains a nextLink element, the value + # of the nextLink element will include a skip parameter that specifies a + # starting point to use for subsequent calls. + # @param top [Integer] May be used to limit the number of results to the most + # recent N usageDetails. # @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_event_hub_async(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) + def list_by_event_hub_async(resource_group_name, namespace_name, event_hub_name, skip = nil, top = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -431,7 +421,7 @@ def list_by_event_hub_async(resource_group_name, namespace_name, event_hub_name, options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'eventHubName' => event_hub_name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => @client.api_version}, + query_params: {'api-version' => @client.api_version,'$skip' => skip,'$top' => top}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -475,8 +465,8 @@ def list_by_event_hub_async(resource_group_name, namespace_name, event_hub_name, # # @return [ConsumerGroupListResult] operation results. # - def list_by_event_hub_next(next_page_link, custom_headers:nil) - response = list_by_event_hub_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_event_hub_next(next_page_link, custom_headers = nil) + response = list_by_event_hub_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -491,8 +481,8 @@ def list_by_event_hub_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_event_hub_next_with_http_info(next_page_link, custom_headers:nil) - list_by_event_hub_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_event_hub_next_with_http_info(next_page_link, custom_headers = nil) + list_by_event_hub_next_async(next_page_link, custom_headers).value! end # @@ -506,12 +496,11 @@ def list_by_event_hub_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_event_hub_next_async(next_page_link, custom_headers:nil) + def list_by_event_hub_next_async(next_page_link, custom_headers = nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -563,18 +552,24 @@ def list_by_event_hub_next_async(next_page_link, custom_headers:nil) # azure subscription. # @param namespace_name [String] The Namespace name # @param event_hub_name [String] The Event Hub name + # @param skip [Integer] Skip is only used if a previous operation returned a + # partial result. If a previous response contains a nextLink element, the value + # of the nextLink element will include a skip parameter that specifies a + # starting point to use for subsequent calls. + # @param top [Integer] May be used to limit the number of results to the most + # recent N usageDetails. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [ConsumerGroupListResult] which provide lazy access to pages of the # response. # - def list_by_event_hub_as_lazy(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) - response = list_by_event_hub_async(resource_group_name, namespace_name, event_hub_name, custom_headers:custom_headers).value! + def list_by_event_hub_as_lazy(resource_group_name, namespace_name, event_hub_name, skip = nil, top = nil, custom_headers = nil) + response = list_by_event_hub_async(resource_group_name, namespace_name, event_hub_name, skip, top, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_event_hub_next_async(next_page_link, custom_headers:custom_headers) + list_by_event_hub_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/disaster_recovery_configs.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/disaster_recovery_configs.rb index b64bcdce6a..aa2632de97 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/disaster_recovery_configs.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/disaster_recovery_configs.rb @@ -34,8 +34,8 @@ def initialize(client) # # @return [CheckNameAvailabilityResult] operation results. # - def check_name_availability(resource_group_name, namespace_name, parameters, custom_headers:nil) - response = check_name_availability_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value! + def check_name_availability(resource_group_name, namespace_name, parameters, custom_headers = nil) + response = check_name_availability_async(resource_group_name, namespace_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -52,8 +52,8 @@ def check_name_availability(resource_group_name, namespace_name, parameters, cus # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def check_name_availability_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil) - check_name_availability_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value! + def check_name_availability_with_http_info(resource_group_name, namespace_name, parameters, custom_headers = nil) + check_name_availability_async(resource_group_name, namespace_name, parameters, custom_headers).value! end # @@ -69,25 +69,22 @@ def check_name_availability_with_http_info(resource_group_name, namespace_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def check_name_availability_async(resource_group_name, namespace_name, parameters, custom_headers:nil) + def check_name_availability_async(resource_group_name, namespace_name, parameters, custom_headers = 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? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'parameters is nil' if parameters.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::EventHub::Mgmt::V2017_04_01::Models::CheckNameAvailabilityParameter.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -145,8 +142,8 @@ def check_name_availability_async(resource_group_name, namespace_name, parameter # # @return [Array] operation results. # - def list(resource_group_name, namespace_name, custom_headers:nil) - first_page = list_as_lazy(resource_group_name, namespace_name, custom_headers:custom_headers) + def list(resource_group_name, namespace_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, namespace_name, custom_headers) first_page.get_all_items end @@ -161,8 +158,8 @@ def list(resource_group_name, namespace_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_with_http_info(resource_group_name, namespace_name, custom_headers:nil) - list_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! + def list_with_http_info(resource_group_name, namespace_name, custom_headers = nil) + list_async(resource_group_name, namespace_name, custom_headers).value! end # @@ -176,19 +173,14 @@ def list_with_http_info(resource_group_name, namespace_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_async(resource_group_name, namespace_name, custom_headers:nil) + def list_async(resource_group_name, namespace_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -247,8 +239,8 @@ def list_async(resource_group_name, namespace_name, custom_headers:nil) # # @return [ArmDisasterRecovery] operation results. # - def create_or_update(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers).value! response.body unless response.nil? end @@ -266,8 +258,8 @@ def create_or_update(resource_group_name, namespace_name, alias_parameter, param # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers).value! end # @@ -284,28 +276,23 @@ def create_or_update_with_http_info(resource_group_name, namespace_name, alias_p # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil? - fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MaxLength': '50'" if !alias_parameter.nil? && alias_parameter.length > 50 - fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MinLength': '1'" if !alias_parameter.nil? && alias_parameter.length < 1 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' # 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::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecovery.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -363,8 +350,8 @@ def create_or_update_async(resource_group_name, namespace_name, alias_parameter, # will be added to the HTTP request. # # - def delete(resource_group_name, namespace_name, alias_parameter, custom_headers:nil) - response = delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value! + def delete(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + response = delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! nil end @@ -380,8 +367,8 @@ def delete(resource_group_name, namespace_name, alias_parameter, custom_headers: # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil) - delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! end # @@ -396,22 +383,15 @@ def delete_with_http_info(resource_group_name, namespace_name, alias_parameter, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers:nil) + def delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil? - fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MaxLength': '50'" if !alias_parameter.nil? && alias_parameter.length > 50 - fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MinLength': '1'" if !alias_parameter.nil? && alias_parameter.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -459,8 +439,8 @@ def delete_async(resource_group_name, namespace_name, alias_parameter, custom_he # # @return [ArmDisasterRecovery] operation results. # - def get(resource_group_name, namespace_name, alias_parameter, custom_headers:nil) - response = get_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value! + def get(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + response = get_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! response.body unless response.nil? end @@ -477,8 +457,8 @@ def get(resource_group_name, namespace_name, alias_parameter, custom_headers:nil # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil) - get_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + get_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! end # @@ -494,22 +474,15 @@ def get_with_http_info(resource_group_name, namespace_name, alias_parameter, cus # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, namespace_name, alias_parameter, custom_headers:nil) + def get_async(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil? - fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MaxLength': '50'" if !alias_parameter.nil? && alias_parameter.length > 50 - fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MinLength': '1'" if !alias_parameter.nil? && alias_parameter.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -566,8 +539,8 @@ def get_async(resource_group_name, namespace_name, alias_parameter, custom_heade # will be added to the HTTP request. # # - def break_pairing(resource_group_name, namespace_name, alias_parameter, custom_headers:nil) - response = break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value! + def break_pairing(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + response = break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! nil end @@ -584,8 +557,8 @@ def break_pairing(resource_group_name, namespace_name, alias_parameter, custom_h # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def break_pairing_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil) - break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value! + def break_pairing_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! end # @@ -601,22 +574,15 @@ def break_pairing_with_http_info(resource_group_name, namespace_name, alias_para # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers:nil) + def break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil? - fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MaxLength': '50'" if !alias_parameter.nil? && alias_parameter.length > 50 - fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MinLength': '1'" if !alias_parameter.nil? && alias_parameter.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -663,8 +629,8 @@ def break_pairing_async(resource_group_name, namespace_name, alias_parameter, cu # will be added to the HTTP request. # # - def fail_over(resource_group_name, namespace_name, alias_parameter, custom_headers:nil) - response = fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value! + def fail_over(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + response = fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! nil end @@ -681,8 +647,8 @@ def fail_over(resource_group_name, namespace_name, alias_parameter, custom_heade # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def fail_over_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil) - fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value! + def fail_over_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! end # @@ -698,22 +664,15 @@ def fail_over_with_http_info(resource_group_name, namespace_name, alias_paramete # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers:nil) + def fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil? - fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MaxLength': '50'" if !alias_parameter.nil? && alias_parameter.length > 50 - fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MinLength': '1'" if !alias_parameter.nil? && alias_parameter.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -760,8 +719,8 @@ def fail_over_async(resource_group_name, namespace_name, alias_parameter, custom # # @return [Array] operation results. # - def list_authorization_rules(resource_group_name, namespace_name, alias_parameter, custom_headers:nil) - first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers) + def list_authorization_rules(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, alias_parameter, custom_headers) first_page.get_all_items end @@ -777,8 +736,8 @@ def list_authorization_rules(resource_group_name, namespace_name, alias_paramete # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_authorization_rules_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil) - list_authorization_rules_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value! + def list_authorization_rules_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + list_authorization_rules_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! end # @@ -793,22 +752,15 @@ def list_authorization_rules_with_http_info(resource_group_name, namespace_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_authorization_rules_async(resource_group_name, namespace_name, alias_parameter, custom_headers:nil) + def list_authorization_rules_async(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil? - fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MaxLength': '50'" if !alias_parameter.nil? && alias_parameter.length > 50 - fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MinLength': '1'" if !alias_parameter.nil? && alias_parameter.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -866,8 +818,8 @@ def list_authorization_rules_async(resource_group_name, namespace_name, alias_pa # # @return [AuthorizationRule] operation results. # - def get_authorization_rule(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil) - response = get_authorization_rule_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:custom_headers).value! + def get_authorization_rule(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers = nil) + response = get_authorization_rule_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers).value! response.body unless response.nil? end @@ -884,8 +836,8 @@ def get_authorization_rule(resource_group_name, namespace_name, alias_parameter, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_authorization_rule_with_http_info(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil) - get_authorization_rule_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:custom_headers).value! + def get_authorization_rule_with_http_info(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers = nil) + get_authorization_rule_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers).value! end # @@ -901,24 +853,16 @@ def get_authorization_rule_with_http_info(resource_group_name, namespace_name, a # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_authorization_rule_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil) + def get_authorization_rule_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil? - fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MaxLength': '50'" if !alias_parameter.nil? && alias_parameter.length > 50 - fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MinLength': '1'" if !alias_parameter.nil? && alias_parameter.length < 1 fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -976,8 +920,8 @@ def get_authorization_rule_async(resource_group_name, namespace_name, alias_para # # @return [AccessKeys] operation results. # - def list_keys(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil) - response = list_keys_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:custom_headers).value! + def list_keys(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers = nil) + response = list_keys_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers).value! response.body unless response.nil? end @@ -994,8 +938,8 @@ def list_keys(resource_group_name, namespace_name, alias_parameter, authorizatio # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_keys_with_http_info(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil) - list_keys_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:custom_headers).value! + def list_keys_with_http_info(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers = nil) + list_keys_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers).value! end # @@ -1011,24 +955,16 @@ def list_keys_with_http_info(resource_group_name, namespace_name, alias_paramete # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_keys_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil) + def list_keys_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil? - fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MaxLength': '50'" if !alias_parameter.nil? && alias_parameter.length > 50 - fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MinLength': '1'" if !alias_parameter.nil? && alias_parameter.length < 1 fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1083,8 +1019,8 @@ def list_keys_async(resource_group_name, namespace_name, alias_parameter, author # # @return [ArmDisasterRecoveryListResult] operation results. # - def list_next(next_page_link, custom_headers:nil) - response = list_next_async(next_page_link, custom_headers:custom_headers).value! + 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 @@ -1098,8 +1034,8 @@ def list_next(next_page_link, custom_headers:nil) # # @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:custom_headers).value! + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! end # @@ -1112,12 +1048,11 @@ def list_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_next_async(next_page_link, custom_headers:nil) + def list_next_async(next_page_link, custom_headers = nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1171,8 +1106,8 @@ def list_next_async(next_page_link, custom_headers:nil) # # @return [AuthorizationRuleListResult] operation results. # - def list_authorization_rules_next(next_page_link, custom_headers:nil) - response = list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value! + def list_authorization_rules_next(next_page_link, custom_headers = nil) + response = list_authorization_rules_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -1186,8 +1121,8 @@ def list_authorization_rules_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_authorization_rules_next_with_http_info(next_page_link, custom_headers:nil) - list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value! + def list_authorization_rules_next_with_http_info(next_page_link, custom_headers = nil) + list_authorization_rules_next_async(next_page_link, custom_headers).value! end # @@ -1200,12 +1135,11 @@ def list_authorization_rules_next_with_http_info(next_page_link, custom_headers: # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_authorization_rules_next_async(next_page_link, custom_headers:nil) + def list_authorization_rules_next_async(next_page_link, custom_headers = nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1261,12 +1195,12 @@ def list_authorization_rules_next_async(next_page_link, custom_headers:nil) # @return [ArmDisasterRecoveryListResult] which provide lazy access to pages of # the response. # - def list_as_lazy(resource_group_name, namespace_name, custom_headers:nil) - response = list_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! + def list_as_lazy(resource_group_name, namespace_name, custom_headers = nil) + response = list_async(resource_group_name, namespace_name, 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:custom_headers) + list_next_async(next_page_link, custom_headers) end page end @@ -1285,12 +1219,12 @@ def list_as_lazy(resource_group_name, namespace_name, custom_headers:nil) # @return [AuthorizationRuleListResult] which provide lazy access to pages of # the response. # - def list_authorization_rules_as_lazy(resource_group_name, namespace_name, alias_parameter, custom_headers:nil) - response = list_authorization_rules_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value! + def list_authorization_rules_as_lazy(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + response = list_authorization_rules_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers) + list_authorization_rules_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb index 581acfe3ba..39597166e1 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb @@ -51,6 +51,9 @@ class EventHubManagementClient < MsRestAzure::AzureServiceClient # @return [ConsumerGroups] consumer_groups attr_reader :consumer_groups + # @return [Regions] regions + attr_reader :regions + # # Creates initializes a new instance of the EventHubManagementClient class. # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client. @@ -69,6 +72,7 @@ def initialize(credentials = nil, base_url = nil, options = nil) @disaster_recovery_configs = DisasterRecoveryConfigs.new(self) @event_hubs = EventHubs.new(self) @consumer_groups = ConsumerGroups.new(self) + @regions = Regions.new(self) @api_version = '2017-04-01' @accept_language = 'en-US' @long_running_operation_retry_timeout = 30 @@ -122,9 +126,6 @@ def make_request_async(method, path, options = {}) fail ArgumentError, 'path is nil' if path.nil? request_url = options[:base_url] || @base_url - if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?) - @request_headers['Content-Type'] = options[:headers]['Content-Type'] - end request_headers = @request_headers request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil? @@ -141,7 +142,9 @@ def make_request_async(method, path, options = {}) # def add_telemetry sdk_information = 'azure_mgmt_event_hub' - sdk_information = "#{sdk_information}/0.16.0" + if defined? Azure::EventHub::Mgmt::V2017_04_01::VERSION + sdk_information = "#{sdk_information}/#{Azure::EventHub::Mgmt::V2017_04_01::VERSION}" + end add_user_agent_information(sdk_information) end end diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hubs.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hubs.rb index f02d32d63c..d4988b0f06 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hubs.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hubs.rb @@ -27,13 +27,19 @@ def initialize(client) # @param resource_group_name [String] Name of the resource group within the # azure subscription. # @param namespace_name [String] The Namespace name + # @param skip [Integer] Skip is only used if a previous operation returned a + # partial result. If a previous response contains a nextLink element, the value + # of the nextLink element will include a skip parameter that specifies a + # starting point to use for subsequent calls. + # @param top [Integer] May be used to limit the number of results to the most + # recent N usageDetails. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [Array] operation results. # - def list_by_namespace(resource_group_name, namespace_name, custom_headers:nil) - first_page = list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers:custom_headers) + def list_by_namespace(resource_group_name, namespace_name, skip = nil, top = nil, custom_headers = nil) + first_page = list_by_namespace_as_lazy(resource_group_name, namespace_name, skip, top, custom_headers) first_page.get_all_items end @@ -43,13 +49,19 @@ def list_by_namespace(resource_group_name, namespace_name, custom_headers:nil) # @param resource_group_name [String] Name of the resource group within the # azure subscription. # @param namespace_name [String] The Namespace name + # @param skip [Integer] Skip is only used if a previous operation returned a + # partial result. If a previous response contains a nextLink element, the value + # of the nextLink element will include a skip parameter that specifies a + # starting point to use for subsequent calls. + # @param top [Integer] May be used to limit the number of results to the most + # recent N usageDetails. # @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_namespace_with_http_info(resource_group_name, namespace_name, custom_headers:nil) - list_by_namespace_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! + def list_by_namespace_with_http_info(resource_group_name, namespace_name, skip = nil, top = nil, custom_headers = nil) + list_by_namespace_async(resource_group_name, namespace_name, skip, top, custom_headers).value! end # @@ -58,24 +70,25 @@ def list_by_namespace_with_http_info(resource_group_name, namespace_name, custom # @param resource_group_name [String] Name of the resource group within the # azure subscription. # @param namespace_name [String] The Namespace name + # @param skip [Integer] Skip is only used if a previous operation returned a + # partial result. If a previous response contains a nextLink element, the value + # of the nextLink element will include a skip parameter that specifies a + # starting point to use for subsequent calls. + # @param top [Integer] May be used to limit the number of results to the most + # recent N usageDetails. # @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_namespace_async(resource_group_name, namespace_name, custom_headers:nil) + def list_by_namespace_async(resource_group_name, namespace_name, skip = nil, top = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -87,7 +100,7 @@ def list_by_namespace_async(resource_group_name, namespace_name, custom_headers: options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => @client.api_version}, + query_params: {'api-version' => @client.api_version,'$skip' => skip,'$top' => top}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -134,8 +147,8 @@ def list_by_namespace_async(resource_group_name, namespace_name, custom_headers: # # @return [Eventhub] operation results. # - def create_or_update(resource_group_name, namespace_name, event_hub_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, namespace_name, event_hub_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, namespace_name, event_hub_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, namespace_name, event_hub_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -153,8 +166,8 @@ def create_or_update(resource_group_name, namespace_name, event_hub_name, parame # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, namespace_name, event_hub_name, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, namespace_name, event_hub_name, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, namespace_name, event_hub_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, namespace_name, event_hub_name, parameters, custom_headers).value! end # @@ -171,27 +184,23 @@ def create_or_update_with_http_info(resource_group_name, namespace_name, event_h # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, namespace_name, event_hub_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, namespace_name, event_hub_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 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' # 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::EventHub::Mgmt::V2017_04_01::Models::Eventhub.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -249,8 +258,8 @@ def create_or_update_async(resource_group_name, namespace_name, event_hub_name, # will be added to the HTTP request. # # - def delete(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) - response = delete_async(resource_group_name, namespace_name, event_hub_name, custom_headers:custom_headers).value! + def delete(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) + response = delete_async(resource_group_name, namespace_name, event_hub_name, custom_headers).value! nil end @@ -266,8 +275,8 @@ def delete(resource_group_name, namespace_name, event_hub_name, custom_headers:n # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) - delete_async(resource_group_name, namespace_name, event_hub_name, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) + delete_async(resource_group_name, namespace_name, event_hub_name, custom_headers).value! end # @@ -282,21 +291,15 @@ def delete_with_http_info(resource_group_name, namespace_name, event_hub_name, c # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) + def delete_async(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -343,8 +346,8 @@ def delete_async(resource_group_name, namespace_name, event_hub_name, custom_hea # # @return [Eventhub] operation results. # - def get(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) - response = get_async(resource_group_name, namespace_name, event_hub_name, custom_headers:custom_headers).value! + def get(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) + response = get_async(resource_group_name, namespace_name, event_hub_name, custom_headers).value! response.body unless response.nil? end @@ -360,8 +363,8 @@ def get(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) - get_async(resource_group_name, namespace_name, event_hub_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) + get_async(resource_group_name, namespace_name, event_hub_name, custom_headers).value! end # @@ -376,21 +379,15 @@ def get_with_http_info(resource_group_name, namespace_name, event_hub_name, cust # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) + def get_async(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -447,8 +444,8 @@ def get_async(resource_group_name, namespace_name, event_hub_name, custom_header # # @return [Array] operation results. # - def list_authorization_rules(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) - first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, event_hub_name, custom_headers:custom_headers) + def list_authorization_rules(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) + first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, event_hub_name, custom_headers) first_page.get_all_items end @@ -464,8 +461,8 @@ def list_authorization_rules(resource_group_name, namespace_name, event_hub_name # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_authorization_rules_with_http_info(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) - list_authorization_rules_async(resource_group_name, namespace_name, event_hub_name, custom_headers:custom_headers).value! + def list_authorization_rules_with_http_info(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) + list_authorization_rules_async(resource_group_name, namespace_name, event_hub_name, custom_headers).value! end # @@ -480,21 +477,15 @@ def list_authorization_rules_with_http_info(resource_group_name, namespace_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_authorization_rules_async(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) + def list_authorization_rules_async(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -553,8 +544,8 @@ def list_authorization_rules_async(resource_group_name, namespace_name, event_hu # # @return [AuthorizationRule] operation results. # - def create_or_update_authorization_rule(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers:nil) - response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers:custom_headers).value! + def create_or_update_authorization_rule(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers = nil) + response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -572,8 +563,8 @@ def create_or_update_authorization_rule(resource_group_name, namespace_name, eve # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_authorization_rule_with_http_info(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers:nil) - create_or_update_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers:custom_headers).value! + def create_or_update_authorization_rule_with_http_info(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers = nil) + create_or_update_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers).value! end # @@ -590,29 +581,24 @@ def create_or_update_authorization_rule_with_http_info(resource_group_name, name # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers:nil) + def create_or_update_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1 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' # 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::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRule.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -672,8 +658,8 @@ def create_or_update_authorization_rule_async(resource_group_name, namespace_nam # # @return [AuthorizationRule] operation results. # - def get_authorization_rule(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:nil) - response = get_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:custom_headers).value! + def get_authorization_rule(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers = nil) + response = get_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers).value! response.body unless response.nil? end @@ -690,8 +676,8 @@ def get_authorization_rule(resource_group_name, namespace_name, event_hub_name, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_authorization_rule_with_http_info(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:nil) - get_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:custom_headers).value! + def get_authorization_rule_with_http_info(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers = nil) + get_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers).value! end # @@ -707,23 +693,16 @@ def get_authorization_rule_with_http_info(resource_group_name, namespace_name, e # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:nil) + def get_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -780,8 +759,8 @@ def get_authorization_rule_async(resource_group_name, namespace_name, event_hub_ # will be added to the HTTP request. # # - def delete_authorization_rule(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:nil) - response = delete_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:custom_headers).value! + def delete_authorization_rule(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers = nil) + response = delete_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers).value! nil end @@ -798,8 +777,8 @@ def delete_authorization_rule(resource_group_name, namespace_name, event_hub_nam # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_authorization_rule_with_http_info(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:nil) - delete_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:custom_headers).value! + def delete_authorization_rule_with_http_info(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers = nil) + delete_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers).value! end # @@ -815,23 +794,16 @@ def delete_authorization_rule_with_http_info(resource_group_name, namespace_name # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:nil) + def delete_authorization_rule_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -879,8 +851,8 @@ def delete_authorization_rule_async(resource_group_name, namespace_name, event_h # # @return [AccessKeys] operation results. # - def list_keys(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:nil) - response = list_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:custom_headers).value! + def list_keys(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers = nil) + response = list_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers).value! response.body unless response.nil? end @@ -897,8 +869,8 @@ def list_keys(resource_group_name, namespace_name, event_hub_name, authorization # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_keys_with_http_info(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:nil) - list_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:custom_headers).value! + def list_keys_with_http_info(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers = nil) + list_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers).value! end # @@ -914,23 +886,16 @@ def list_keys_with_http_info(resource_group_name, namespace_name, event_hub_name # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers:nil) + def list_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -990,8 +955,8 @@ def list_keys_async(resource_group_name, namespace_name, event_hub_name, authori # # @return [AccessKeys] operation results. # - def regenerate_keys(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers:nil) - response = regenerate_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers:custom_headers).value! + def regenerate_keys(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers = nil) + response = regenerate_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1010,8 +975,8 @@ def regenerate_keys(resource_group_name, namespace_name, event_hub_name, authori # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def regenerate_keys_with_http_info(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers:nil) - regenerate_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers:custom_headers).value! + def regenerate_keys_with_http_info(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers = nil) + regenerate_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers).value! end # @@ -1029,29 +994,24 @@ def regenerate_keys_with_http_info(resource_group_name, namespace_name, event_hu # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def regenerate_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers:nil) + def regenerate_keys_async(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil? - fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1 fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1 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' # 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::EventHub::Mgmt::V2017_04_01::Models::RegenerateAccessKeyParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1108,8 +1068,8 @@ def regenerate_keys_async(resource_group_name, namespace_name, event_hub_name, a # # @return [EventHubListResult] operation results. # - def list_by_namespace_next(next_page_link, custom_headers:nil) - response = list_by_namespace_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_namespace_next(next_page_link, custom_headers = nil) + response = list_by_namespace_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -1123,8 +1083,8 @@ def list_by_namespace_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_namespace_next_with_http_info(next_page_link, custom_headers:nil) - list_by_namespace_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_namespace_next_with_http_info(next_page_link, custom_headers = nil) + list_by_namespace_next_async(next_page_link, custom_headers).value! end # @@ -1137,12 +1097,11 @@ def list_by_namespace_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_namespace_next_async(next_page_link, custom_headers:nil) + def list_by_namespace_next_async(next_page_link, custom_headers = nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1196,8 +1155,8 @@ def list_by_namespace_next_async(next_page_link, custom_headers:nil) # # @return [AuthorizationRuleListResult] operation results. # - def list_authorization_rules_next(next_page_link, custom_headers:nil) - response = list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value! + def list_authorization_rules_next(next_page_link, custom_headers = nil) + response = list_authorization_rules_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -1211,8 +1170,8 @@ def list_authorization_rules_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_authorization_rules_next_with_http_info(next_page_link, custom_headers:nil) - list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value! + def list_authorization_rules_next_with_http_info(next_page_link, custom_headers = nil) + list_authorization_rules_next_async(next_page_link, custom_headers).value! end # @@ -1225,12 +1184,11 @@ def list_authorization_rules_next_with_http_info(next_page_link, custom_headers: # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_authorization_rules_next_async(next_page_link, custom_headers:nil) + def list_authorization_rules_next_async(next_page_link, custom_headers = nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1280,18 +1238,24 @@ def list_authorization_rules_next_async(next_page_link, custom_headers:nil) # @param resource_group_name [String] Name of the resource group within the # azure subscription. # @param namespace_name [String] The Namespace name + # @param skip [Integer] Skip is only used if a previous operation returned a + # partial result. If a previous response contains a nextLink element, the value + # of the nextLink element will include a skip parameter that specifies a + # starting point to use for subsequent calls. + # @param top [Integer] May be used to limit the number of results to the most + # recent N usageDetails. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [EventHubListResult] which provide lazy access to pages of the # response. # - def list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers:nil) - response = list_by_namespace_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! + def list_by_namespace_as_lazy(resource_group_name, namespace_name, skip = nil, top = nil, custom_headers = nil) + response = list_by_namespace_async(resource_group_name, namespace_name, skip, top, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_namespace_next_async(next_page_link, custom_headers:custom_headers) + list_by_namespace_next_async(next_page_link, custom_headers) end page end @@ -1310,12 +1274,12 @@ def list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_header # @return [AuthorizationRuleListResult] which provide lazy access to pages of # the response. # - def list_authorization_rules_as_lazy(resource_group_name, namespace_name, event_hub_name, custom_headers:nil) - response = list_authorization_rules_async(resource_group_name, namespace_name, event_hub_name, custom_headers:custom_headers).value! + def list_authorization_rules_as_lazy(resource_group_name, namespace_name, event_hub_name, custom_headers = nil) + response = list_authorization_rules_async(resource_group_name, namespace_name, event_hub_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers) + list_authorization_rules_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/access_keys.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/access_keys.rb index d89b55bea0..76d49204af 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/access_keys.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/access_keys.rb @@ -46,7 +46,6 @@ class AccessKeys # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'AccessKeys', type: { @@ -54,7 +53,6 @@ def self.mapper() class_name: 'AccessKeys', model_properties: { primary_connection_string: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'primaryConnectionString', @@ -63,7 +61,6 @@ def self.mapper() } }, secondary_connection_string: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'secondaryConnectionString', @@ -72,7 +69,6 @@ def self.mapper() } }, alias_primary_connection_string: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'aliasPrimaryConnectionString', @@ -81,7 +77,6 @@ def self.mapper() } }, alias_secondary_connection_string: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'aliasSecondaryConnectionString', @@ -90,7 +85,6 @@ def self.mapper() } }, primary_key: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'primaryKey', @@ -99,7 +93,6 @@ def self.mapper() } }, secondary_key: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'secondaryKey', @@ -108,7 +101,6 @@ def self.mapper() } }, key_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'keyName', diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery.rb index cc8bbff742..5862951651 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery.rb @@ -38,7 +38,6 @@ class ArmDisasterRecovery < Resource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ArmDisasterRecovery', type: { @@ -46,7 +45,6 @@ def self.mapper() class_name: 'ArmDisasterRecovery', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -55,7 +53,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -64,7 +61,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -73,7 +69,6 @@ def self.mapper() } }, provisioning_state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.provisioningState', @@ -83,7 +78,6 @@ def self.mapper() } }, partner_namespace: { - client_side_validation: true, required: false, serialized_name: 'properties.partnerNamespace', type: { @@ -91,7 +85,6 @@ def self.mapper() } }, alternate_name: { - client_side_validation: true, required: false, serialized_name: 'properties.alternateName', type: { @@ -99,7 +92,6 @@ def self.mapper() } }, role: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.role', diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery_list_result.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery_list_result.rb index d5b0aa5f97..fb972dd0e7 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery_list_result.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery_list_result.rb @@ -59,7 +59,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ArmDisasterRecoveryListResult', type: { @@ -67,13 +66,11 @@ def self.mapper() class_name: 'ArmDisasterRecoveryListResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ArmDisasterRecoveryElementType', type: { @@ -84,7 +81,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'nextLink', diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/authorization_rule.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/authorization_rule.rb index 0033248c5a..67ba21f285 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/authorization_rule.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/authorization_rule.rb @@ -22,7 +22,6 @@ class AuthorizationRule < Resource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'AuthorizationRule', type: { @@ -30,7 +29,6 @@ def self.mapper() class_name: 'AuthorizationRule', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -39,7 +37,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -48,7 +45,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -57,13 +53,11 @@ def self.mapper() } }, rights: { - client_side_validation: true, required: false, serialized_name: 'properties.rights', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'AccessRightsElementType', type: { diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/authorization_rule_list_result.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/authorization_rule_list_result.rb index 9af6af42ff..9ed57f6a39 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/authorization_rule_list_result.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/authorization_rule_list_result.rb @@ -59,7 +59,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'AuthorizationRuleListResult', type: { @@ -67,13 +66,11 @@ def self.mapper() class_name: 'AuthorizationRuleListResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'AuthorizationRuleElementType', type: { @@ -84,7 +81,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/capture_description.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/capture_description.rb index 113cd8f122..9c89115213 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/capture_description.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/capture_description.rb @@ -43,7 +43,6 @@ class CaptureDescription # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'CaptureDescription', type: { @@ -51,7 +50,6 @@ def self.mapper() class_name: 'CaptureDescription', model_properties: { enabled: { - client_side_validation: true, required: false, serialized_name: 'enabled', type: { @@ -59,7 +57,6 @@ def self.mapper() } }, encoding: { - client_side_validation: true, required: false, serialized_name: 'encoding', type: { @@ -68,7 +65,6 @@ def self.mapper() } }, interval_in_seconds: { - client_side_validation: true, required: false, serialized_name: 'intervalInSeconds', constraints: { @@ -80,7 +76,6 @@ def self.mapper() } }, size_limit_in_bytes: { - client_side_validation: true, required: false, serialized_name: 'sizeLimitInBytes', constraints: { @@ -92,7 +87,6 @@ def self.mapper() } }, destination: { - client_side_validation: true, required: false, serialized_name: 'destination', type: { diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb index dbc5a67232..d8cd389a0f 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb @@ -22,7 +22,6 @@ class CheckNameAvailabilityParameter # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'CheckNameAvailabilityParameter', type: { @@ -30,7 +29,6 @@ def self.mapper() class_name: 'CheckNameAvailabilityParameter', model_properties: { name: { - client_side_validation: true, required: true, serialized_name: 'name', type: { diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/check_name_availability_result.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/check_name_availability_result.rb index 1891937321..0897fab397 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/check_name_availability_result.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/check_name_availability_result.rb @@ -33,7 +33,6 @@ class CheckNameAvailabilityResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'CheckNameAvailabilityResult', type: { @@ -41,7 +40,6 @@ def self.mapper() class_name: 'CheckNameAvailabilityResult', model_properties: { message: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'message', @@ -50,7 +48,6 @@ def self.mapper() } }, name_available: { - client_side_validation: true, required: false, serialized_name: 'nameAvailable', type: { @@ -58,7 +55,6 @@ def self.mapper() } }, reason: { - client_side_validation: true, required: false, serialized_name: 'reason', type: { diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/consumer_group.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/consumer_group.rb index bee64e92e6..2ff1b856d4 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/consumer_group.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/consumer_group.rb @@ -31,7 +31,6 @@ class ConsumerGroup < Resource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ConsumerGroup', type: { @@ -39,7 +38,6 @@ def self.mapper() class_name: 'ConsumerGroup', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -48,7 +46,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -57,7 +54,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -66,7 +62,6 @@ def self.mapper() } }, created_at: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.createdAt', @@ -75,7 +70,6 @@ def self.mapper() } }, updated_at: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.updatedAt', @@ -84,7 +78,6 @@ def self.mapper() } }, user_metadata: { - client_side_validation: true, required: false, serialized_name: 'properties.userMetadata', type: { diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb index bab5c4e493..fb64c54210 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb @@ -59,7 +59,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ConsumerGroupListResult', type: { @@ -67,13 +66,11 @@ def self.mapper() class_name: 'ConsumerGroupListResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ConsumerGroupElementType', type: { @@ -84,7 +81,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/destination.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/destination.rb index 5272497381..a428a8ca89 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/destination.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/destination.rb @@ -35,7 +35,6 @@ class Destination # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Destination', type: { @@ -43,7 +42,6 @@ def self.mapper() class_name: 'Destination', model_properties: { name: { - client_side_validation: true, required: false, serialized_name: 'name', type: { @@ -51,7 +49,6 @@ def self.mapper() } }, storage_account_resource_id: { - client_side_validation: true, required: false, serialized_name: 'properties.storageAccountResourceId', type: { @@ -59,7 +56,6 @@ def self.mapper() } }, blob_container: { - client_side_validation: true, required: false, serialized_name: 'properties.blobContainer', type: { @@ -67,7 +63,6 @@ def self.mapper() } }, archive_name_format: { - client_side_validation: true, required: false, serialized_name: 'properties.archiveNameFormat', type: { diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace.rb index 5a27403dda..1f7af31d9f 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace.rb @@ -47,7 +47,6 @@ class EHNamespace < TrackedResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'EHNamespace', type: { @@ -55,7 +54,6 @@ def self.mapper() class_name: 'EHNamespace', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -64,7 +62,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -73,7 +70,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -82,7 +78,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, serialized_name: 'location', type: { @@ -90,13 +85,11 @@ def self.mapper() } }, tags: { - client_side_validation: true, required: false, serialized_name: 'tags', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -106,7 +99,6 @@ def self.mapper() } }, sku: { - client_side_validation: true, required: false, serialized_name: 'sku', type: { @@ -115,7 +107,6 @@ def self.mapper() } }, provisioning_state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.provisioningState', @@ -124,7 +115,6 @@ def self.mapper() } }, created_at: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.createdAt', @@ -133,7 +123,6 @@ def self.mapper() } }, updated_at: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.updatedAt', @@ -142,7 +131,6 @@ def self.mapper() } }, service_bus_endpoint: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.serviceBusEndpoint', @@ -151,7 +139,6 @@ def self.mapper() } }, metric_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.metricId', @@ -160,7 +147,6 @@ def self.mapper() } }, is_auto_inflate_enabled: { - client_side_validation: true, required: false, serialized_name: 'properties.isAutoInflateEnabled', type: { @@ -168,7 +154,6 @@ def self.mapper() } }, maximum_throughput_units: { - client_side_validation: true, required: false, serialized_name: 'properties.maximumThroughputUnits', constraints: { diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb index dc026ce640..3b4d976668 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb @@ -58,7 +58,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'EHNamespaceListResult', type: { @@ -66,13 +65,11 @@ def self.mapper() class_name: 'EHNamespaceListResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'EHNamespaceElementType', type: { @@ -83,7 +80,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/error_response.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/error_response.rb index 9b7f3cba80..cb32c3f1b3 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/error_response.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/error_response.rb @@ -26,7 +26,6 @@ class ErrorResponse # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ErrorResponse', type: { @@ -34,7 +33,6 @@ def self.mapper() class_name: 'ErrorResponse', model_properties: { code: { - client_side_validation: true, required: false, serialized_name: 'code', type: { @@ -42,7 +40,6 @@ def self.mapper() } }, message: { - client_side_validation: true, required: false, serialized_name: 'message', type: { diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb index 2394a28c3d..a31cf197d2 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb @@ -58,7 +58,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'EventHubListResult', type: { @@ -66,13 +65,11 @@ def self.mapper() class_name: 'EventHubListResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'EventhubElementType', type: { @@ -83,7 +80,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/eventhub.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/eventhub.rb index 693fc4e989..bb423df1c8 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/eventhub.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/eventhub.rb @@ -45,7 +45,6 @@ class Eventhub < Resource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Eventhub', type: { @@ -53,7 +52,6 @@ def self.mapper() class_name: 'Eventhub', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -62,7 +60,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -71,7 +68,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -80,14 +76,12 @@ def self.mapper() } }, partition_ids: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.partitionIds', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -97,7 +91,6 @@ def self.mapper() } }, created_at: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.createdAt', @@ -106,7 +99,6 @@ def self.mapper() } }, updated_at: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.updatedAt', @@ -115,7 +107,6 @@ def self.mapper() } }, message_retention_in_days: { - client_side_validation: true, required: false, serialized_name: 'properties.messageRetentionInDays', constraints: { @@ -126,7 +117,6 @@ def self.mapper() } }, partition_count: { - client_side_validation: true, required: false, serialized_name: 'properties.partitionCount', constraints: { @@ -137,7 +127,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, serialized_name: 'properties.status', type: { @@ -146,7 +135,6 @@ def self.mapper() } }, capture_description: { - client_side_validation: true, required: false, serialized_name: 'properties.captureDescription', type: { diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_plan.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_plan.rb new file mode 100644 index 0000000000..19fe0603ab --- /dev/null +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_plan.rb @@ -0,0 +1,123 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::EventHub::Mgmt::V2017_04_01 + module Models + # + # Messaging Plan for the namespace + # + class MessagingPlan < TrackedResource + + include MsRestAzure + + # @return [Integer] Sku type + attr_accessor :sku + + # @return [Integer] Selected event hub unit + attr_accessor :selected_event_hub_unit + + # @return [DateTime] The exact time the messaging plan was updated. + attr_accessor :updated_at + + # @return [Integer] revision number + attr_accessor :revision + + + # + # Mapper for MessagingPlan class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MessagingPlan', + type: { + name: 'Composite', + class_name: 'MessagingPlan', + 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: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + sku: { + required: false, + read_only: true, + serialized_name: 'properties.sku', + type: { + name: 'Number' + } + }, + selected_event_hub_unit: { + required: false, + read_only: true, + serialized_name: 'properties.selectedEventHubUnit', + type: { + name: 'Number' + } + }, + updated_at: { + required: false, + read_only: true, + serialized_name: 'properties.updatedAt', + type: { + name: 'DateTime' + } + }, + revision: { + required: false, + read_only: true, + serialized_name: 'properties.revision', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions.rb new file mode 100644 index 0000000000..a507e9b8b5 --- /dev/null +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions.rb @@ -0,0 +1,90 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::EventHub::Mgmt::V2017_04_01 + module Models + # + # Messaging Region + # + class MessagingRegions < TrackedResource + + include MsRestAzure + + # @return [MessagingRegionsProperties] + attr_accessor :properties + + + # + # Mapper for MessagingRegions class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MessagingRegions', + type: { + name: 'Composite', + class_name: 'MessagingRegions', + 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: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'MessagingRegionsProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions_list_result.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions_list_result.rb new file mode 100644 index 0000000000..5a78800045 --- /dev/null +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions_list_result.rb @@ -0,0 +1,97 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::EventHub::Mgmt::V2017_04_01 + module Models + # + # The response of the List MessagingRegions operation. + # + class MessagingRegionsListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Result of the List MessagingRegions + # type. + attr_accessor :value + + # @return [String] Link to the next set of results. Not empty if Value + # contains incomplete list of MessagingRegions. + 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 [MessagingRegionsListResult] 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 MessagingRegionsListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MessagingRegionsListResult', + type: { + name: 'Composite', + class_name: 'MessagingRegionsListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'MessagingRegionsElementType', + type: { + name: 'Composite', + class_name: 'MessagingRegions' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions_properties.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions_properties.rb new file mode 100644 index 0000000000..b914b6298e --- /dev/null +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions_properties.rb @@ -0,0 +1,57 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::EventHub::Mgmt::V2017_04_01 + module Models + # + # Model object. + # + # + class MessagingRegionsProperties + + include MsRestAzure + + # @return [String] Region code + attr_accessor :code + + # @return [String] Full name of the region + attr_accessor :full_name + + + # + # Mapper for MessagingRegionsProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MessagingRegions_properties', + type: { + name: 'Composite', + class_name: 'MessagingRegionsProperties', + model_properties: { + code: { + required: false, + read_only: true, + serialized_name: 'code', + type: { + name: 'String' + } + }, + full_name: { + required: false, + read_only: true, + serialized_name: 'fullName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/operation.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/operation.rb index dc48828874..dca47f24e0 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/operation.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/operation.rb @@ -25,7 +25,6 @@ class Operation # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Operation', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'Operation', model_properties: { name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -42,7 +40,6 @@ def self.mapper() } }, display: { - client_side_validation: true, required: false, serialized_name: 'display', type: { diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/operation_display.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/operation_display.rb index a11b1eb0d4..e4e8098113 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/operation_display.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/operation_display.rb @@ -29,7 +29,6 @@ class OperationDisplay # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Operation_display', type: { @@ -37,7 +36,6 @@ def self.mapper() class_name: 'OperationDisplay', model_properties: { provider: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'provider', @@ -46,7 +44,6 @@ def self.mapper() } }, resource: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'resource', @@ -55,7 +52,6 @@ def self.mapper() } }, operation: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'operation', diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/operation_list_result.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/operation_list_result.rb index 19922b075e..a86a0d09ce 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/operation_list_result.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/operation_list_result.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OperationListResult', type: { @@ -68,14 +67,12 @@ def self.mapper() class_name: 'OperationListResult', model_properties: { value: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'OperationElementType', type: { @@ -86,7 +83,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'nextLink', diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/regenerate_access_key_parameters.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/regenerate_access_key_parameters.rb index 04e74c48d9..b1b6821ab6 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/regenerate_access_key_parameters.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/regenerate_access_key_parameters.rb @@ -28,7 +28,6 @@ class RegenerateAccessKeyParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RegenerateAccessKeyParameters', type: { @@ -36,7 +35,6 @@ def self.mapper() class_name: 'RegenerateAccessKeyParameters', model_properties: { key_type: { - client_side_validation: true, required: true, serialized_name: 'keyType', type: { @@ -45,7 +43,6 @@ def self.mapper() } }, key: { - client_side_validation: true, required: false, serialized_name: 'key', type: { diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/resource.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/resource.rb index d42e34abbe..fd0f813862 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/resource.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/resource.rb @@ -28,7 +28,6 @@ class Resource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Resource', type: { @@ -36,7 +35,6 @@ def self.mapper() class_name: 'Resource', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -45,7 +43,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -54,7 +51,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/sku.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/sku.rb index f55c308997..7b8f801288 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/sku.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/sku.rb @@ -31,7 +31,6 @@ class Sku # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Sku', type: { @@ -39,7 +38,6 @@ def self.mapper() class_name: 'Sku', model_properties: { name: { - client_side_validation: true, required: true, serialized_name: 'name', type: { @@ -47,7 +45,6 @@ def self.mapper() } }, tier: { - client_side_validation: true, required: false, serialized_name: 'tier', type: { @@ -55,7 +52,6 @@ def self.mapper() } }, capacity: { - client_side_validation: true, required: false, serialized_name: 'capacity', constraints: { diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/tracked_resource.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/tracked_resource.rb index a66fc1c7d7..dc46561d1a 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/tracked_resource.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/models/tracked_resource.rb @@ -25,7 +25,6 @@ class TrackedResource < Resource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'TrackedResource', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'TrackedResource', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -42,7 +40,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -51,7 +48,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -60,7 +56,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, serialized_name: 'location', type: { @@ -68,13 +63,11 @@ def self.mapper() } }, tags: { - client_side_validation: true, required: false, serialized_name: 'tags', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/namespaces.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/namespaces.rb index d3b71fe449..6bff670837 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/namespaces.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/namespaces.rb @@ -31,8 +31,8 @@ def initialize(client) # # @return [CheckNameAvailabilityResult] operation results. # - def check_name_availability(parameters, custom_headers:nil) - response = check_name_availability_async(parameters, custom_headers:custom_headers).value! + def check_name_availability(parameters, custom_headers = nil) + response = check_name_availability_async(parameters, custom_headers).value! response.body unless response.nil? end @@ -46,8 +46,8 @@ def check_name_availability(parameters, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def check_name_availability_with_http_info(parameters, custom_headers:nil) - check_name_availability_async(parameters, custom_headers:custom_headers).value! + def check_name_availability_with_http_info(parameters, custom_headers = nil) + check_name_availability_async(parameters, custom_headers).value! end # @@ -60,19 +60,20 @@ def check_name_availability_with_http_info(parameters, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def check_name_availability_async(parameters, custom_headers:nil) + def check_name_availability_async(parameters, custom_headers = 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? fail ArgumentError, 'parameters is nil' if parameters.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::EventHub::Mgmt::V2017_04_01::Models::CheckNameAvailabilityParameter.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -128,8 +129,8 @@ def check_name_availability_async(parameters, custom_headers:nil) # # @return [Array] operation results. # - def list(custom_headers:nil) - first_page = list_as_lazy(custom_headers:custom_headers) + def list(custom_headers = nil) + first_page = list_as_lazy(custom_headers) first_page.get_all_items end @@ -142,8 +143,8 @@ def list(custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_with_http_info(custom_headers:nil) - list_async(custom_headers:custom_headers).value! + def list_with_http_info(custom_headers = nil) + list_async(custom_headers).value! end # @@ -155,13 +156,12 @@ def list_with_http_info(custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_async(custom_headers:nil) + def list_async(custom_headers = 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -216,8 +216,8 @@ def list_async(custom_headers:nil) # # @return [Array] operation results. # - def list_by_resource_group(resource_group_name, custom_headers:nil) - first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers) + def list_by_resource_group(resource_group_name, custom_headers = nil) + first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers) first_page.get_all_items end @@ -231,8 +231,8 @@ def list_by_resource_group(resource_group_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil) - list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value! + def list_by_resource_group_with_http_info(resource_group_name, custom_headers = nil) + list_by_resource_group_async(resource_group_name, custom_headers).value! end # @@ -245,16 +245,13 @@ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:ni # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_resource_group_async(resource_group_name, custom_headers:nil) + def list_by_resource_group_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -312,8 +309,8 @@ def list_by_resource_group_async(resource_group_name, custom_headers:nil) # # @return [EHNamespace] operation results. # - def create_or_update(resource_group_name, namespace_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, namespace_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -328,9 +325,9 @@ def create_or_update(resource_group_name, namespace_name, parameters, custom_hea # @return [Concurrent::Promise] promise which provides async access to http # response. # - def create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers = nil) # Send request - promise = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers) + promise = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -356,8 +353,8 @@ def create_or_update_async(resource_group_name, namespace_name, parameters, cust # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - def delete(resource_group_name, namespace_name, custom_headers:nil) - response = delete_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! + def delete(resource_group_name, namespace_name, custom_headers = nil) + response = delete_async(resource_group_name, namespace_name, custom_headers).value! nil end @@ -371,9 +368,9 @@ def delete(resource_group_name, namespace_name, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def delete_async(resource_group_name, namespace_name, custom_headers:nil) + def delete_async(resource_group_name, namespace_name, custom_headers = nil) # Send request - promise = begin_delete_async(resource_group_name, namespace_name, custom_headers:custom_headers) + promise = begin_delete_async(resource_group_name, namespace_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -398,8 +395,8 @@ def delete_async(resource_group_name, namespace_name, custom_headers:nil) # # @return [EHNamespace] operation results. # - def get(resource_group_name, namespace_name, custom_headers:nil) - response = get_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! + def get(resource_group_name, namespace_name, custom_headers = nil) + response = get_async(resource_group_name, namespace_name, custom_headers).value! response.body unless response.nil? end @@ -414,8 +411,8 @@ def get(resource_group_name, namespace_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, namespace_name, custom_headers:nil) - get_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, namespace_name, custom_headers = nil) + get_async(resource_group_name, namespace_name, custom_headers).value! end # @@ -429,19 +426,14 @@ def get_with_http_info(resource_group_name, namespace_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, namespace_name, custom_headers:nil) + def get_async(resource_group_name, namespace_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -509,8 +501,8 @@ def get_async(resource_group_name, namespace_name, custom_headers:nil) # # @return [EHNamespace] operation results. # - def update(resource_group_name, namespace_name, parameters, custom_headers:nil) - response = update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value! + def update(resource_group_name, namespace_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, namespace_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -527,8 +519,8 @@ def update(resource_group_name, namespace_name, parameters, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil) - update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers = nil) + update_async(resource_group_name, namespace_name, parameters, custom_headers).value! end # @@ -544,25 +536,22 @@ def update_with_http_info(resource_group_name, namespace_name, parameters, custo # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, namespace_name, parameters, custom_headers:nil) + def update_async(resource_group_name, namespace_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 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' # 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::EventHub::Mgmt::V2017_04_01::Models::EHNamespace.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -619,6 +608,100 @@ def update_async(resource_group_name, namespace_name, parameters, custom_headers promise.execute end + # + # Gets messaging plan for specified namespace. + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MessagingPlan] operation results. + # + def get_messaging_plan(resource_group_name, namespace_name, custom_headers = nil) + response = get_messaging_plan_async(resource_group_name, namespace_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets messaging plan for specified namespace. + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace 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. + # + def get_messaging_plan_with_http_info(resource_group_name, namespace_name, custom_headers = nil) + get_messaging_plan_async(resource_group_name, namespace_name, custom_headers).value! + end + + # + # Gets messaging plan for specified namespace. + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @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_messaging_plan_async(resource_group_name, namespace_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_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.EventHub/namespaces/{namespaceName}/messagingplan' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_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 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::EventHub::Mgmt::V2017_04_01::Models::MessagingPlan.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 a list of authorization rules for a Namespace. # @@ -630,8 +713,8 @@ def update_async(resource_group_name, namespace_name, parameters, custom_headers # # @return [Array] operation results. # - def list_authorization_rules(resource_group_name, namespace_name, custom_headers:nil) - first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers:custom_headers) + def list_authorization_rules(resource_group_name, namespace_name, custom_headers = nil) + first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers) first_page.get_all_items end @@ -646,8 +729,8 @@ def list_authorization_rules(resource_group_name, namespace_name, custom_headers # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_authorization_rules_with_http_info(resource_group_name, namespace_name, custom_headers:nil) - list_authorization_rules_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! + def list_authorization_rules_with_http_info(resource_group_name, namespace_name, custom_headers = nil) + list_authorization_rules_async(resource_group_name, namespace_name, custom_headers).value! end # @@ -661,19 +744,14 @@ def list_authorization_rules_with_http_info(resource_group_name, namespace_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_authorization_rules_async(resource_group_name, namespace_name, custom_headers:nil) + def list_authorization_rules_async(resource_group_name, namespace_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -731,8 +809,8 @@ def list_authorization_rules_async(resource_group_name, namespace_name, custom_h # # @return [AuthorizationRule] operation results. # - def create_or_update_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil) - response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:custom_headers).value! + def create_or_update_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil) + response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -749,8 +827,8 @@ def create_or_update_authorization_rule(resource_group_name, namespace_name, aut # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil) - create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:custom_headers).value! + def create_or_update_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil) + create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value! end # @@ -766,27 +844,23 @@ def create_or_update_authorization_rule_with_http_info(resource_group_name, name # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil) + def create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1 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' # 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::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRule.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -844,8 +918,8 @@ def create_or_update_authorization_rule_async(resource_group_name, namespace_nam # will be added to the HTTP request. # # - def delete_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil) - response = delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value! + def delete_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) + response = delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value! nil end @@ -861,8 +935,8 @@ def delete_authorization_rule(resource_group_name, namespace_name, authorization # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil) - delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value! + def delete_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) + delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value! end # @@ -877,21 +951,15 @@ def delete_authorization_rule_with_http_info(resource_group_name, namespace_name # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil) + def delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -938,8 +1006,8 @@ def delete_authorization_rule_async(resource_group_name, namespace_name, authori # # @return [AuthorizationRule] operation results. # - def get_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil) - response = get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value! + def get_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) + response = get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value! response.body unless response.nil? end @@ -955,8 +1023,8 @@ def get_authorization_rule(resource_group_name, namespace_name, authorization_ru # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil) - get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value! + def get_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) + get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value! end # @@ -971,21 +1039,15 @@ def get_authorization_rule_with_http_info(resource_group_name, namespace_name, a # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil) + def get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1042,8 +1104,8 @@ def get_authorization_rule_async(resource_group_name, namespace_name, authorizat # # @return [AccessKeys] operation results. # - def list_keys(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil) - response = list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value! + def list_keys(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) + response = list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value! response.body unless response.nil? end @@ -1059,8 +1121,8 @@ def list_keys(resource_group_name, namespace_name, authorization_rule_name, cust # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil) - list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value! + def list_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) + list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value! end # @@ -1075,21 +1137,15 @@ def list_keys_with_http_info(resource_group_name, namespace_name, authorization_ # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil) + def list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1149,8 +1205,8 @@ def list_keys_async(resource_group_name, namespace_name, authorization_rule_name # # @return [AccessKeys] operation results. # - def regenerate_keys(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil) - response = regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:custom_headers).value! + def regenerate_keys(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil) + response = regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1169,8 +1225,8 @@ def regenerate_keys(resource_group_name, namespace_name, authorization_rule_name # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def regenerate_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil) - regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:custom_headers).value! + def regenerate_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil) + regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value! end # @@ -1188,27 +1244,23 @@ def regenerate_keys_with_http_info(resource_group_name, namespace_name, authoriz # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil) + def regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? - fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1 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' # 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::EventHub::Mgmt::V2017_04_01::Models::RegenerateAccessKeyParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1268,8 +1320,8 @@ def regenerate_keys_async(resource_group_name, namespace_name, authorization_rul # # @return [EHNamespace] operation results. # - def begin_create_or_update(resource_group_name, namespace_name, parameters, custom_headers:nil) - response = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update(resource_group_name, namespace_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1286,8 +1338,8 @@ def begin_create_or_update(resource_group_name, namespace_name, parameters, cust # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_create_or_update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil) - begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers).value! end # @@ -1303,25 +1355,22 @@ def begin_create_or_update_with_http_info(resource_group_name, namespace_name, p # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:nil) + def begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 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' # 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::EventHub::Mgmt::V2017_04_01::Models::EHNamespace.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1389,8 +1438,8 @@ def begin_create_or_update_async(resource_group_name, namespace_name, parameters # will be added to the HTTP request. # # - def begin_delete(resource_group_name, namespace_name, custom_headers:nil) - response = begin_delete_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! + def begin_delete(resource_group_name, namespace_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, namespace_name, custom_headers).value! nil end @@ -1406,8 +1455,8 @@ def begin_delete(resource_group_name, namespace_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_delete_with_http_info(resource_group_name, namespace_name, custom_headers:nil) - begin_delete_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! + def begin_delete_with_http_info(resource_group_name, namespace_name, custom_headers = nil) + begin_delete_async(resource_group_name, namespace_name, custom_headers).value! end # @@ -1422,19 +1471,14 @@ def begin_delete_with_http_info(resource_group_name, namespace_name, custom_head # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_delete_async(resource_group_name, namespace_name, custom_headers:nil) + def begin_delete_async(resource_group_name, namespace_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 - fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 - fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 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' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1480,8 +1524,8 @@ def begin_delete_async(resource_group_name, namespace_name, custom_headers:nil) # # @return [EHNamespaceListResult] operation results. # - def list_next(next_page_link, custom_headers:nil) - response = list_next_async(next_page_link, custom_headers:custom_headers).value! + 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 @@ -1496,8 +1540,8 @@ def list_next(next_page_link, custom_headers:nil) # # @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:custom_headers).value! + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! end # @@ -1511,12 +1555,11 @@ def list_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_next_async(next_page_link, custom_headers:nil) + def list_next_async(next_page_link, custom_headers = nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1570,8 +1613,8 @@ def list_next_async(next_page_link, custom_headers:nil) # # @return [EHNamespaceListResult] 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:custom_headers).value! + 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 @@ -1585,8 +1628,8 @@ def list_by_resource_group_next(next_page_link, custom_headers:nil) # # @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:custom_headers).value! + 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 # @@ -1599,12 +1642,11 @@ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:ni # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_resource_group_next_async(next_page_link, custom_headers:nil) + 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 = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1658,8 +1700,8 @@ def list_by_resource_group_next_async(next_page_link, custom_headers:nil) # # @return [AuthorizationRuleListResult] operation results. # - def list_authorization_rules_next(next_page_link, custom_headers:nil) - response = list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value! + def list_authorization_rules_next(next_page_link, custom_headers = nil) + response = list_authorization_rules_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -1673,8 +1715,8 @@ def list_authorization_rules_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_authorization_rules_next_with_http_info(next_page_link, custom_headers:nil) - list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value! + def list_authorization_rules_next_with_http_info(next_page_link, custom_headers = nil) + list_authorization_rules_next_async(next_page_link, custom_headers).value! end # @@ -1687,12 +1729,11 @@ def list_authorization_rules_next_with_http_info(next_page_link, custom_headers: # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_authorization_rules_next_async(next_page_link, custom_headers:nil) + def list_authorization_rules_next_async(next_page_link, custom_headers = nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1746,12 +1787,12 @@ def list_authorization_rules_next_async(next_page_link, custom_headers:nil) # @return [EHNamespaceListResult] which provide lazy access to pages of the # response. # - def list_as_lazy(custom_headers:nil) - response = list_async(custom_headers:custom_headers).value! + def list_as_lazy(custom_headers = nil) + response = list_async(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:custom_headers) + list_next_async(next_page_link, custom_headers) end page end @@ -1768,12 +1809,12 @@ def list_as_lazy(custom_headers:nil) # @return [EHNamespaceListResult] which provide lazy access to pages of the # response. # - def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil) - response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value! + def list_by_resource_group_as_lazy(resource_group_name, custom_headers = nil) + response = list_by_resource_group_async(resource_group_name, 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:custom_headers) + list_by_resource_group_next_async(next_page_link, custom_headers) end page end @@ -1791,12 +1832,12 @@ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil) # @return [AuthorizationRuleListResult] which provide lazy access to pages of # the response. # - def list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers:nil) - response = list_authorization_rules_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! + def list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers = nil) + response = list_authorization_rules_async(resource_group_name, namespace_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers) + list_authorization_rules_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/operations.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/operations.rb index 2e36b9878e..9389196ee8 100644 --- a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/operations.rb +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/operations.rb @@ -29,8 +29,8 @@ def initialize(client) # # @return [Array] operation results. # - def list(custom_headers:nil) - first_page = list_as_lazy(custom_headers:custom_headers) + def list(custom_headers = nil) + first_page = list_as_lazy(custom_headers) first_page.get_all_items end @@ -42,8 +42,8 @@ def list(custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_with_http_info(custom_headers:nil) - list_async(custom_headers:custom_headers).value! + def list_with_http_info(custom_headers = nil) + list_async(custom_headers).value! end # @@ -54,12 +54,11 @@ def list_with_http_info(custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_async(custom_headers:nil) + def list_async(custom_headers = nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -113,8 +112,8 @@ def list_async(custom_headers:nil) # # @return [OperationListResult] operation results. # - def list_next(next_page_link, custom_headers:nil) - response = list_next_async(next_page_link, custom_headers:custom_headers).value! + 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 @@ -128,8 +127,8 @@ def list_next(next_page_link, custom_headers:nil) # # @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:custom_headers).value! + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! end # @@ -142,12 +141,11 @@ def list_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_next_async(next_page_link, custom_headers:nil) + def list_next_async(next_page_link, custom_headers = nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -200,12 +198,12 @@ def list_next_async(next_page_link, custom_headers:nil) # @return [OperationListResult] which provide lazy access to pages of the # response. # - def list_as_lazy(custom_headers:nil) - response = list_async(custom_headers:custom_headers).value! + def list_as_lazy(custom_headers = nil) + response = list_async(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:custom_headers) + list_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/regions.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/regions.rb new file mode 100644 index 0000000000..f42380090b --- /dev/null +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/regions.rb @@ -0,0 +1,220 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::EventHub::Mgmt::V2017_04_01 + # + # Azure Event Hubs client + # + class Regions + include MsRestAzure + + # + # Creates and initializes a new instance of the Regions class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [EventHubManagementClient] reference to the EventHubManagementClient + attr_reader :client + + # + # Gets the available Regions for a given sku + # + # @param sku [String] The sku type. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list_by_sku(sku, custom_headers = nil) + first_page = list_by_sku_as_lazy(sku, custom_headers) + first_page.get_all_items + end + + # + # Gets the available Regions for a given sku + # + # @param sku [String] The sku type. + # @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_sku_with_http_info(sku, custom_headers = nil) + list_by_sku_async(sku, custom_headers).value! + end + + # + # Gets the available Regions for a given sku + # + # @param sku [String] The sku type. + # @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_sku_async(sku, custom_headers = 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? + fail ArgumentError, 'sku is nil' if sku.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.EventHub/sku/{sku}/regions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => @client.subscription_id,'sku' => sku}, + 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 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::EventHub::Mgmt::V2017_04_01::Models::MessagingRegionsListResult.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 available Regions for a given sku + # + # @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 [MessagingRegionsListResult] operation results. + # + def list_by_sku_next(next_page_link, custom_headers = nil) + response = list_by_sku_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the available Regions for a given sku + # + # @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_sku_next_with_http_info(next_page_link, custom_headers = nil) + list_by_sku_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the available Regions for a given sku + # + # @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_sku_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 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::EventHub::Mgmt::V2017_04_01::Models::MessagingRegionsListResult.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 available Regions for a given sku + # + # @param sku [String] The sku type. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MessagingRegionsListResult] which provide lazy access to pages of + # the response. + # + def list_by_sku_as_lazy(sku, custom_headers = nil) + response = list_by_sku_async(sku, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_sku_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/version.rb b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/version.rb new file mode 100644 index 0000000000..81cf652024 --- /dev/null +++ b/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/version.rb @@ -0,0 +1,8 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::EventHub::Mgmt::V2017_04_01 + VERSION = '0.16.0' +end diff --git a/management/azure_mgmt_event_hub/lib/azure_mgmt_event_hub.rb b/management/azure_mgmt_event_hub/lib/azure_mgmt_event_hub.rb index 5a8237991c..27f294c4c2 100644 --- a/management/azure_mgmt_event_hub/lib/azure_mgmt_event_hub.rb +++ b/management/azure_mgmt_event_hub/lib/azure_mgmt_event_hub.rb @@ -2,6 +2,6 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -require '2017-04-01/generated/azure_mgmt_event_hub' require '2015-08-01/generated/azure_mgmt_event_hub' +require '2017-04-01/generated/azure_mgmt_event_hub' require 'profiles/latest/eventhub_latest_profile_client' diff --git a/management/azure_mgmt_event_hub/lib/profiles/latest/modules/eventhub_profile_module.rb b/management/azure_mgmt_event_hub/lib/profiles/latest/modules/eventhub_profile_module.rb index 80b5cd35a6..5b8024b7f1 100644 --- a/management/azure_mgmt_event_hub/lib/profiles/latest/modules/eventhub_profile_module.rb +++ b/management/azure_mgmt_event_hub/lib/profiles/latest/modules/eventhub_profile_module.rb @@ -11,31 +11,36 @@ module Mgmt DisasterRecoveryConfigs = Azure::EventHub::Mgmt::V2017_04_01::DisasterRecoveryConfigs EventHubs = Azure::EventHub::Mgmt::V2017_04_01::EventHubs ConsumerGroups = Azure::EventHub::Mgmt::V2017_04_01::ConsumerGroups + Regions = Azure::EventHub::Mgmt::V2017_04_01::Regions module Models + MessagingRegionsProperties = Azure::EventHub::Mgmt::V2017_04_01::Models::MessagingRegionsProperties CaptureDescription = Azure::EventHub::Mgmt::V2017_04_01::Models::CaptureDescription - Destination = Azure::EventHub::Mgmt::V2017_04_01::Models::Destination Resource = Azure::EventHub::Mgmt::V2017_04_01::Models::Resource - Operation = Azure::EventHub::Mgmt::V2017_04_01::Models::Operation ErrorResponse = Azure::EventHub::Mgmt::V2017_04_01::Models::ErrorResponse - OperationListResult = Azure::EventHub::Mgmt::V2017_04_01::Models::OperationListResult + ArmDisasterRecoveryListResult = Azure::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecoveryListResult EventHubListResult = Azure::EventHub::Mgmt::V2017_04_01::Models::EventHubListResult + MessagingRegionsListResult = Azure::EventHub::Mgmt::V2017_04_01::Models::MessagingRegionsListResult AccessKeys = Azure::EventHub::Mgmt::V2017_04_01::Models::AccessKeys - ArmDisasterRecoveryListResult = Azure::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecoveryListResult - Sku = Azure::EventHub::Mgmt::V2017_04_01::Models::Sku ConsumerGroupListResult = Azure::EventHub::Mgmt::V2017_04_01::Models::ConsumerGroupListResult - AuthorizationRuleListResult = Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRuleListResult + Destination = Azure::EventHub::Mgmt::V2017_04_01::Models::Destination CheckNameAvailabilityParameter = Azure::EventHub::Mgmt::V2017_04_01::Models::CheckNameAvailabilityParameter EHNamespaceListResult = Azure::EventHub::Mgmt::V2017_04_01::Models::EHNamespaceListResult CheckNameAvailabilityResult = Azure::EventHub::Mgmt::V2017_04_01::Models::CheckNameAvailabilityResult RegenerateAccessKeyParameters = Azure::EventHub::Mgmt::V2017_04_01::Models::RegenerateAccessKeyParameters OperationDisplay = Azure::EventHub::Mgmt::V2017_04_01::Models::OperationDisplay + AuthorizationRuleListResult = Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRuleListResult + Operation = Azure::EventHub::Mgmt::V2017_04_01::Models::Operation + Sku = Azure::EventHub::Mgmt::V2017_04_01::Models::Sku + OperationListResult = Azure::EventHub::Mgmt::V2017_04_01::Models::OperationListResult TrackedResource = Azure::EventHub::Mgmt::V2017_04_01::Models::TrackedResource EHNamespace = Azure::EventHub::Mgmt::V2017_04_01::Models::EHNamespace AuthorizationRule = Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRule Eventhub = Azure::EventHub::Mgmt::V2017_04_01::Models::Eventhub ConsumerGroup = Azure::EventHub::Mgmt::V2017_04_01::Models::ConsumerGroup ArmDisasterRecovery = Azure::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecovery + MessagingRegions = Azure::EventHub::Mgmt::V2017_04_01::Models::MessagingRegions + MessagingPlan = Azure::EventHub::Mgmt::V2017_04_01::Models::MessagingPlan SkuName = Azure::EventHub::Mgmt::V2017_04_01::Models::SkuName SkuTier = Azure::EventHub::Mgmt::V2017_04_01::Models::SkuTier AccessRights = Azure::EventHub::Mgmt::V2017_04_01::Models::AccessRights @@ -51,7 +56,7 @@ module Models # EventHubManagementClass # class EventHubManagementClass - attr_reader :operations, :namespaces, :disaster_recovery_configs, :event_hubs, :consumer_groups, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :namespaces, :disaster_recovery_configs, :event_hubs, :consumer_groups, :regions, :configurable, :base_url, :options, :model_classes def initialize(options = {}) if options.is_a?(Hash) && options.length == 0 @@ -76,6 +81,7 @@ def initialize(options = {}) @disaster_recovery_configs = @client_0.disaster_recovery_configs @event_hubs = @client_0.event_hubs @consumer_groups = @client_0.consumer_groups + @regions = @client_0.regions @model_classes = ModelClasses.new end @@ -96,41 +102,35 @@ def method_missing(method, *args) end class ModelClasses + def messaging_regions_properties + Azure::EventHub::Mgmt::V2017_04_01::Models::MessagingRegionsProperties + end def capture_description Azure::EventHub::Mgmt::V2017_04_01::Models::CaptureDescription end - def destination - Azure::EventHub::Mgmt::V2017_04_01::Models::Destination - end def resource Azure::EventHub::Mgmt::V2017_04_01::Models::Resource end - def operation - Azure::EventHub::Mgmt::V2017_04_01::Models::Operation - end def error_response Azure::EventHub::Mgmt::V2017_04_01::Models::ErrorResponse end - def operation_list_result - Azure::EventHub::Mgmt::V2017_04_01::Models::OperationListResult + def arm_disaster_recovery_list_result + Azure::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecoveryListResult end def event_hub_list_result Azure::EventHub::Mgmt::V2017_04_01::Models::EventHubListResult end + def messaging_regions_list_result + Azure::EventHub::Mgmt::V2017_04_01::Models::MessagingRegionsListResult + end def access_keys Azure::EventHub::Mgmt::V2017_04_01::Models::AccessKeys end - def arm_disaster_recovery_list_result - Azure::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecoveryListResult - end - def sku - Azure::EventHub::Mgmt::V2017_04_01::Models::Sku - end def consumer_group_list_result Azure::EventHub::Mgmt::V2017_04_01::Models::ConsumerGroupListResult end - def authorization_rule_list_result - Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRuleListResult + def destination + Azure::EventHub::Mgmt::V2017_04_01::Models::Destination end def check_name_availability_parameter Azure::EventHub::Mgmt::V2017_04_01::Models::CheckNameAvailabilityParameter @@ -147,6 +147,18 @@ def regenerate_access_key_parameters def operation_display Azure::EventHub::Mgmt::V2017_04_01::Models::OperationDisplay end + def authorization_rule_list_result + Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRuleListResult + end + def operation + Azure::EventHub::Mgmt::V2017_04_01::Models::Operation + end + def sku + Azure::EventHub::Mgmt::V2017_04_01::Models::Sku + end + def operation_list_result + Azure::EventHub::Mgmt::V2017_04_01::Models::OperationListResult + end def tracked_resource Azure::EventHub::Mgmt::V2017_04_01::Models::TrackedResource end @@ -165,6 +177,12 @@ def consumer_group def arm_disaster_recovery Azure::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecovery end + def messaging_regions + Azure::EventHub::Mgmt::V2017_04_01::Models::MessagingRegions + end + def messaging_plan + Azure::EventHub::Mgmt::V2017_04_01::Models::MessagingPlan + end def sku_name Azure::EventHub::Mgmt::V2017_04_01::Models::SkuName end