From 20d8098ea8db431e06971c480a371eee7991ae3f Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 12 Jun 2018 17:05:35 -0700 Subject: [PATCH] [AutoPR sql/resource-manager] Fixed inconsistent definitions for SQL 2014 apis. (#1358) * Generated from 929fcc6c506c0ca401f39a48a3ea55a0a948f9e9 Fixed inconsistent definitions for SQL 2014 apis. * Generated from 929fcc6c506c0ca401f39a48a3ea55a0a948f9e9 Fixed inconsistent definitions for SQL 2014 apis. --- azure_sdk/lib/azure_sdk.rb | 2 +- .../lib/latest/modules/sql_profile_module.rb | 908 +++++++++----- .../2014-04-01/generated/azure_mgmt_sql.rb | 123 +- .../backup_long_term_retention_policies.rb | 43 +- .../backup_long_term_retention_vaults.rb | 43 +- .../generated/azure_mgmt_sql/capabilities.rb | 11 +- .../azure_mgmt_sql/data_masking_policies.rb | 24 +- .../azure_mgmt_sql/data_masking_rules.rb | 24 +- .../azure_mgmt_sql/database_advisors.rb | 35 +- .../database_connection_policies.rb | 24 +- .../database_table_auditing_policies.rb | 35 +- .../database_threat_detection_policies.rb | 24 +- .../azure_mgmt_sql/database_usages.rb | 11 +- .../generated/azure_mgmt_sql/databases.rb | 242 ++-- .../disaster_recovery_configurations.rb | 98 +- .../azure_mgmt_sql/elastic_pool_activities.rb | 11 +- .../elastic_pool_database_activities.rb | 11 +- .../generated/azure_mgmt_sql/elastic_pools.rb | 97 +- .../generated/azure_mgmt_sql/extensions.rb | 11 +- .../azure_mgmt_sql/firewall_rules.rb | 46 +- .../azure_mgmt_sql/geo_backup_policies.rb | 35 +- .../azure_mgmt_sql/models/advisor.rb | 10 - .../models/advisor_list_result.rb | 3 - .../backup_long_term_retention_policy.rb | 7 - ..._long_term_retention_policy_list_result.rb | 3 - .../backup_long_term_retention_vault.rb | 6 - ...p_long_term_retention_vault_list_result.rb | 3 - .../models/check_name_availability_request.rb | 3 - .../check_name_availability_response.rb | 5 - .../models/data_masking_policy.rb | 10 - .../models/data_masking_rule.rb | 18 - .../models/data_masking_rule_list_result.rb | 3 - .../azure_mgmt_sql/models/database.rb | 51 +- .../models/database_connection_policy.rb | 13 - .../models/database_list_result.rb | 3 - .../models/database_security_alert_policy.rb | 14 - .../models/database_table_auditing_policy.rb | 18 - ...abase_table_auditing_policy_list_result.rb | 3 - .../azure_mgmt_sql/models/database_update.rb | 35 - .../azure_mgmt_sql/models/database_usage.rb | 8 - .../models/database_usage_list_result.rb | 3 - .../models/disaster_recovery_configuration.rb | 12 - ...ster_recovery_configuration_list_result.rb | 3 - .../models/edition_capability.rb | 6 - .../azure_mgmt_sql/models/elastic_pool.rb | 30 +- .../models/elastic_pool_activity.rb | 25 - .../elastic_pool_activity_list_result.rb | 3 - .../models/elastic_pool_database_activity.rb | 20 - ...stic_pool_database_activity_list_result.rb | 3 - .../models/elastic_pool_dtu_capability.rb | 11 - .../models/elastic_pool_edition_capability.rb | 6 - .../models/elastic_pool_list_result.rb | 3 - ...ic_pool_per_database_max_dtu_capability.rb | 5 - ...ic_pool_per_database_min_dtu_capability.rb | 3 - .../models/elastic_pool_update.rb | 14 - .../azure_mgmt_sql/models/export_request.rb | 7 - .../models/extension_list_result.rb | 3 - .../azure_mgmt_sql/models/firewall_rule.rb | 8 - .../models/firewall_rule_list_result.rb | 3 - .../models/geo_backup_policy.rb | 8 - .../models/geo_backup_policy_list_result.rb | 3 - .../models/import_export_response.rb | 13 - .../models/import_extension_request.rb | 10 - .../azure_mgmt_sql/models/import_request.rb | 11 - .../models/location_capabilities.rb | 5 - .../models/max_size_capability.rb | 4 - .../generated/azure_mgmt_sql/models/metric.rb | 8 - .../models/metric_availability.rb | 3 - .../models/metric_definition.rb | 7 - .../models/metric_definition_list_result.rb | 3 - .../models/metric_list_result.rb | 3 - .../azure_mgmt_sql/models/metric_name.rb | 3 - .../azure_mgmt_sql/models/metric_value.rb | 7 - .../azure_mgmt_sql/models/operation.rb | 3 - .../models/operation_display.rb | 4 - .../azure_mgmt_sql/models/operation_impact.rb | 5 - .../models/operation_list_result.rb | 4 - .../azure_mgmt_sql/models/proxy_resource.rb | 4 - .../azure_mgmt_sql/models/query_interval.rb | 5 - .../azure_mgmt_sql/models/query_metric.rb | 5 - .../azure_mgmt_sql/models/query_statistic.rb | 4 - .../models/query_statistic_list_result.rb | 3 - .../azure_mgmt_sql/models/query_text.rb | 4 - .../models/query_text_list_result.rb | 3 - .../models/recommended_elastic_pool.rb | 17 - ...mended_elastic_pool_list_metrics_result.rb | 3 - .../recommended_elastic_pool_list_result.rb | 3 - .../models/recommended_elastic_pool_metric.rb | 4 - .../models/recommended_index.rb | 20 - .../models/recoverable_database.rb | 8 - .../recoverable_database_list_result.rb | 3 - .../azure_mgmt_sql/models/replication_link.rb | 15 - .../models/replication_link_list_result.rb | 3 - .../azure_mgmt_sql/models/resource.rb | 4 - .../models/restorable_dropped_database.rb | 13 - ...restorable_dropped_database_list_result.rb | 3 - .../azure_mgmt_sql/models/restore_point.rb | 7 - .../models/restore_point_list_result.rb | 3 - .../generated/azure_mgmt_sql/models/server.rb | 29 +- .../server_administrator_list_result.rb | 3 - .../models/server_azure_adadministrator.rb | 8 - .../models/server_communication_link.rb | 8 - .../server_communication_link_list_result.rb | 3 - .../models/server_connection_policy.rb | 7 - .../models/server_list_result.rb | 3 - .../models/server_table_auditing_policy.rb | 17 - ...erver_table_auditing_policy_list_result.rb | 3 - .../azure_mgmt_sql/models/server_update.rb | 13 - .../azure_mgmt_sql/models/server_usage.rb | 8 - .../models/server_usage_list_result.rb | 3 - .../models/server_version_capability.rb | 7 - .../models/service_objective.rb | 9 - .../models/service_objective_capability.rb | 9 - .../models/service_objective_list_result.rb | 3 - .../models/service_tier_advisor.rb | 24 - .../service_tier_advisor_list_result.rb | 3 - .../azure_mgmt_sql/models/slo_usage_metric.rb | 4 - .../table_auditing_policy_properties.rb | 12 - .../azure_mgmt_sql/models/top_queries.rb | 10 - .../models/top_queries_list_result.rb | 3 - .../azure_mgmt_sql/models/tracked_resource.rb | 27 +- .../models/transparent_data_encryption.rb | 6 - .../transparent_data_encryption_activity.rb | 7 - ...nt_data_encryption_activity_list_result.rb | 3 - ...transparent_data_encryption_list_result.rb | 3 - .../generated/azure_mgmt_sql/operations.rb | 11 +- .../generated/azure_mgmt_sql/queries.rb | 11 +- .../azure_mgmt_sql/query_statistics.rb | 11 +- .../generated/azure_mgmt_sql/query_texts.rb | 11 +- .../recommended_elastic_pools.rb | 33 +- .../azure_mgmt_sql/recoverable_databases.rb | 22 +- .../azure_mgmt_sql/replication_links.rb | 71 +- .../restorable_dropped_databases.rb | 22 +- .../azure_mgmt_sql/restore_points.rb | 11 +- .../azure_mgmt_sql/server_advisors.rb | 454 +++++++ .../server_azure_adadministrators.rb | 62 +- .../server_communication_links.rb | 54 +- .../server_connection_policies.rb | 24 +- .../server_table_auditing_policies.rb | 35 +- .../generated/azure_mgmt_sql/server_usages.rb | 11 +- .../generated/azure_mgmt_sql/servers.rb | 83 +- .../azure_mgmt_sql/service_objectives.rb | 22 +- .../azure_mgmt_sql/service_tier_advisors.rb | 22 +- .../azure_mgmt_sql/sql_management_client.rb | 33 +- .../transparent_data_encryption_activities.rb | 11 +- ...nsparent_data_encryption_configurations.rb | 11 +- .../transparent_data_encryptions.rb | 24 +- .../generated/azure_mgmt_sql/version.rb | 8 + .../generated/azure_mgmt_sql.rb | 68 +- .../azure_mgmt_sql/database_advisors.rb | 37 +- .../database_automatic_tuning_operations.rb | 246 ++++ .../database_blob_auditing_policies.rb | 42 +- .../database_recommended_actions.rb | 37 +- .../azure_mgmt_sql/encryption_protectors.rb | 60 +- .../azure_mgmt_sql/failover_groups.rb | 138 +-- .../azure_mgmt_sql/firewall_rules.rb | 664 ++++++++++ .../azure_mgmt_sql/managed_instances.rb | 982 +++++++++++++++ .../azure_mgmt_sql/models/advisor.rb | 13 - .../automatic_tuning_disabled_reason.rb | 21 + .../models/automatic_tuning_mode.rb | 18 + .../automatic_tuning_option_mode_actual.rb | 16 + .../automatic_tuning_option_mode_desired.rb | 17 + .../models/automatic_tuning_options.rb | 86 ++ .../models/database_automatic_tuning.rb | 102 ++ .../models/database_blob_auditing_policy.rb | 87 +- .../models/encryption_protector.rb | 11 - .../encryption_protector_list_result.rb | 4 - .../azure_mgmt_sql/models/failover_group.rb | 15 - .../models/failover_group_list_result.rb | 4 - .../failover_group_read_only_endpoint.rb | 2 - .../failover_group_read_write_endpoint.rb | 3 - .../models/failover_group_update.rb | 7 - .../azure_mgmt_sql/models/firewall_rule.rb | 80 ++ .../models/firewall_rule_list.rb | 52 + .../models/firewall_rule_list_result.rb | 96 ++ .../azure_mgmt_sql/models/managed_instance.rb | 189 +++ .../models/managed_instance_list_result.rb | 96 ++ .../models/managed_instance_update.rb | 149 +++ .../azure_mgmt_sql/models/operation.rb | 6 - .../models/operation_display.rb | 5 - .../models/operation_list_result.rb | 4 - .../azure_mgmt_sql/models/partner_info.rb | 4 - .../azure_mgmt_sql/models/proxy_resource.rb | 4 - .../proxy_resource_with_writable_name.rb | 57 + .../models/recommended_action.rb | 34 - .../models/recommended_action_error_info.rb | 3 - .../recommended_action_impact_record.rb | 6 - .../recommended_action_implementation_info.rb | 3 - .../models/recommended_action_metric_info.rb | 6 - .../models/recommended_action_state_info.rb | 4 - .../azure_mgmt_sql/models/resource.rb | 4 - .../models/resource_identity.rb | 4 - .../models/resource_with_writable_name.rb | 66 + .../generated/azure_mgmt_sql/models/server.rb | 14 - .../azure_mgmt_sql/models/server_key.rb | 11 - .../models/server_key_list_result.rb | 4 - .../models/server_list_result.rb | 4 - .../azure_mgmt_sql/models/server_update.rb | 8 - .../generated/azure_mgmt_sql/models/sku.rb | 91 ++ .../models/subscription_usage.rb | 8 - .../models/subscription_usage_list_result.rb | 4 - .../azure_mgmt_sql/models/sync_agent.rb | 11 - .../models/sync_agent_key_properties.rb | 2 - .../models/sync_agent_linked_database.rb | 10 - .../sync_agent_linked_database_list_result.rb | 4 - .../models/sync_agent_list_result.rb | 4 - .../models/sync_database_id_list_result.rb | 4 - .../models/sync_database_id_properties.rb | 2 - .../models/sync_full_schema_properties.rb | 4 - ...sync_full_schema_properties_list_result.rb | 4 - .../models/sync_full_schema_table.rb | 7 - .../models/sync_full_schema_table_column.rb | 8 - .../azure_mgmt_sql/models/sync_group.rb | 12 - .../models/sync_group_list_result.rb | 4 - .../models/sync_group_log_list_result.rb | 4 - .../models/sync_group_log_properties.rb | 7 - .../models/sync_group_schema.rb | 4 - .../models/sync_group_schema_table.rb | 4 - .../models/sync_group_schema_table_column.rb | 4 - .../azure_mgmt_sql/models/sync_member.rb | 13 - .../models/sync_member_list_result.rb | 4 - .../azure_mgmt_sql/models/tracked_resource.rb | 7 - .../models/virtual_network_rule.rb | 7 - .../virtual_network_rule_list_result.rb | 4 - .../generated/azure_mgmt_sql/operations.rb | 28 +- .../azure_mgmt_sql/server_advisors.rb | 37 +- .../generated/azure_mgmt_sql/server_keys.rb | 79 +- .../generated/azure_mgmt_sql/servers.rb | 128 +- .../azure_mgmt_sql/sql_management_client.rb | 20 +- .../azure_mgmt_sql/subscription_usages.rb | 39 +- .../generated/azure_mgmt_sql/sync_agents.rb | 118 +- .../generated/azure_mgmt_sql/sync_groups.rb | 225 ++-- .../generated/azure_mgmt_sql/sync_members.rb | 147 ++- .../generated/azure_mgmt_sql/version.rb | 8 + .../azure_mgmt_sql/virtual_network_rules.rb | 79 +- .../generated/azure_mgmt_sql.rb | 92 +- .../backup_long_term_retention_policies.rb | 401 ++++++ ...ta_warehouse_user_activities_operations.rb | 133 ++ .../database_blob_auditing_policies.rb | 258 ++++ .../azure_mgmt_sql/database_operations.rb | 47 +- ...vulnerability_assessment_rule_baselines.rb | 399 ++++++ .../database_vulnerability_assessments.rb | 355 ++++++ .../generated/azure_mgmt_sql/databases.rb | 208 ++-- ...xtended_database_blob_auditing_policies.rb | 258 ++++ .../extended_server_blob_auditing_policies.rb | 290 +++++ .../generated/azure_mgmt_sql/job_agents.rb | 814 ++++++++++++ .../azure_mgmt_sql/job_credentials.rb | 568 +++++++++ .../azure_mgmt_sql/job_executions.rb | 1093 +++++++++++++++++ .../azure_mgmt_sql/job_step_executions.rb | 412 +++++++ .../generated/azure_mgmt_sql/job_steps.rb | 921 ++++++++++++++ .../azure_mgmt_sql/job_target_executions.rb | 692 +++++++++++ .../azure_mgmt_sql/job_target_groups.rb | 568 +++++++++ .../generated/azure_mgmt_sql/job_versions.rb | 355 ++++++ .../generated/azure_mgmt_sql/jobs.rb | 567 +++++++++ .../long_term_retention_backups.rb | 917 ++++++++++++++ .../azure_mgmt_sql/managed_databases.rb | 962 +++++++++++++++ .../models/automatic_tuning_server_options.rb | 5 - .../backup_long_term_retention_policy.rb | 102 ++ .../models/blob_auditing_policy_state.rb | 16 + .../complete_database_restore_definition.rb | 45 + ...reate_database_restore_point_definition.rb | 2 - .../azure_mgmt_sql/models/create_mode.rb | 1 + .../models/data_warehouse_user_activities.rb | 69 ++ .../azure_mgmt_sql/models/database.rb | 47 +- .../models/database_blob_auditing_policy.rb | 225 ++++ .../models/database_list_result.rb | 4 - .../models/database_operation.rb | 48 +- .../models/database_operation_list_result.rb | 4 - .../azure_mgmt_sql/models/database_status.rb | 32 + .../azure_mgmt_sql/models/database_update.rb | 42 +- .../database_vulnerability_assessment.rb | 93 ++ ..._vulnerability_assessment_rule_baseline.rb | 78 ++ ...erability_assessment_rule_baseline_item.rb | 53 + .../extended_database_blob_auditing_policy.rb | 225 ++++ .../extended_server_blob_auditing_policy.rb | 225 ++++ .../import_export_database_definition.rb | 11 - .../models/import_export_operation_result.rb | 13 - .../generated/azure_mgmt_sql/models/job.rb | 92 ++ .../azure_mgmt_sql/models/job_agent.rb | 112 ++ .../models/job_agent_list_result.rb | 96 ++ .../azure_mgmt_sql/models/job_agent_state.rb | 19 + .../azure_mgmt_sql/models/job_agent_update.rb | 51 + .../azure_mgmt_sql/models/job_credential.rb | 79 ++ .../models/job_credential_list_result.rb | 96 ++ .../azure_mgmt_sql/models/job_execution.rb | 207 ++++ .../models/job_execution_lifecycle.rb | 24 + .../models/job_execution_list_result.rb | 96 ++ .../models/job_execution_target.rb | 69 ++ .../azure_mgmt_sql/models/job_list_result.rb | 96 ++ .../azure_mgmt_sql/models/job_schedule.rb | 92 ++ .../models/job_schedule_type.rb | 16 + .../azure_mgmt_sql/models/job_step.rb | 125 ++ .../azure_mgmt_sql/models/job_step_action.rb | 69 ++ .../models/job_step_action_source.rb | 15 + .../models/job_step_action_type.rb | 15 + .../models/job_step_execution_options.rb | 94 ++ .../models/job_step_list_result.rb | 96 ++ .../azure_mgmt_sql/models/job_step_output.rb | 118 ++ .../models/job_step_output_type.rb | 15 + .../azure_mgmt_sql/models/job_target.rb | 113 ++ .../azure_mgmt_sql/models/job_target_group.rb | 76 ++ .../models/job_target_group_list_result.rb | 96 ++ .../job_target_group_membership_type.rb | 16 + .../azure_mgmt_sql/models/job_target_type.rb | 19 + .../azure_mgmt_sql/models/job_version.rb | 58 + .../models/job_version_list_result.rb | 96 ++ .../models/long_term_retention_backup.rb | 124 ++ .../long_term_retention_backup_list_result.rb | 96 ++ .../long_term_retention_database_state.rb | 17 + .../azure_mgmt_sql/models/managed_database.rb | 223 ++++ .../models/managed_database_create_mode.rb | 17 + .../models/managed_database_list_result.rb | 96 ++ .../models/managed_database_status.rb | 19 + .../models/managed_database_update.rb | 195 +++ .../models/provisioning_state.rb | 19 + .../azure_mgmt_sql/models/proxy_resource.rb | 4 - .../azure_mgmt_sql/models/resource.rb | 4 - .../models/resource_move_definition.rb | 2 - .../azure_mgmt_sql/models/restore_point.rb | 116 ++ .../models/restore_point_list_result.rb | 64 + .../models/security_alert_state.rb | 16 + .../models/server_automatic_tuning.rb | 8 - .../models/server_blob_auditing_policy.rb | 214 ++++ .../azure_mgmt_sql/models/server_dns_alias.rb | 5 - .../models/server_dns_alias_acquisition.rb | 2 - .../models/server_dns_alias_list_result.rb | 4 - .../models/server_security_alert_policy.rb | 153 +++ .../generated/azure_mgmt_sql/models/sku.rb | 91 ++ .../azure_mgmt_sql/models/tracked_resource.rb | 7 - ...ability_assessment_policy_baseline_name.rb | 16 + ...y_assessment_recurring_scans_properties.rb | 75 ++ .../azure_mgmt_sql/restore_points.rb | 507 ++++++++ .../server_automatic_tuning_operations.rb | 32 +- .../server_blob_auditing_policies.rb | 290 +++++ .../azure_mgmt_sql/server_dns_aliases.rb | 106 +- .../server_security_alert_policies.rb | 290 +++++ .../azure_mgmt_sql/sql_management_client.rb | 95 +- .../generated/azure_mgmt_sql/version.rb | 8 + .../azure_mgmt_sql/lib/azure_mgmt_sql.rb | 2 +- .../latest/modules/sql_profile_module.rb | 908 +++++++++----- 340 files changed, 22493 insertions(+), 3658 deletions(-) create mode 100644 management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_advisors.rb create mode 100644 management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/version.rb create mode 100644 management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_automatic_tuning_operations.rb create mode 100644 management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/firewall_rules.rb create mode 100644 management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/managed_instances.rb create mode 100644 management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_disabled_reason.rb create mode 100644 management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_mode.rb create mode 100644 management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_option_mode_actual.rb create mode 100644 management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_option_mode_desired.rb create mode 100644 management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_options.rb create mode 100644 management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/database_automatic_tuning.rb create mode 100644 management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule.rb create mode 100644 management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule_list.rb create mode 100644 management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule_list_result.rb create mode 100644 management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance.rb create mode 100644 management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance_list_result.rb create mode 100644 management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance_update.rb create mode 100644 management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/proxy_resource_with_writable_name.rb create mode 100644 management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/resource_with_writable_name.rb create mode 100644 management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sku.rb create mode 100644 management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/version.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/backup_long_term_retention_policies.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/data_warehouse_user_activities_operations.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_blob_auditing_policies.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessment_rule_baselines.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessments.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/extended_database_blob_auditing_policies.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/extended_server_blob_auditing_policies.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_agents.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_credentials.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_executions.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_step_executions.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_steps.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_target_executions.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_target_groups.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_versions.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/jobs.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/managed_databases.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/backup_long_term_retention_policy.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/blob_auditing_policy_state.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/complete_database_restore_definition.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/data_warehouse_user_activities.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_status.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_rule_baseline.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_rule_baseline_item.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/extended_database_blob_auditing_policy.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/extended_server_blob_auditing_policy.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_list_result.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_state.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_update.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_credential.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_credential_list_result.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_lifecycle.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_list_result.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_target.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_list_result.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_schedule.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_schedule_type.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action_source.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action_type.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_execution_options.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_list_result.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_output.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_output_type.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group_list_result.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group_membership_type.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_type.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_version.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_version_list_result.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_backup.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_backup_list_result.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_database_state.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_create_mode.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_list_result.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_status.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_update.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/provisioning_state.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/restore_point.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/restore_point_list_result.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/security_alert_state.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_blob_auditing_policy.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_security_alert_policy.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/sku.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_policy_baseline_name.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_recurring_scans_properties.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/restore_points.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_blob_auditing_policies.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_security_alert_policies.rb create mode 100644 management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/version.rb diff --git a/azure_sdk/lib/azure_sdk.rb b/azure_sdk/lib/azure_sdk.rb index 4de13c3d8b..3d3eabaa94 100644 --- a/azure_sdk/lib/azure_sdk.rb +++ b/azure_sdk/lib/azure_sdk.rb @@ -2,5 +2,5 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -require 'latest/latest_profile_client' require 'v2017_03_09/v2017_03_09_profile_client' +require 'latest/latest_profile_client' diff --git a/azure_sdk/lib/latest/modules/sql_profile_module.rb b/azure_sdk/lib/latest/modules/sql_profile_module.rb index 898e09880e..cc8451ce3c 100644 --- a/azure_sdk/lib/latest/modules/sql_profile_module.rb +++ b/azure_sdk/lib/latest/modules/sql_profile_module.rb @@ -7,11 +7,9 @@ module Azure::Profiles::Latest module SQL module Mgmt - BackupLongTermRetentionPolicies = Azure::SQL::Mgmt::V2014_04_01::BackupLongTermRetentionPolicies BackupLongTermRetentionVaults = Azure::SQL::Mgmt::V2014_04_01::BackupLongTermRetentionVaults RecoverableDatabases = Azure::SQL::Mgmt::V2014_04_01::RecoverableDatabases RestorableDroppedDatabases = Azure::SQL::Mgmt::V2014_04_01::RestorableDroppedDatabases - RestorePoints = Azure::SQL::Mgmt::V2014_04_01::RestorePoints Capabilities = Azure::SQL::Mgmt::V2014_04_01::Capabilities ServerConnectionPolicies = Azure::SQL::Mgmt::V2014_04_01::ServerConnectionPolicies DatabaseThreatDetectionPolicies = Azure::SQL::Mgmt::V2014_04_01::DatabaseThreatDetectionPolicies @@ -21,18 +19,17 @@ module Mgmt Extensions = Azure::SQL::Mgmt::V2014_04_01::Extensions DisasterRecoveryConfigurations = Azure::SQL::Mgmt::V2014_04_01::DisasterRecoveryConfigurations ElasticPools = Azure::SQL::Mgmt::V2014_04_01::ElasticPools - FirewallRules = Azure::SQL::Mgmt::V2014_04_01::FirewallRules GeoBackupPolicies = Azure::SQL::Mgmt::V2014_04_01::GeoBackupPolicies Queries = Azure::SQL::Mgmt::V2014_04_01::Queries QueryStatistics = Azure::SQL::Mgmt::V2014_04_01::QueryStatistics QueryTexts = Azure::SQL::Mgmt::V2014_04_01::QueryTexts + RecommendedElasticPools = Azure::SQL::Mgmt::V2014_04_01::RecommendedElasticPools ReplicationLinks = Azure::SQL::Mgmt::V2014_04_01::ReplicationLinks ServerAzureADAdministrators = Azure::SQL::Mgmt::V2014_04_01::ServerAzureADAdministrators ServerCommunicationLinks = Azure::SQL::Mgmt::V2014_04_01::ServerCommunicationLinks ServiceObjectives = Azure::SQL::Mgmt::V2014_04_01::ServiceObjectives ElasticPoolActivities = Azure::SQL::Mgmt::V2014_04_01::ElasticPoolActivities ElasticPoolDatabaseActivities = Azure::SQL::Mgmt::V2014_04_01::ElasticPoolDatabaseActivities - RecommendedElasticPools = Azure::SQL::Mgmt::V2014_04_01::RecommendedElasticPools ServiceTierAdvisors = Azure::SQL::Mgmt::V2014_04_01::ServiceTierAdvisors TransparentDataEncryptions = Azure::SQL::Mgmt::V2014_04_01::TransparentDataEncryptions TransparentDataEncryptionActivities = Azure::SQL::Mgmt::V2014_04_01::TransparentDataEncryptionActivities @@ -44,9 +41,11 @@ module Mgmt DatabaseAdvisors = Azure::SQL::Mgmt::V2015_05_01_preview::DatabaseAdvisors DatabaseRecommendedActions = Azure::SQL::Mgmt::V2015_05_01_preview::DatabaseRecommendedActions ServerAdvisors = Azure::SQL::Mgmt::V2015_05_01_preview::ServerAdvisors - DatabaseBlobAuditingPolicies = Azure::SQL::Mgmt::V2015_05_01_preview::DatabaseBlobAuditingPolicies + DatabaseAutomaticTuningOperations = Azure::SQL::Mgmt::V2015_05_01_preview::DatabaseAutomaticTuningOperations EncryptionProtectors = Azure::SQL::Mgmt::V2015_05_01_preview::EncryptionProtectors FailoverGroups = Azure::SQL::Mgmt::V2015_05_01_preview::FailoverGroups + FirewallRules = Azure::SQL::Mgmt::V2015_05_01_preview::FirewallRules + ManagedInstances = Azure::SQL::Mgmt::V2015_05_01_preview::ManagedInstances Operations = Azure::SQL::Mgmt::V2015_05_01_preview::Operations ServerKeys = Azure::SQL::Mgmt::V2015_05_01_preview::ServerKeys Servers = Azure::SQL::Mgmt::V2015_05_01_preview::Servers @@ -55,101 +54,115 @@ module Mgmt SyncMembers = Azure::SQL::Mgmt::V2015_05_01_preview::SyncMembers SubscriptionUsages = Azure::SQL::Mgmt::V2015_05_01_preview::SubscriptionUsages VirtualNetworkRules = Azure::SQL::Mgmt::V2015_05_01_preview::VirtualNetworkRules + ExtendedDatabaseBlobAuditingPolicies = Azure::SQL::Mgmt::V2017_03_01_preview::ExtendedDatabaseBlobAuditingPolicies + ExtendedServerBlobAuditingPolicies = Azure::SQL::Mgmt::V2017_03_01_preview::ExtendedServerBlobAuditingPolicies + ServerBlobAuditingPolicies = Azure::SQL::Mgmt::V2017_03_01_preview::ServerBlobAuditingPolicies + DatabaseBlobAuditingPolicies = Azure::SQL::Mgmt::V2017_03_01_preview::DatabaseBlobAuditingPolicies DatabaseOperations = Azure::SQL::Mgmt::V2017_03_01_preview::DatabaseOperations Databases = Azure::SQL::Mgmt::V2017_03_01_preview::Databases - DatabaseRestorePoints = Azure::SQL::Mgmt::V2017_03_01_preview::DatabaseRestorePoints + DatabaseVulnerabilityAssessmentRuleBaselines = Azure::SQL::Mgmt::V2017_03_01_preview::DatabaseVulnerabilityAssessmentRuleBaselines + DatabaseVulnerabilityAssessments = Azure::SQL::Mgmt::V2017_03_01_preview::DatabaseVulnerabilityAssessments + DataWarehouseUserActivitiesOperations = Azure::SQL::Mgmt::V2017_03_01_preview::DataWarehouseUserActivitiesOperations + JobAgents = Azure::SQL::Mgmt::V2017_03_01_preview::JobAgents + JobCredentials = Azure::SQL::Mgmt::V2017_03_01_preview::JobCredentials + JobExecutions = Azure::SQL::Mgmt::V2017_03_01_preview::JobExecutions + Jobs = Azure::SQL::Mgmt::V2017_03_01_preview::Jobs + JobStepExecutions = Azure::SQL::Mgmt::V2017_03_01_preview::JobStepExecutions + JobSteps = Azure::SQL::Mgmt::V2017_03_01_preview::JobSteps + JobTargetExecutions = Azure::SQL::Mgmt::V2017_03_01_preview::JobTargetExecutions + JobTargetGroups = Azure::SQL::Mgmt::V2017_03_01_preview::JobTargetGroups + JobVersions = Azure::SQL::Mgmt::V2017_03_01_preview::JobVersions + LongTermRetentionBackups = Azure::SQL::Mgmt::V2017_03_01_preview::LongTermRetentionBackups + BackupLongTermRetentionPolicies = Azure::SQL::Mgmt::V2017_03_01_preview::BackupLongTermRetentionPolicies + ManagedDatabases = Azure::SQL::Mgmt::V2017_03_01_preview::ManagedDatabases + RestorePoints = Azure::SQL::Mgmt::V2017_03_01_preview::RestorePoints ServerAutomaticTuningOperations = Azure::SQL::Mgmt::V2017_03_01_preview::ServerAutomaticTuningOperations ServerDnsAliases = Azure::SQL::Mgmt::V2017_03_01_preview::ServerDnsAliases module Models - FirewallRuleListResult = Azure::SQL::Mgmt::V2014_04_01::Models::FirewallRuleListResult - DisasterRecoveryConfigurationListResult = Azure::SQL::Mgmt::V2014_04_01::Models::DisasterRecoveryConfigurationListResult - ServerAdministratorListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ServerAdministratorListResult - ServerUsage = Azure::SQL::Mgmt::V2014_04_01::Models::ServerUsage - ServiceTierAdvisorListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ServiceTierAdvisorListResult - ReplicationLinkListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ReplicationLinkListResult - ElasticPoolDatabaseActivityListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDatabaseActivityListResult - RecommendedElasticPoolMetric = Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolMetric - ElasticPoolActivityListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolActivityListResult - ServerUsageListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ServerUsageListResult - RecoverableDatabaseListResult = Azure::SQL::Mgmt::V2014_04_01::Models::RecoverableDatabaseListResult - QueryTextListResult = Azure::SQL::Mgmt::V2014_04_01::Models::QueryTextListResult - RestorableDroppedDatabaseListResult = Azure::SQL::Mgmt::V2014_04_01::Models::RestorableDroppedDatabaseListResult - QueryText = Azure::SQL::Mgmt::V2014_04_01::Models::QueryText - RestorePointListResult = Azure::SQL::Mgmt::V2014_04_01::Models::RestorePointListResult - QueryStatisticListResult = Azure::SQL::Mgmt::V2014_04_01::Models::QueryStatisticListResult - ServiceObjectiveCapability = Azure::SQL::Mgmt::V2014_04_01::Models::ServiceObjectiveCapability + MetricValue = Azure::SQL::Mgmt::V2014_04_01::Models::MetricValue + ServiceObjectiveListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ServiceObjectiveListResult DataMaskingRuleListResult = Azure::SQL::Mgmt::V2014_04_01::Models::DataMaskingRuleListResult - ElasticPoolPerDatabaseMinDtuCapability = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolPerDatabaseMinDtuCapability + QueryText = Azure::SQL::Mgmt::V2014_04_01::Models::QueryText + DatabaseUsageListResult = Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseUsageListResult TransparentDataEncryptionListResult = Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionListResult - ElasticPoolDtuCapability = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDtuCapability + DatabaseUsage = Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseUsage ExtensionListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ExtensionListResult - ServerVersionCapability = Azure::SQL::Mgmt::V2014_04_01::Models::ServerVersionCapability - TopQueriesListResult = Azure::SQL::Mgmt::V2014_04_01::Models::TopQueriesListResult - CheckNameAvailabilityRequest = Azure::SQL::Mgmt::V2014_04_01::Models::CheckNameAvailabilityRequest - TopQueries = Azure::SQL::Mgmt::V2014_04_01::Models::TopQueries - TransparentDataEncryptionActivityListResult = Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivityListResult - QueryStatistic = Azure::SQL::Mgmt::V2014_04_01::Models::QueryStatistic - QueryInterval = Azure::SQL::Mgmt::V2014_04_01::Models::QueryInterval - OperationImpact = Azure::SQL::Mgmt::V2014_04_01::Models::OperationImpact - ElasticPoolListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolListResult + ServerUsageListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ServerUsageListResult ServerCommunicationLinkListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ServerCommunicationLinkListResult - QueryMetric = Azure::SQL::Mgmt::V2014_04_01::Models::QueryMetric - AdvisorListResult = Azure::SQL::Mgmt::V2014_04_01::Models::AdvisorListResult - BackupLongTermRetentionVaultListResult = Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionVaultListResult - RecommendedElasticPoolListResult = Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolListResult - GeoBackupPolicyListResult = Azure::SQL::Mgmt::V2014_04_01::Models::GeoBackupPolicyListResult + ServerUsage = Azure::SQL::Mgmt::V2014_04_01::Models::ServerUsage + DisasterRecoveryConfigurationListResult = Azure::SQL::Mgmt::V2014_04_01::Models::DisasterRecoveryConfigurationListResult MaxSizeCapability = Azure::SQL::Mgmt::V2014_04_01::Models::MaxSizeCapability - ImportExtensionRequest = Azure::SQL::Mgmt::V2014_04_01::Models::ImportExtensionRequest + ServerAdministratorListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ServerAdministratorListResult + EditionCapability = Azure::SQL::Mgmt::V2014_04_01::Models::EditionCapability ElasticPoolPerDatabaseMaxDtuCapability = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolPerDatabaseMaxDtuCapability - DatabaseUsageListResult = Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseUsageListResult + ElasticPoolListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolListResult + ElasticPoolEditionCapability = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolEditionCapability + ReplicationLinkListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ReplicationLinkListResult LocationCapabilities = Azure::SQL::Mgmt::V2014_04_01::Models::LocationCapabilities - DatabaseUsage = Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseUsage + CheckNameAvailabilityResponse = Azure::SQL::Mgmt::V2014_04_01::Models::CheckNameAvailabilityResponse + RecommendedElasticPoolListMetricsResult = Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolListMetricsResult SloUsageMetric = Azure::SQL::Mgmt::V2014_04_01::Models::SloUsageMetric + GeoBackupPolicyListResult = Azure::SQL::Mgmt::V2014_04_01::Models::GeoBackupPolicyListResult + TableAuditingPolicyProperties = Azure::SQL::Mgmt::V2014_04_01::Models::TableAuditingPolicyProperties + ImportExtensionRequest = Azure::SQL::Mgmt::V2014_04_01::Models::ImportExtensionRequest + TransparentDataEncryptionActivityListResult = Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivityListResult + RecommendedElasticPoolListResult = Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolListResult + ElasticPoolDatabaseActivityListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDatabaseActivityListResult + RecommendedElasticPoolMetric = Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolMetric + ElasticPoolActivityListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolActivityListResult ExportRequest = Azure::SQL::Mgmt::V2014_04_01::Models::ExportRequest - DatabaseTableAuditingPolicyListResult = Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseTableAuditingPolicyListResult - MetricValue = Azure::SQL::Mgmt::V2014_04_01::Models::MetricValue - BackupLongTermRetentionPolicyListResult = Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionPolicyListResult + QueryTextListResult = Azure::SQL::Mgmt::V2014_04_01::Models::QueryTextListResult + BackupLongTermRetentionVaultListResult = Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionVaultListResult MetricName = Azure::SQL::Mgmt::V2014_04_01::Models::MetricName - ServiceObjectiveListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ServiceObjectiveListResult + RestorableDroppedDatabaseListResult = Azure::SQL::Mgmt::V2014_04_01::Models::RestorableDroppedDatabaseListResult Metric = Azure::SQL::Mgmt::V2014_04_01::Models::Metric - ElasticPoolEditionCapability = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolEditionCapability + ElasticPoolPerDatabaseMinDtuCapability = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolPerDatabaseMinDtuCapability MetricListResult = Azure::SQL::Mgmt::V2014_04_01::Models::MetricListResult - TableAuditingPolicyProperties = Azure::SQL::Mgmt::V2014_04_01::Models::TableAuditingPolicyProperties + ServerVersionCapability = Azure::SQL::Mgmt::V2014_04_01::Models::ServerVersionCapability MetricAvailability = Azure::SQL::Mgmt::V2014_04_01::Models::MetricAvailability - RecommendedElasticPoolListMetricsResult = Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolListMetricsResult + ServerTableAuditingPolicyListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ServerTableAuditingPolicyListResult MetricDefinition = Azure::SQL::Mgmt::V2014_04_01::Models::MetricDefinition - CheckNameAvailabilityResponse = Azure::SQL::Mgmt::V2014_04_01::Models::CheckNameAvailabilityResponse + OperationImpact = Azure::SQL::Mgmt::V2014_04_01::Models::OperationImpact MetricDefinitionListResult = Azure::SQL::Mgmt::V2014_04_01::Models::MetricDefinitionListResult - EditionCapability = Azure::SQL::Mgmt::V2014_04_01::Models::EditionCapability - ServerTableAuditingPolicyListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ServerTableAuditingPolicyListResult - BackupLongTermRetentionPolicy = Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionPolicy + BackupLongTermRetentionPolicyListResult = Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionPolicyListResult + ServiceObjectiveCapability = Azure::SQL::Mgmt::V2014_04_01::Models::ServiceObjectiveCapability + CheckNameAvailabilityRequest = Azure::SQL::Mgmt::V2014_04_01::Models::CheckNameAvailabilityRequest + QueryMetric = Azure::SQL::Mgmt::V2014_04_01::Models::QueryMetric + ServiceTierAdvisorListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ServiceTierAdvisorListResult + QueryInterval = Azure::SQL::Mgmt::V2014_04_01::Models::QueryInterval + RecoverableDatabaseListResult = Azure::SQL::Mgmt::V2014_04_01::Models::RecoverableDatabaseListResult + QueryStatistic = Azure::SQL::Mgmt::V2014_04_01::Models::QueryStatistic + DatabaseTableAuditingPolicyListResult = Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseTableAuditingPolicyListResult + TopQueries = Azure::SQL::Mgmt::V2014_04_01::Models::TopQueries + ElasticPoolDtuCapability = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDtuCapability + TopQueriesListResult = Azure::SQL::Mgmt::V2014_04_01::Models::TopQueriesListResult + AdvisorListResult = Azure::SQL::Mgmt::V2014_04_01::Models::AdvisorListResult + QueryStatisticListResult = Azure::SQL::Mgmt::V2014_04_01::Models::QueryStatisticListResult BackupLongTermRetentionVault = Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionVault RecoverableDatabase = Azure::SQL::Mgmt::V2014_04_01::Models::RecoverableDatabase RestorableDroppedDatabase = Azure::SQL::Mgmt::V2014_04_01::Models::RestorableDroppedDatabase - RestorePoint = Azure::SQL::Mgmt::V2014_04_01::Models::RestorePoint ServerConnectionPolicy = Azure::SQL::Mgmt::V2014_04_01::Models::ServerConnectionPolicy ServiceTierAdvisor = Azure::SQL::Mgmt::V2014_04_01::Models::ServiceTierAdvisor TransparentDataEncryption = Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryption RecommendedIndex = Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedIndex - TransparentDataEncryptionActivity = Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivity - ElasticPoolDatabaseActivity = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDatabaseActivity - ElasticPoolActivity = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolActivity - RecommendedElasticPool = Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPool DatabaseSecurityAlertPolicy = Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseSecurityAlertPolicy DataMaskingPolicy = Azure::SQL::Mgmt::V2014_04_01::Models::DataMaskingPolicy DataMaskingRule = Azure::SQL::Mgmt::V2014_04_01::Models::DataMaskingRule DisasterRecoveryConfiguration = Azure::SQL::Mgmt::V2014_04_01::Models::DisasterRecoveryConfiguration ElasticPool = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPool ElasticPoolUpdate = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolUpdate - FirewallRule = Azure::SQL::Mgmt::V2014_04_01::Models::FirewallRule GeoBackupPolicy = Azure::SQL::Mgmt::V2014_04_01::Models::GeoBackupPolicy ImportExportResponse = Azure::SQL::Mgmt::V2014_04_01::Models::ImportExportResponse ImportRequest = Azure::SQL::Mgmt::V2014_04_01::Models::ImportRequest + RecommendedElasticPool = Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPool ReplicationLink = Azure::SQL::Mgmt::V2014_04_01::Models::ReplicationLink ServerAzureADAdministrator = Azure::SQL::Mgmt::V2014_04_01::Models::ServerAzureADAdministrator ServerCommunicationLink = Azure::SQL::Mgmt::V2014_04_01::Models::ServerCommunicationLink ServiceObjective = Azure::SQL::Mgmt::V2014_04_01::Models::ServiceObjective + ElasticPoolActivity = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolActivity + ElasticPoolDatabaseActivity = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDatabaseActivity + TransparentDataEncryptionActivity = Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivity DatabaseConnectionPolicy = Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseConnectionPolicy DatabaseTableAuditingPolicy = Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseTableAuditingPolicy ServerTableAuditingPolicy = Azure::SQL::Mgmt::V2014_04_01::Models::ServerTableAuditingPolicy @@ -166,8 +179,6 @@ module Models RecommendedIndexState = Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedIndexState RecommendedIndexType = Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedIndexType ReadScale = Azure::SQL::Mgmt::V2014_04_01::Models::ReadScale - TransparentDataEncryptionActivityStatus = Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivityStatus - ElasticPoolEdition = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolEdition SecurityAlertPolicyState = Azure::SQL::Mgmt::V2014_04_01::Models::SecurityAlertPolicyState SecurityAlertPolicyEmailAccountAdmins = Azure::SQL::Mgmt::V2014_04_01::Models::SecurityAlertPolicyEmailAccountAdmins SecurityAlertPolicyUseServerDefault = Azure::SQL::Mgmt::V2014_04_01::Models::SecurityAlertPolicyUseServerDefault @@ -179,6 +190,7 @@ module Models DisasterRecoveryConfigurationFailoverPolicy = Azure::SQL::Mgmt::V2014_04_01::Models::DisasterRecoveryConfigurationFailoverPolicy DisasterRecoveryConfigurationRole = Azure::SQL::Mgmt::V2014_04_01::Models::DisasterRecoveryConfigurationRole ElasticPoolState = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolState + ElasticPoolEdition = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolEdition GeoBackupPolicyState = Azure::SQL::Mgmt::V2014_04_01::Models::GeoBackupPolicyState StorageKeyType = Azure::SQL::Mgmt::V2014_04_01::Models::StorageKeyType AuthenticationType = Azure::SQL::Mgmt::V2014_04_01::Models::AuthenticationType @@ -193,47 +205,57 @@ module Models ReplicationState = Azure::SQL::Mgmt::V2014_04_01::Models::ReplicationState ServerVersion = Azure::SQL::Mgmt::V2014_04_01::Models::ServerVersion ServerState = Azure::SQL::Mgmt::V2014_04_01::Models::ServerState - ServerKeyListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerKeyListResult + TransparentDataEncryptionActivityStatus = Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivityStatus + OperationDisplay = Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationDisplay + Operation = Azure::SQL::Mgmt::V2015_05_01_preview::Models::Operation + RecommendedActionImplementationInfo = Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionImplementationInfo + OperationListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationListResult + RecommendedActionImpactRecord = Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionImpactRecord + ManagedInstanceUpdate = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstanceUpdate + FirewallRuleList = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FirewallRuleList ResourceIdentity = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ResourceIdentity + SyncGroupSchema = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchema + SyncDatabaseIdListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncDatabaseIdListResult + SyncGroupSchemaTable = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchemaTable + SyncFullSchemaTable = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaTable + SyncGroupSchemaTableColumn = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchemaTableColumn + ManagedInstanceListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstanceListResult + EncryptionProtectorListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::EncryptionProtectorListResult + SyncFullSchemaTableColumn = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaTableColumn + FailoverGroupReadOnlyEndpoint = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupReadOnlyEndpoint RecommendedActionStateInfo = Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionStateInfo + SyncGroupLogProperties = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupLogProperties RecommendedActionErrorInfo = Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionErrorInfo - ServerListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerListResult + FailoverGroupListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupListResult RecommendedActionMetricInfo = Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionMetricInfo + SyncFullSchemaPropertiesListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaPropertiesListResult + FirewallRuleListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FirewallRuleListResult + ServerKeyListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerKeyListResult VirtualNetworkRuleListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::VirtualNetworkRuleListResult - RecommendedActionImpactRecord = Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionImpactRecord - SyncGroupListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupListResult - SyncGroupSchema = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchema - SyncGroupLogProperties = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupLogProperties - FailoverGroupReadWriteEndpoint = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupReadWriteEndpoint SyncGroupLogListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupLogListResult + ServerListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerListResult PartnerInfo = Azure::SQL::Mgmt::V2015_05_01_preview::Models::PartnerInfo ServerUpdate = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerUpdate - FailoverGroupUpdate = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupUpdate + ResourceWithWritableName = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ResourceWithWritableName SubscriptionUsageListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SubscriptionUsageListResult - OperationDisplay = Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationDisplay + SyncGroupListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupListResult SyncAgentListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncAgentListResult - OperationListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationListResult + FailoverGroupReadWriteEndpoint = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupReadWriteEndpoint SyncAgentKeyProperties = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncAgentKeyProperties - SyncFullSchemaPropertiesListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaPropertiesListResult - RecommendedActionImplementationInfo = Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionImplementationInfo + SyncFullSchemaProperties = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaProperties SyncMemberListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncMemberListResult - FailoverGroupReadOnlyEndpoint = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupReadOnlyEndpoint + FailoverGroupUpdate = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupUpdate SyncAgentLinkedDatabaseListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncAgentLinkedDatabaseListResult - FailoverGroupListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupListResult + AutomaticTuningOptions = Azure::SQL::Mgmt::V2015_05_01_preview::Models::AutomaticTuningOptions SyncDatabaseIdProperties = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncDatabaseIdProperties - SyncGroupSchemaTableColumn = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchemaTableColumn - SyncDatabaseIdListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncDatabaseIdListResult - SyncGroupSchemaTable = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchemaTable - SyncFullSchemaTableColumn = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaTableColumn - EncryptionProtectorListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::EncryptionProtectorListResult - SyncFullSchemaTable = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaTable - Operation = Azure::SQL::Mgmt::V2015_05_01_preview::Models::Operation - SyncFullSchemaProperties = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaProperties RecommendedAction = Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedAction Advisor = Azure::SQL::Mgmt::V2015_05_01_preview::Models::Advisor - DatabaseBlobAuditingPolicy = Azure::SQL::Mgmt::V2015_05_01_preview::Models::DatabaseBlobAuditingPolicy + DatabaseAutomaticTuning = Azure::SQL::Mgmt::V2015_05_01_preview::Models::DatabaseAutomaticTuning EncryptionProtector = Azure::SQL::Mgmt::V2015_05_01_preview::Models::EncryptionProtector FailoverGroup = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroup + ProxyResourceWithWritableName = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ProxyResourceWithWritableName + FirewallRule = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FirewallRule + ManagedInstance = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstance ServerKey = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerKey Server = Azure::SQL::Mgmt::V2015_05_01_preview::Models::Server SyncAgent = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncAgent @@ -249,13 +271,14 @@ module Models RecommendedActionInitiatedBy = Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionInitiatedBy ImplementationMethod = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ImplementationMethod IsRetryable = Azure::SQL::Mgmt::V2015_05_01_preview::Models::IsRetryable - BlobAuditingPolicyState = Azure::SQL::Mgmt::V2015_05_01_preview::Models::BlobAuditingPolicyState + AutomaticTuningMode = Azure::SQL::Mgmt::V2015_05_01_preview::Models::AutomaticTuningMode + AutomaticTuningDisabledReason = Azure::SQL::Mgmt::V2015_05_01_preview::Models::AutomaticTuningDisabledReason ServerKeyType = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerKeyType ReadWriteEndpointFailoverPolicy = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ReadWriteEndpointFailoverPolicy ReadOnlyEndpointFailoverPolicy = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ReadOnlyEndpointFailoverPolicy FailoverGroupReplicationRole = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupReplicationRole - OperationOrigin = Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationOrigin IdentityType = Azure::SQL::Mgmt::V2015_05_01_preview::Models::IdentityType + OperationOrigin = Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationOrigin SyncAgentState = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncAgentState SyncMemberDbType = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncMemberDbType SyncGroupLogType = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupLogType @@ -264,40 +287,91 @@ module Models SyncDirection = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncDirection SyncMemberState = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncMemberState VirtualNetworkRuleState = Azure::SQL::Mgmt::V2015_05_01_preview::Models::VirtualNetworkRuleState + JobSchedule = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobSchedule + JobCredentialListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobCredentialListResult + VulnerabilityAssessmentRecurringScansProperties = Azure::SQL::Mgmt::V2017_03_01_preview::Models::VulnerabilityAssessmentRecurringScansProperties + ManagedDatabaseUpdate = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabaseUpdate + JobTargetGroupListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTargetGroupListResult + ResourceMoveDefinition = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ResourceMoveDefinition + ServerDnsAliasListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerDnsAliasListResult + RestorePointListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::RestorePointListResult + JobTarget = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTarget + LongTermRetentionBackupListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackupListResult + JobAgentListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgentListResult + CreateDatabaseRestorePointDefinition = Azure::SQL::Mgmt::V2017_03_01_preview::Models::CreateDatabaseRestorePointDefinition + JobAgentUpdate = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgentUpdate DatabaseUpdate = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseUpdate + JobStepListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepListResult + JobVersionListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobVersionListResult + ServerDnsAliasAcquisition = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerDnsAliasAcquisition AutomaticTuningServerOptions = Azure::SQL::Mgmt::V2017_03_01_preview::Models::AutomaticTuningServerOptions - DatabaseOperationListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseOperationListResult - CreateDatabaseRestorePointDefinition = Azure::SQL::Mgmt::V2017_03_01_preview::Models::CreateDatabaseRestorePointDefinition - DatabaseRestorePointListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseRestorePointListResult - ArmSku = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ArmSku + JobExecutionTarget = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionTarget + CompleteDatabaseRestoreDefinition = Azure::SQL::Mgmt::V2017_03_01_preview::Models::CompleteDatabaseRestoreDefinition + JobStepExecutionOptions = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepExecutionOptions + Sku = Azure::SQL::Mgmt::V2017_03_01_preview::Models::Sku + JobExecutionListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionListResult ImportExportDatabaseDefinition = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ImportExportDatabaseDefinition - DatabaseListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseListResult - ServerDnsAliasListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerDnsAliasListResult - ResourceMoveDefinition = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ResourceMoveDefinition Resource = Azure::SQL::Mgmt::V2017_03_01_preview::Models::Resource - ServerDnsAliasAcquisition = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerDnsAliasAcquisition + ManagedDatabaseListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabaseListResult + DatabaseListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseListResult + JobListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobListResult + DatabaseOperationListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseOperationListResult + JobStepAction = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepAction + DatabaseVulnerabilityAssessmentRuleBaselineItem = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseVulnerabilityAssessmentRuleBaselineItem + JobStepOutput = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepOutput ProxyResource = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ProxyResource + ExtendedDatabaseBlobAuditingPolicy = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ExtendedDatabaseBlobAuditingPolicy + ExtendedServerBlobAuditingPolicy = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ExtendedServerBlobAuditingPolicy + ServerBlobAuditingPolicy = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerBlobAuditingPolicy + DatabaseBlobAuditingPolicy = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseBlobAuditingPolicy DatabaseOperation = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseOperation TrackedResource = Azure::SQL::Mgmt::V2017_03_01_preview::Models::TrackedResource Database = Azure::SQL::Mgmt::V2017_03_01_preview::Models::Database ImportExportOperationResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ImportExportOperationResult - DatabaseRestorePoint = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseRestorePoint + DatabaseVulnerabilityAssessmentRuleBaseline = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseVulnerabilityAssessmentRuleBaseline + DatabaseVulnerabilityAssessment = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseVulnerabilityAssessment + DataWarehouseUserActivities = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DataWarehouseUserActivities + JobAgent = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgent + JobCredential = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobCredential + JobExecution = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecution + Job = Azure::SQL::Mgmt::V2017_03_01_preview::Models::Job + JobStep = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStep + JobTargetGroup = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTargetGroup + JobVersion = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobVersion + LongTermRetentionBackup = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackup + BackupLongTermRetentionPolicy = Azure::SQL::Mgmt::V2017_03_01_preview::Models::BackupLongTermRetentionPolicy + ManagedDatabase = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabase + RestorePoint = Azure::SQL::Mgmt::V2017_03_01_preview::Models::RestorePoint ServerAutomaticTuning = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerAutomaticTuning ServerDnsAlias = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerDnsAlias + BlobAuditingPolicyState = Azure::SQL::Mgmt::V2017_03_01_preview::Models::BlobAuditingPolicyState ManagementOperationState = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagementOperationState CreateMode = Azure::SQL::Mgmt::V2017_03_01_preview::Models::CreateMode SampleName = Azure::SQL::Mgmt::V2017_03_01_preview::Models::SampleName - Status = Azure::SQL::Mgmt::V2017_03_01_preview::Models::Status + DatabaseStatus = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseStatus CatalogCollationType = Azure::SQL::Mgmt::V2017_03_01_preview::Models::CatalogCollationType + JobAgentState = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgentState + JobExecutionLifecycle = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionLifecycle + ProvisioningState = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ProvisioningState + JobTargetType = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTargetType + JobScheduleType = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobScheduleType + JobStepActionType = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepActionType + JobStepActionSource = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepActionSource + JobStepOutputType = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepOutputType + JobTargetGroupMembershipType = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTargetGroupMembershipType + ManagedDatabaseStatus = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabaseStatus + ManagedDatabaseCreateMode = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabaseCreateMode RestorePointType = Azure::SQL::Mgmt::V2017_03_01_preview::Models::RestorePointType AutomaticTuningServerMode = Azure::SQL::Mgmt::V2017_03_01_preview::Models::AutomaticTuningServerMode AutomaticTuningOptionModeDesired = Azure::SQL::Mgmt::V2017_03_01_preview::Models::AutomaticTuningOptionModeDesired AutomaticTuningOptionModeActual = Azure::SQL::Mgmt::V2017_03_01_preview::Models::AutomaticTuningOptionModeActual AutomaticTuningServerReason = Azure::SQL::Mgmt::V2017_03_01_preview::Models::AutomaticTuningServerReason + LongTermRetentionDatabaseState = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionDatabaseState + VulnerabilityAssessmentPolicyBaselineName = Azure::SQL::Mgmt::V2017_03_01_preview::Models::VulnerabilityAssessmentPolicyBaselineName end class SQLManagementClass - attr_reader :backup_long_term_retention_policies, :backup_long_term_retention_vaults, :recoverable_databases, :restorable_dropped_databases, :restore_points, :capabilities, :server_connection_policies, :database_threat_detection_policies, :data_masking_policies, :data_masking_rules, :transparent_data_encryption_configurations, :extensions, :disaster_recovery_configurations, :elastic_pools, :firewall_rules, :geo_backup_policies, :queries, :query_statistics, :query_texts, :replication_links, :server_azure_adadministrators, :server_communication_links, :service_objectives, :elastic_pool_activities, :elastic_pool_database_activities, :recommended_elastic_pools, :service_tier_advisors, :transparent_data_encryptions, :transparent_data_encryption_activities, :server_table_auditing_policies, :database_table_auditing_policies, :database_connection_policies, :server_usages, :database_usages, :database_advisors, :database_recommended_actions, :server_advisors, :database_blob_auditing_policies, :encryption_protectors, :failover_groups, :operations, :server_keys, :servers, :sync_agents, :sync_groups, :sync_members, :subscription_usages, :virtual_network_rules, :database_operations, :databases, :database_restore_points, :server_automatic_tuning_operations, :server_dns_aliases, :configurable, :base_url, :options, :model_classes + attr_reader :backup_long_term_retention_vaults, :recoverable_databases, :restorable_dropped_databases, :capabilities, :server_connection_policies, :database_threat_detection_policies, :data_masking_policies, :data_masking_rules, :transparent_data_encryption_configurations, :extensions, :disaster_recovery_configurations, :elastic_pools, :geo_backup_policies, :queries, :query_statistics, :query_texts, :recommended_elastic_pools, :replication_links, :server_azure_adadministrators, :server_communication_links, :service_objectives, :elastic_pool_activities, :elastic_pool_database_activities, :service_tier_advisors, :transparent_data_encryptions, :transparent_data_encryption_activities, :server_table_auditing_policies, :database_table_auditing_policies, :database_connection_policies, :server_usages, :database_usages, :database_advisors, :database_recommended_actions, :server_advisors, :database_automatic_tuning_operations, :encryption_protectors, :failover_groups, :firewall_rules, :managed_instances, :operations, :server_keys, :servers, :sync_agents, :sync_groups, :sync_members, :subscription_usages, :virtual_network_rules, :extended_database_blob_auditing_policies, :extended_server_blob_auditing_policies, :server_blob_auditing_policies, :database_blob_auditing_policies, :database_operations, :databases, :database_vulnerability_assessment_rule_baselines, :database_vulnerability_assessments, :data_warehouse_user_activities_operations, :job_agents, :job_credentials, :job_executions, :jobs, :job_step_executions, :job_steps, :job_target_executions, :job_target_groups, :job_versions, :long_term_retention_backups, :backup_long_term_retention_policies, :managed_databases, :restore_points, :server_automatic_tuning_operations, :server_dns_aliases, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -307,11 +381,9 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) - @backup_long_term_retention_policies = @client_0.backup_long_term_retention_policies @backup_long_term_retention_vaults = @client_0.backup_long_term_retention_vaults @recoverable_databases = @client_0.recoverable_databases @restorable_dropped_databases = @client_0.restorable_dropped_databases - @restore_points = @client_0.restore_points @capabilities = @client_0.capabilities @server_connection_policies = @client_0.server_connection_policies @database_threat_detection_policies = @client_0.database_threat_detection_policies @@ -321,18 +393,17 @@ def initialize(configurable, base_url=nil, options=nil) @extensions = @client_0.extensions @disaster_recovery_configurations = @client_0.disaster_recovery_configurations @elastic_pools = @client_0.elastic_pools - @firewall_rules = @client_0.firewall_rules @geo_backup_policies = @client_0.geo_backup_policies @queries = @client_0.queries @query_statistics = @client_0.query_statistics @query_texts = @client_0.query_texts + @recommended_elastic_pools = @client_0.recommended_elastic_pools @replication_links = @client_0.replication_links @server_azure_adadministrators = @client_0.server_azure_adadministrators @server_communication_links = @client_0.server_communication_links @service_objectives = @client_0.service_objectives @elastic_pool_activities = @client_0.elastic_pool_activities @elastic_pool_database_activities = @client_0.elastic_pool_database_activities - @recommended_elastic_pools = @client_0.recommended_elastic_pools @service_tier_advisors = @client_0.service_tier_advisors @transparent_data_encryptions = @client_0.transparent_data_encryptions @transparent_data_encryption_activities = @client_0.transparent_data_encryption_activities @@ -350,9 +421,11 @@ def initialize(configurable, base_url=nil, options=nil) @database_advisors = @client_1.database_advisors @database_recommended_actions = @client_1.database_recommended_actions @server_advisors = @client_1.server_advisors - @database_blob_auditing_policies = @client_1.database_blob_auditing_policies + @database_automatic_tuning_operations = @client_1.database_automatic_tuning_operations @encryption_protectors = @client_1.encryption_protectors @failover_groups = @client_1.failover_groups + @firewall_rules = @client_1.firewall_rules + @managed_instances = @client_1.managed_instances @operations = @client_1.operations @server_keys = @client_1.server_keys @servers = @client_1.servers @@ -367,9 +440,28 @@ def initialize(configurable, base_url=nil, options=nil) @client_2.subscription_id = configurable.subscription_id end add_telemetry(@client_2) + @extended_database_blob_auditing_policies = @client_2.extended_database_blob_auditing_policies + @extended_server_blob_auditing_policies = @client_2.extended_server_blob_auditing_policies + @server_blob_auditing_policies = @client_2.server_blob_auditing_policies + @database_blob_auditing_policies = @client_2.database_blob_auditing_policies @database_operations = @client_2.database_operations @databases = @client_2.databases - @database_restore_points = @client_2.database_restore_points + @database_vulnerability_assessment_rule_baselines = @client_2.database_vulnerability_assessment_rule_baselines + @database_vulnerability_assessments = @client_2.database_vulnerability_assessments + @data_warehouse_user_activities_operations = @client_2.data_warehouse_user_activities_operations + @job_agents = @client_2.job_agents + @job_credentials = @client_2.job_credentials + @job_executions = @client_2.job_executions + @jobs = @client_2.jobs + @job_step_executions = @client_2.job_step_executions + @job_steps = @client_2.job_steps + @job_target_executions = @client_2.job_target_executions + @job_target_groups = @client_2.job_target_groups + @job_versions = @client_2.job_versions + @long_term_retention_backups = @client_2.long_term_retention_backups + @backup_long_term_retention_policies = @client_2.backup_long_term_retention_policies + @managed_databases = @client_2.managed_databases + @restore_points = @client_2.restore_points @server_automatic_tuning_operations = @client_2.server_automatic_tuning_operations @server_dns_aliases = @client_2.server_dns_aliases @@ -394,191 +486,182 @@ def method_missing(method, *args) end class ModelClasses - def firewall_rule_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::FirewallRuleListResult - end - def disaster_recovery_configuration_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::DisasterRecoveryConfigurationListResult - end - def server_administrator_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::ServerAdministratorListResult - end - def server_usage - Azure::SQL::Mgmt::V2014_04_01::Models::ServerUsage - end - def service_tier_advisor_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::ServiceTierAdvisorListResult - end - def replication_link_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::ReplicationLinkListResult - end - def elastic_pool_database_activity_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDatabaseActivityListResult - end - def recommended_elastic_pool_metric - Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolMetric - end - def elastic_pool_activity_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolActivityListResult - end - def server_usage_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::ServerUsageListResult - end - def recoverable_database_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::RecoverableDatabaseListResult + def metric_value + Azure::SQL::Mgmt::V2014_04_01::Models::MetricValue end - def query_text_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::QueryTextListResult + def service_objective_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::ServiceObjectiveListResult end - def restorable_dropped_database_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::RestorableDroppedDatabaseListResult + def data_masking_rule_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::DataMaskingRuleListResult end def query_text Azure::SQL::Mgmt::V2014_04_01::Models::QueryText end - def restore_point_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::RestorePointListResult - end - def query_statistic_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::QueryStatisticListResult - end - def service_objective_capability - Azure::SQL::Mgmt::V2014_04_01::Models::ServiceObjectiveCapability - end - def data_masking_rule_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::DataMaskingRuleListResult - end - def elastic_pool_per_database_min_dtu_capability - Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolPerDatabaseMinDtuCapability + def database_usage_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseUsageListResult end def transparent_data_encryption_list_result Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionListResult end - def elastic_pool_dtu_capability - Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDtuCapability + def database_usage + Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseUsage end def extension_list_result Azure::SQL::Mgmt::V2014_04_01::Models::ExtensionListResult end - def server_version_capability - Azure::SQL::Mgmt::V2014_04_01::Models::ServerVersionCapability + def server_usage_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::ServerUsageListResult end - def top_queries_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::TopQueriesListResult + def server_communication_link_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::ServerCommunicationLinkListResult end - def check_name_availability_request - Azure::SQL::Mgmt::V2014_04_01::Models::CheckNameAvailabilityRequest + def server_usage + Azure::SQL::Mgmt::V2014_04_01::Models::ServerUsage end - def top_queries - Azure::SQL::Mgmt::V2014_04_01::Models::TopQueries + def disaster_recovery_configuration_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::DisasterRecoveryConfigurationListResult end - def transparent_data_encryption_activity_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivityListResult + def max_size_capability + Azure::SQL::Mgmt::V2014_04_01::Models::MaxSizeCapability end - def query_statistic - Azure::SQL::Mgmt::V2014_04_01::Models::QueryStatistic + def server_administrator_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::ServerAdministratorListResult end - def query_interval - Azure::SQL::Mgmt::V2014_04_01::Models::QueryInterval + def edition_capability + Azure::SQL::Mgmt::V2014_04_01::Models::EditionCapability end - def operation_impact - Azure::SQL::Mgmt::V2014_04_01::Models::OperationImpact + def elastic_pool_per_database_max_dtu_capability + Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolPerDatabaseMaxDtuCapability end def elastic_pool_list_result Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolListResult end - def server_communication_link_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::ServerCommunicationLinkListResult + def elastic_pool_edition_capability + Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolEditionCapability end - def query_metric - Azure::SQL::Mgmt::V2014_04_01::Models::QueryMetric + def replication_link_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::ReplicationLinkListResult end - def advisor_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::AdvisorListResult + def location_capabilities + Azure::SQL::Mgmt::V2014_04_01::Models::LocationCapabilities end - def backup_long_term_retention_vault_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionVaultListResult + def check_name_availability_response + Azure::SQL::Mgmt::V2014_04_01::Models::CheckNameAvailabilityResponse end - def recommended_elastic_pool_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolListResult + def recommended_elastic_pool_list_metrics_result + Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolListMetricsResult + end + def slo_usage_metric + Azure::SQL::Mgmt::V2014_04_01::Models::SloUsageMetric end def geo_backup_policy_list_result Azure::SQL::Mgmt::V2014_04_01::Models::GeoBackupPolicyListResult end - def max_size_capability - Azure::SQL::Mgmt::V2014_04_01::Models::MaxSizeCapability + def table_auditing_policy_properties + Azure::SQL::Mgmt::V2014_04_01::Models::TableAuditingPolicyProperties end def import_extension_request Azure::SQL::Mgmt::V2014_04_01::Models::ImportExtensionRequest end - def elastic_pool_per_database_max_dtu_capability - Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolPerDatabaseMaxDtuCapability + def transparent_data_encryption_activity_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivityListResult end - def database_usage_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseUsageListResult + def recommended_elastic_pool_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolListResult end - def location_capabilities - Azure::SQL::Mgmt::V2014_04_01::Models::LocationCapabilities + def elastic_pool_database_activity_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDatabaseActivityListResult end - def database_usage - Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseUsage + def recommended_elastic_pool_metric + Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolMetric end - def slo_usage_metric - Azure::SQL::Mgmt::V2014_04_01::Models::SloUsageMetric + def elastic_pool_activity_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolActivityListResult end def export_request Azure::SQL::Mgmt::V2014_04_01::Models::ExportRequest end - def database_table_auditing_policy_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseTableAuditingPolicyListResult - end - def metric_value - Azure::SQL::Mgmt::V2014_04_01::Models::MetricValue + def query_text_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::QueryTextListResult end - def backup_long_term_retention_policy_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionPolicyListResult + def backup_long_term_retention_vault_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionVaultListResult end def metric_name Azure::SQL::Mgmt::V2014_04_01::Models::MetricName end - def service_objective_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::ServiceObjectiveListResult + def restorable_dropped_database_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::RestorableDroppedDatabaseListResult end def metric Azure::SQL::Mgmt::V2014_04_01::Models::Metric end - def elastic_pool_edition_capability - Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolEditionCapability + def elastic_pool_per_database_min_dtu_capability + Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolPerDatabaseMinDtuCapability end def metric_list_result Azure::SQL::Mgmt::V2014_04_01::Models::MetricListResult end - def table_auditing_policy_properties - Azure::SQL::Mgmt::V2014_04_01::Models::TableAuditingPolicyProperties + def server_version_capability + Azure::SQL::Mgmt::V2014_04_01::Models::ServerVersionCapability end def metric_availability Azure::SQL::Mgmt::V2014_04_01::Models::MetricAvailability end - def recommended_elastic_pool_list_metrics_result - Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolListMetricsResult + def server_table_auditing_policy_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::ServerTableAuditingPolicyListResult end def metric_definition Azure::SQL::Mgmt::V2014_04_01::Models::MetricDefinition end - def check_name_availability_response - Azure::SQL::Mgmt::V2014_04_01::Models::CheckNameAvailabilityResponse + def operation_impact + Azure::SQL::Mgmt::V2014_04_01::Models::OperationImpact end def metric_definition_list_result Azure::SQL::Mgmt::V2014_04_01::Models::MetricDefinitionListResult end - def edition_capability - Azure::SQL::Mgmt::V2014_04_01::Models::EditionCapability + def backup_long_term_retention_policy_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionPolicyListResult end - def server_table_auditing_policy_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::ServerTableAuditingPolicyListResult + def service_objective_capability + Azure::SQL::Mgmt::V2014_04_01::Models::ServiceObjectiveCapability end - def backup_long_term_retention_policy - Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionPolicy + def check_name_availability_request + Azure::SQL::Mgmt::V2014_04_01::Models::CheckNameAvailabilityRequest + end + def query_metric + Azure::SQL::Mgmt::V2014_04_01::Models::QueryMetric + end + def service_tier_advisor_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::ServiceTierAdvisorListResult + end + def query_interval + Azure::SQL::Mgmt::V2014_04_01::Models::QueryInterval + end + def recoverable_database_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::RecoverableDatabaseListResult + end + def query_statistic + Azure::SQL::Mgmt::V2014_04_01::Models::QueryStatistic + end + def database_table_auditing_policy_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseTableAuditingPolicyListResult + end + def top_queries + Azure::SQL::Mgmt::V2014_04_01::Models::TopQueries + end + def elastic_pool_dtu_capability + Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDtuCapability + end + def top_queries_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::TopQueriesListResult + end + def advisor_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::AdvisorListResult + end + def query_statistic_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::QueryStatisticListResult end def backup_long_term_retention_vault Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionVault @@ -589,9 +672,6 @@ def recoverable_database def restorable_dropped_database Azure::SQL::Mgmt::V2014_04_01::Models::RestorableDroppedDatabase end - def restore_point - Azure::SQL::Mgmt::V2014_04_01::Models::RestorePoint - end def server_connection_policy Azure::SQL::Mgmt::V2014_04_01::Models::ServerConnectionPolicy end @@ -604,18 +684,6 @@ def transparent_data_encryption def recommended_index Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedIndex end - def transparent_data_encryption_activity - Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivity - end - def elastic_pool_database_activity - Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDatabaseActivity - end - def elastic_pool_activity - Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolActivity - end - def recommended_elastic_pool - Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPool - end def database_security_alert_policy Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseSecurityAlertPolicy end @@ -634,9 +702,6 @@ def elastic_pool def elastic_pool_update Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolUpdate end - def firewall_rule - Azure::SQL::Mgmt::V2014_04_01::Models::FirewallRule - end def geo_backup_policy Azure::SQL::Mgmt::V2014_04_01::Models::GeoBackupPolicy end @@ -646,6 +711,9 @@ def import_export_response def import_request Azure::SQL::Mgmt::V2014_04_01::Models::ImportRequest end + def recommended_elastic_pool + Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPool + end def replication_link Azure::SQL::Mgmt::V2014_04_01::Models::ReplicationLink end @@ -658,6 +726,15 @@ def server_communication_link def service_objective Azure::SQL::Mgmt::V2014_04_01::Models::ServiceObjective end + def elastic_pool_activity + Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolActivity + end + def elastic_pool_database_activity + Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDatabaseActivity + end + def transparent_data_encryption_activity + Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivity + end def database_connection_policy Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseConnectionPolicy end @@ -706,12 +783,6 @@ def recommended_index_type def read_scale Azure::SQL::Mgmt::V2014_04_01::Models::ReadScale end - def transparent_data_encryption_activity_status - Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivityStatus - end - def elastic_pool_edition - Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolEdition - end def security_alert_policy_state Azure::SQL::Mgmt::V2014_04_01::Models::SecurityAlertPolicyState end @@ -745,6 +816,9 @@ def disaster_recovery_configuration_role def elastic_pool_state Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolState end + def elastic_pool_edition + Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolEdition + end def geo_backup_policy_state Azure::SQL::Mgmt::V2014_04_01::Models::GeoBackupPolicyState end @@ -787,122 +861,143 @@ def server_version def server_state Azure::SQL::Mgmt::V2014_04_01::Models::ServerState end - def server_key_list_result - Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerKeyListResult + def transparent_data_encryption_activity_status + Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivityStatus + end + def operation_display + Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationDisplay + end + def operation + Azure::SQL::Mgmt::V2015_05_01_preview::Models::Operation + end + def recommended_action_implementation_info + Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionImplementationInfo + end + def operation_list_result + Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationListResult + end + def recommended_action_impact_record + Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionImpactRecord + end + def managed_instance_update + Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstanceUpdate + end + def firewall_rule_list + Azure::SQL::Mgmt::V2015_05_01_preview::Models::FirewallRuleList end def resource_identity Azure::SQL::Mgmt::V2015_05_01_preview::Models::ResourceIdentity end + def sync_group_schema + Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchema + end + def sync_database_id_list_result + Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncDatabaseIdListResult + end + def sync_group_schema_table + Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchemaTable + end + def sync_full_schema_table + Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaTable + end + def sync_group_schema_table_column + Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchemaTableColumn + end + def managed_instance_list_result + Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstanceListResult + end + def encryption_protector_list_result + Azure::SQL::Mgmt::V2015_05_01_preview::Models::EncryptionProtectorListResult + end + def sync_full_schema_table_column + Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaTableColumn + end + def failover_group_read_only_endpoint + Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupReadOnlyEndpoint + end def recommended_action_state_info Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionStateInfo end + def sync_group_log_properties + Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupLogProperties + end def recommended_action_error_info Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionErrorInfo end - def server_list_result - Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerListResult + def failover_group_list_result + Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupListResult end def recommended_action_metric_info Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionMetricInfo end - def virtual_network_rule_list_result - Azure::SQL::Mgmt::V2015_05_01_preview::Models::VirtualNetworkRuleListResult - end - def recommended_action_impact_record - Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionImpactRecord - end - def sync_group_list_result - Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupListResult + def sync_full_schema_properties_list_result + Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaPropertiesListResult end - def sync_group_schema - Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchema + def firewall_rule_list_result + Azure::SQL::Mgmt::V2015_05_01_preview::Models::FirewallRuleListResult end - def sync_group_log_properties - Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupLogProperties + def server_key_list_result + Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerKeyListResult end - def failover_group_read_write_endpoint - Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupReadWriteEndpoint + def virtual_network_rule_list_result + Azure::SQL::Mgmt::V2015_05_01_preview::Models::VirtualNetworkRuleListResult end def sync_group_log_list_result Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupLogListResult end + def server_list_result + Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerListResult + end def partner_info Azure::SQL::Mgmt::V2015_05_01_preview::Models::PartnerInfo end def server_update Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerUpdate end - def failover_group_update - Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupUpdate + def resource_with_writable_name + Azure::SQL::Mgmt::V2015_05_01_preview::Models::ResourceWithWritableName end def subscription_usage_list_result Azure::SQL::Mgmt::V2015_05_01_preview::Models::SubscriptionUsageListResult end - def operation_display - Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationDisplay + def sync_group_list_result + Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupListResult end def sync_agent_list_result Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncAgentListResult end - def operation_list_result - Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationListResult + def failover_group_read_write_endpoint + Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupReadWriteEndpoint end def sync_agent_key_properties Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncAgentKeyProperties end - def sync_full_schema_properties_list_result - Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaPropertiesListResult - end - def recommended_action_implementation_info - Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionImplementationInfo + def sync_full_schema_properties + Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaProperties end def sync_member_list_result Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncMemberListResult end - def failover_group_read_only_endpoint - Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupReadOnlyEndpoint + def failover_group_update + Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupUpdate end def sync_agent_linked_database_list_result Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncAgentLinkedDatabaseListResult end - def failover_group_list_result - Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupListResult + def automatic_tuning_options + Azure::SQL::Mgmt::V2015_05_01_preview::Models::AutomaticTuningOptions end def sync_database_id_properties Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncDatabaseIdProperties end - def sync_group_schema_table_column - Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchemaTableColumn - end - def sync_database_id_list_result - Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncDatabaseIdListResult - end - def sync_group_schema_table - Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchemaTable - end - def sync_full_schema_table_column - Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaTableColumn - end - def encryption_protector_list_result - Azure::SQL::Mgmt::V2015_05_01_preview::Models::EncryptionProtectorListResult - end - def sync_full_schema_table - Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaTable - end - def operation - Azure::SQL::Mgmt::V2015_05_01_preview::Models::Operation - end - def sync_full_schema_properties - Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaProperties - end def recommended_action Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedAction end def advisor Azure::SQL::Mgmt::V2015_05_01_preview::Models::Advisor end - def database_blob_auditing_policy - Azure::SQL::Mgmt::V2015_05_01_preview::Models::DatabaseBlobAuditingPolicy + def database_automatic_tuning + Azure::SQL::Mgmt::V2015_05_01_preview::Models::DatabaseAutomaticTuning end def encryption_protector Azure::SQL::Mgmt::V2015_05_01_preview::Models::EncryptionProtector @@ -910,6 +1005,15 @@ def encryption_protector def failover_group Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroup end + def proxy_resource_with_writable_name + Azure::SQL::Mgmt::V2015_05_01_preview::Models::ProxyResourceWithWritableName + end + def firewall_rule + Azure::SQL::Mgmt::V2015_05_01_preview::Models::FirewallRule + end + def managed_instance + Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstance + end def server_key Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerKey end @@ -955,8 +1059,11 @@ def implementation_method def is_retryable Azure::SQL::Mgmt::V2015_05_01_preview::Models::IsRetryable end - def blob_auditing_policy_state - Azure::SQL::Mgmt::V2015_05_01_preview::Models::BlobAuditingPolicyState + def automatic_tuning_mode + Azure::SQL::Mgmt::V2015_05_01_preview::Models::AutomaticTuningMode + end + def automatic_tuning_disabled_reason + Azure::SQL::Mgmt::V2015_05_01_preview::Models::AutomaticTuningDisabledReason end def server_key_type Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerKeyType @@ -970,12 +1077,12 @@ def read_only_endpoint_failover_policy def failover_group_replication_role Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupReplicationRole end - def operation_origin - Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationOrigin - end def identity_type Azure::SQL::Mgmt::V2015_05_01_preview::Models::IdentityType end + def operation_origin + Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationOrigin + end def sync_agent_state Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncAgentState end @@ -1000,45 +1107,117 @@ def sync_member_state def virtual_network_rule_state Azure::SQL::Mgmt::V2015_05_01_preview::Models::VirtualNetworkRuleState end + def job_schedule + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobSchedule + end + def job_credential_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobCredentialListResult + end + def vulnerability_assessment_recurring_scans_properties + Azure::SQL::Mgmt::V2017_03_01_preview::Models::VulnerabilityAssessmentRecurringScansProperties + end + def managed_database_update + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabaseUpdate + end + def job_target_group_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTargetGroupListResult + end + def resource_move_definition + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ResourceMoveDefinition + end + def server_dns_alias_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerDnsAliasListResult + end + def restore_point_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::RestorePointListResult + end + def job_target + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTarget + end + def long_term_retention_backup_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackupListResult + end + def job_agent_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgentListResult + end + def create_database_restore_point_definition + Azure::SQL::Mgmt::V2017_03_01_preview::Models::CreateDatabaseRestorePointDefinition + end + def job_agent_update + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgentUpdate + end def database_update Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseUpdate end + def job_step_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepListResult + end + def job_version_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobVersionListResult + end + def server_dns_alias_acquisition + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerDnsAliasAcquisition + end def automatic_tuning_server_options Azure::SQL::Mgmt::V2017_03_01_preview::Models::AutomaticTuningServerOptions end - def database_operation_list_result - Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseOperationListResult + def job_execution_target + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionTarget end - def create_database_restore_point_definition - Azure::SQL::Mgmt::V2017_03_01_preview::Models::CreateDatabaseRestorePointDefinition + def complete_database_restore_definition + Azure::SQL::Mgmt::V2017_03_01_preview::Models::CompleteDatabaseRestoreDefinition + end + def job_step_execution_options + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepExecutionOptions end - def database_restore_point_list_result - Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseRestorePointListResult + def sku + Azure::SQL::Mgmt::V2017_03_01_preview::Models::Sku end - def arm_sku - Azure::SQL::Mgmt::V2017_03_01_preview::Models::ArmSku + def job_execution_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionListResult end def import_export_database_definition Azure::SQL::Mgmt::V2017_03_01_preview::Models::ImportExportDatabaseDefinition end + def resource + Azure::SQL::Mgmt::V2017_03_01_preview::Models::Resource + end + def managed_database_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabaseListResult + end def database_list_result Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseListResult end - def server_dns_alias_list_result - Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerDnsAliasListResult + def job_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobListResult end - def resource_move_definition - Azure::SQL::Mgmt::V2017_03_01_preview::Models::ResourceMoveDefinition + def database_operation_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseOperationListResult end - def resource - Azure::SQL::Mgmt::V2017_03_01_preview::Models::Resource + def job_step_action + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepAction end - def server_dns_alias_acquisition - Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerDnsAliasAcquisition + def database_vulnerability_assessment_rule_baseline_item + Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseVulnerabilityAssessmentRuleBaselineItem + end + def job_step_output + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepOutput end def proxy_resource Azure::SQL::Mgmt::V2017_03_01_preview::Models::ProxyResource end + def extended_database_blob_auditing_policy + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ExtendedDatabaseBlobAuditingPolicy + end + def extended_server_blob_auditing_policy + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ExtendedServerBlobAuditingPolicy + end + def server_blob_auditing_policy + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerBlobAuditingPolicy + end + def database_blob_auditing_policy + Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseBlobAuditingPolicy + end def database_operation Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseOperation end @@ -1051,8 +1230,47 @@ def database def import_export_operation_result Azure::SQL::Mgmt::V2017_03_01_preview::Models::ImportExportOperationResult end - def database_restore_point - Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseRestorePoint + def database_vulnerability_assessment_rule_baseline + Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseVulnerabilityAssessmentRuleBaseline + end + def database_vulnerability_assessment + Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseVulnerabilityAssessment + end + def data_warehouse_user_activities + Azure::SQL::Mgmt::V2017_03_01_preview::Models::DataWarehouseUserActivities + end + def job_agent + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgent + end + def job_credential + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobCredential + end + def job_execution + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecution + end + def job + Azure::SQL::Mgmt::V2017_03_01_preview::Models::Job + end + def job_step + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStep + end + def job_target_group + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTargetGroup + end + def job_version + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobVersion + end + def long_term_retention_backup + Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackup + end + def backup_long_term_retention_policy + Azure::SQL::Mgmt::V2017_03_01_preview::Models::BackupLongTermRetentionPolicy + end + def managed_database + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabase + end + def restore_point + Azure::SQL::Mgmt::V2017_03_01_preview::Models::RestorePoint end def server_automatic_tuning Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerAutomaticTuning @@ -1060,6 +1278,9 @@ def server_automatic_tuning def server_dns_alias Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerDnsAlias end + def blob_auditing_policy_state + Azure::SQL::Mgmt::V2017_03_01_preview::Models::BlobAuditingPolicyState + end def management_operation_state Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagementOperationState end @@ -1069,12 +1290,45 @@ def create_mode def sample_name Azure::SQL::Mgmt::V2017_03_01_preview::Models::SampleName end - def status - Azure::SQL::Mgmt::V2017_03_01_preview::Models::Status + def database_status + Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseStatus end def catalog_collation_type Azure::SQL::Mgmt::V2017_03_01_preview::Models::CatalogCollationType end + def job_agent_state + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgentState + end + def job_execution_lifecycle + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionLifecycle + end + def provisioning_state + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ProvisioningState + end + def job_target_type + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTargetType + end + def job_schedule_type + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobScheduleType + end + def job_step_action_type + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepActionType + end + def job_step_action_source + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepActionSource + end + def job_step_output_type + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepOutputType + end + def job_target_group_membership_type + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTargetGroupMembershipType + end + def managed_database_status + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabaseStatus + end + def managed_database_create_mode + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabaseCreateMode + end def restore_point_type Azure::SQL::Mgmt::V2017_03_01_preview::Models::RestorePointType end @@ -1090,6 +1344,12 @@ def automatic_tuning_option_mode_actual def automatic_tuning_server_reason Azure::SQL::Mgmt::V2017_03_01_preview::Models::AutomaticTuningServerReason end + def long_term_retention_database_state + Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionDatabaseState + end + def vulnerability_assessment_policy_baseline_name + Azure::SQL::Mgmt::V2017_03_01_preview::Models::VulnerabilityAssessmentPolicyBaselineName + end end end end diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql.rb index 75b3562134..eee3140b72 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql.rb @@ -20,12 +20,12 @@ require 'ms_rest_azure' module Azure::SQL::Mgmt::V2014_04_01 + autoload :ServerAdvisors, '2014-04-01/generated/azure_mgmt_sql/server_advisors.rb' autoload :DatabaseAdvisors, '2014-04-01/generated/azure_mgmt_sql/database_advisors.rb' autoload :BackupLongTermRetentionPolicies, '2014-04-01/generated/azure_mgmt_sql/backup_long_term_retention_policies.rb' autoload :BackupLongTermRetentionVaults, '2014-04-01/generated/azure_mgmt_sql/backup_long_term_retention_vaults.rb' autoload :RecoverableDatabases, '2014-04-01/generated/azure_mgmt_sql/recoverable_databases.rb' autoload :RestorableDroppedDatabases, '2014-04-01/generated/azure_mgmt_sql/restorable_dropped_databases.rb' - autoload :RestorePoints, '2014-04-01/generated/azure_mgmt_sql/restore_points.rb' autoload :Capabilities, '2014-04-01/generated/azure_mgmt_sql/capabilities.rb' autoload :Servers, '2014-04-01/generated/azure_mgmt_sql/servers.rb' autoload :ServerConnectionPolicies, '2014-04-01/generated/azure_mgmt_sql/server_connection_policies.rb' @@ -43,13 +43,14 @@ module Azure::SQL::Mgmt::V2014_04_01 autoload :Queries, '2014-04-01/generated/azure_mgmt_sql/queries.rb' autoload :QueryStatistics, '2014-04-01/generated/azure_mgmt_sql/query_statistics.rb' autoload :QueryTexts, '2014-04-01/generated/azure_mgmt_sql/query_texts.rb' + autoload :RecommendedElasticPools, '2014-04-01/generated/azure_mgmt_sql/recommended_elastic_pools.rb' autoload :ReplicationLinks, '2014-04-01/generated/azure_mgmt_sql/replication_links.rb' + autoload :RestorePoints, '2014-04-01/generated/azure_mgmt_sql/restore_points.rb' autoload :ServerAzureADAdministrators, '2014-04-01/generated/azure_mgmt_sql/server_azure_adadministrators.rb' autoload :ServerCommunicationLinks, '2014-04-01/generated/azure_mgmt_sql/server_communication_links.rb' autoload :ServiceObjectives, '2014-04-01/generated/azure_mgmt_sql/service_objectives.rb' autoload :ElasticPoolActivities, '2014-04-01/generated/azure_mgmt_sql/elastic_pool_activities.rb' autoload :ElasticPoolDatabaseActivities, '2014-04-01/generated/azure_mgmt_sql/elastic_pool_database_activities.rb' - autoload :RecommendedElasticPools, '2014-04-01/generated/azure_mgmt_sql/recommended_elastic_pools.rb' autoload :ServiceTierAdvisors, '2014-04-01/generated/azure_mgmt_sql/service_tier_advisors.rb' autoload :TransparentDataEncryptions, '2014-04-01/generated/azure_mgmt_sql/transparent_data_encryptions.rb' autoload :TransparentDataEncryptionActivities, '2014-04-01/generated/azure_mgmt_sql/transparent_data_encryption_activities.rb' @@ -61,91 +62,86 @@ module Azure::SQL::Mgmt::V2014_04_01 autoload :SqlManagementClient, '2014-04-01/generated/azure_mgmt_sql/sql_management_client.rb' module Models - autoload :FirewallRuleListResult, '2014-04-01/generated/azure_mgmt_sql/models/firewall_rule_list_result.rb' - autoload :Resource, '2014-04-01/generated/azure_mgmt_sql/models/resource.rb' - autoload :DisasterRecoveryConfigurationListResult, '2014-04-01/generated/azure_mgmt_sql/models/disaster_recovery_configuration_list_result.rb' - autoload :ServerAdministratorListResult, '2014-04-01/generated/azure_mgmt_sql/models/server_administrator_list_result.rb' - autoload :ServerUsage, '2014-04-01/generated/azure_mgmt_sql/models/server_usage.rb' - autoload :ServiceTierAdvisorListResult, '2014-04-01/generated/azure_mgmt_sql/models/service_tier_advisor_list_result.rb' - autoload :ReplicationLinkListResult, '2014-04-01/generated/azure_mgmt_sql/models/replication_link_list_result.rb' - autoload :ElasticPoolDatabaseActivityListResult, '2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_database_activity_list_result.rb' - autoload :RecommendedElasticPoolMetric, '2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool_metric.rb' - autoload :ElasticPoolActivityListResult, '2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_activity_list_result.rb' - autoload :ServerUsageListResult, '2014-04-01/generated/azure_mgmt_sql/models/server_usage_list_result.rb' - autoload :RecoverableDatabaseListResult, '2014-04-01/generated/azure_mgmt_sql/models/recoverable_database_list_result.rb' - autoload :QueryTextListResult, '2014-04-01/generated/azure_mgmt_sql/models/query_text_list_result.rb' - autoload :RestorableDroppedDatabaseListResult, '2014-04-01/generated/azure_mgmt_sql/models/restorable_dropped_database_list_result.rb' - autoload :QueryText, '2014-04-01/generated/azure_mgmt_sql/models/query_text.rb' - autoload :RestorePointListResult, '2014-04-01/generated/azure_mgmt_sql/models/restore_point_list_result.rb' - autoload :QueryStatisticListResult, '2014-04-01/generated/azure_mgmt_sql/models/query_statistic_list_result.rb' - autoload :ServiceObjectiveCapability, '2014-04-01/generated/azure_mgmt_sql/models/service_objective_capability.rb' + autoload :MetricValue, '2014-04-01/generated/azure_mgmt_sql/models/metric_value.rb' + autoload :ServiceObjectiveListResult, '2014-04-01/generated/azure_mgmt_sql/models/service_objective_list_result.rb' + autoload :ServerListResult, '2014-04-01/generated/azure_mgmt_sql/models/server_list_result.rb' autoload :DataMaskingRuleListResult, '2014-04-01/generated/azure_mgmt_sql/models/data_masking_rule_list_result.rb' - autoload :ElasticPoolPerDatabaseMinDtuCapability, '2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_per_database_min_dtu_capability.rb' + autoload :QueryText, '2014-04-01/generated/azure_mgmt_sql/models/query_text.rb' + autoload :DatabaseUsageListResult, '2014-04-01/generated/azure_mgmt_sql/models/database_usage_list_result.rb' autoload :TransparentDataEncryptionListResult, '2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption_list_result.rb' - autoload :ElasticPoolDtuCapability, '2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_dtu_capability.rb' + autoload :DatabaseUsage, '2014-04-01/generated/azure_mgmt_sql/models/database_usage.rb' autoload :ExtensionListResult, '2014-04-01/generated/azure_mgmt_sql/models/extension_list_result.rb' - autoload :ServerVersionCapability, '2014-04-01/generated/azure_mgmt_sql/models/server_version_capability.rb' - autoload :TopQueriesListResult, '2014-04-01/generated/azure_mgmt_sql/models/top_queries_list_result.rb' - autoload :CheckNameAvailabilityRequest, '2014-04-01/generated/azure_mgmt_sql/models/check_name_availability_request.rb' - autoload :TopQueries, '2014-04-01/generated/azure_mgmt_sql/models/top_queries.rb' - autoload :TransparentDataEncryptionActivityListResult, '2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption_activity_list_result.rb' - autoload :QueryStatistic, '2014-04-01/generated/azure_mgmt_sql/models/query_statistic.rb' - autoload :ServerListResult, '2014-04-01/generated/azure_mgmt_sql/models/server_list_result.rb' - autoload :QueryInterval, '2014-04-01/generated/azure_mgmt_sql/models/query_interval.rb' - autoload :OperationImpact, '2014-04-01/generated/azure_mgmt_sql/models/operation_impact.rb' - autoload :ElasticPoolListResult, '2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_list_result.rb' + autoload :ServerUsageListResult, '2014-04-01/generated/azure_mgmt_sql/models/server_usage_list_result.rb' autoload :ServerCommunicationLinkListResult, '2014-04-01/generated/azure_mgmt_sql/models/server_communication_link_list_result.rb' - autoload :QueryMetric, '2014-04-01/generated/azure_mgmt_sql/models/query_metric.rb' - autoload :DatabaseListResult, '2014-04-01/generated/azure_mgmt_sql/models/database_list_result.rb' - autoload :AdvisorListResult, '2014-04-01/generated/azure_mgmt_sql/models/advisor_list_result.rb' - autoload :OperationListResult, '2014-04-01/generated/azure_mgmt_sql/models/operation_list_result.rb' - autoload :BackupLongTermRetentionVaultListResult, '2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_vault_list_result.rb' - autoload :RecommendedElasticPoolListResult, '2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool_list_result.rb' - autoload :GeoBackupPolicyListResult, '2014-04-01/generated/azure_mgmt_sql/models/geo_backup_policy_list_result.rb' + autoload :ServerUsage, '2014-04-01/generated/azure_mgmt_sql/models/server_usage.rb' + autoload :DisasterRecoveryConfigurationListResult, '2014-04-01/generated/azure_mgmt_sql/models/disaster_recovery_configuration_list_result.rb' autoload :MaxSizeCapability, '2014-04-01/generated/azure_mgmt_sql/models/max_size_capability.rb' - autoload :ImportExtensionRequest, '2014-04-01/generated/azure_mgmt_sql/models/import_extension_request.rb' + autoload :ServerAdministratorListResult, '2014-04-01/generated/azure_mgmt_sql/models/server_administrator_list_result.rb' + autoload :EditionCapability, '2014-04-01/generated/azure_mgmt_sql/models/edition_capability.rb' + autoload :RestorePointListResult, '2014-04-01/generated/azure_mgmt_sql/models/restore_point_list_result.rb' autoload :ElasticPoolPerDatabaseMaxDtuCapability, '2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_per_database_max_dtu_capability.rb' - autoload :DatabaseUsageListResult, '2014-04-01/generated/azure_mgmt_sql/models/database_usage_list_result.rb' + autoload :ElasticPoolListResult, '2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_list_result.rb' + autoload :ElasticPoolEditionCapability, '2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_edition_capability.rb' + autoload :ReplicationLinkListResult, '2014-04-01/generated/azure_mgmt_sql/models/replication_link_list_result.rb' autoload :LocationCapabilities, '2014-04-01/generated/azure_mgmt_sql/models/location_capabilities.rb' - autoload :DatabaseUsage, '2014-04-01/generated/azure_mgmt_sql/models/database_usage.rb' + autoload :FirewallRuleListResult, '2014-04-01/generated/azure_mgmt_sql/models/firewall_rule_list_result.rb' + autoload :CheckNameAvailabilityResponse, '2014-04-01/generated/azure_mgmt_sql/models/check_name_availability_response.rb' + autoload :RecommendedElasticPoolListMetricsResult, '2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool_list_metrics_result.rb' autoload :SloUsageMetric, '2014-04-01/generated/azure_mgmt_sql/models/slo_usage_metric.rb' + autoload :GeoBackupPolicyListResult, '2014-04-01/generated/azure_mgmt_sql/models/geo_backup_policy_list_result.rb' + autoload :TableAuditingPolicyProperties, '2014-04-01/generated/azure_mgmt_sql/models/table_auditing_policy_properties.rb' + autoload :ImportExtensionRequest, '2014-04-01/generated/azure_mgmt_sql/models/import_extension_request.rb' + autoload :TransparentDataEncryptionActivityListResult, '2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption_activity_list_result.rb' + autoload :RecommendedElasticPoolListResult, '2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool_list_result.rb' + autoload :ElasticPoolDatabaseActivityListResult, '2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_database_activity_list_result.rb' + autoload :RecommendedElasticPoolMetric, '2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool_metric.rb' + autoload :ElasticPoolActivityListResult, '2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_activity_list_result.rb' autoload :ExportRequest, '2014-04-01/generated/azure_mgmt_sql/models/export_request.rb' - autoload :DatabaseTableAuditingPolicyListResult, '2014-04-01/generated/azure_mgmt_sql/models/database_table_auditing_policy_list_result.rb' - autoload :MetricValue, '2014-04-01/generated/azure_mgmt_sql/models/metric_value.rb' - autoload :BackupLongTermRetentionPolicyListResult, '2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_policy_list_result.rb' + autoload :Resource, '2014-04-01/generated/azure_mgmt_sql/models/resource.rb' + autoload :QueryTextListResult, '2014-04-01/generated/azure_mgmt_sql/models/query_text_list_result.rb' + autoload :BackupLongTermRetentionVaultListResult, '2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_vault_list_result.rb' autoload :MetricName, '2014-04-01/generated/azure_mgmt_sql/models/metric_name.rb' - autoload :ServiceObjectiveListResult, '2014-04-01/generated/azure_mgmt_sql/models/service_objective_list_result.rb' + autoload :RestorableDroppedDatabaseListResult, '2014-04-01/generated/azure_mgmt_sql/models/restorable_dropped_database_list_result.rb' autoload :Metric, '2014-04-01/generated/azure_mgmt_sql/models/metric.rb' - autoload :ElasticPoolEditionCapability, '2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_edition_capability.rb' + autoload :ElasticPoolPerDatabaseMinDtuCapability, '2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_per_database_min_dtu_capability.rb' autoload :MetricListResult, '2014-04-01/generated/azure_mgmt_sql/models/metric_list_result.rb' - autoload :TableAuditingPolicyProperties, '2014-04-01/generated/azure_mgmt_sql/models/table_auditing_policy_properties.rb' + autoload :ServerVersionCapability, '2014-04-01/generated/azure_mgmt_sql/models/server_version_capability.rb' autoload :MetricAvailability, '2014-04-01/generated/azure_mgmt_sql/models/metric_availability.rb' - autoload :RecommendedElasticPoolListMetricsResult, '2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool_list_metrics_result.rb' + autoload :ServerTableAuditingPolicyListResult, '2014-04-01/generated/azure_mgmt_sql/models/server_table_auditing_policy_list_result.rb' autoload :MetricDefinition, '2014-04-01/generated/azure_mgmt_sql/models/metric_definition.rb' - autoload :CheckNameAvailabilityResponse, '2014-04-01/generated/azure_mgmt_sql/models/check_name_availability_response.rb' + autoload :OperationImpact, '2014-04-01/generated/azure_mgmt_sql/models/operation_impact.rb' autoload :MetricDefinitionListResult, '2014-04-01/generated/azure_mgmt_sql/models/metric_definition_list_result.rb' - autoload :EditionCapability, '2014-04-01/generated/azure_mgmt_sql/models/edition_capability.rb' + autoload :DatabaseListResult, '2014-04-01/generated/azure_mgmt_sql/models/database_list_result.rb' autoload :OperationDisplay, '2014-04-01/generated/azure_mgmt_sql/models/operation_display.rb' - autoload :ServerTableAuditingPolicyListResult, '2014-04-01/generated/azure_mgmt_sql/models/server_table_auditing_policy_list_result.rb' + autoload :BackupLongTermRetentionPolicyListResult, '2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_policy_list_result.rb' autoload :Operation, '2014-04-01/generated/azure_mgmt_sql/models/operation.rb' + autoload :ServiceObjectiveCapability, '2014-04-01/generated/azure_mgmt_sql/models/service_objective_capability.rb' + autoload :OperationListResult, '2014-04-01/generated/azure_mgmt_sql/models/operation_list_result.rb' + autoload :CheckNameAvailabilityRequest, '2014-04-01/generated/azure_mgmt_sql/models/check_name_availability_request.rb' + autoload :QueryMetric, '2014-04-01/generated/azure_mgmt_sql/models/query_metric.rb' + autoload :ServiceTierAdvisorListResult, '2014-04-01/generated/azure_mgmt_sql/models/service_tier_advisor_list_result.rb' + autoload :QueryInterval, '2014-04-01/generated/azure_mgmt_sql/models/query_interval.rb' + autoload :RecoverableDatabaseListResult, '2014-04-01/generated/azure_mgmt_sql/models/recoverable_database_list_result.rb' + autoload :QueryStatistic, '2014-04-01/generated/azure_mgmt_sql/models/query_statistic.rb' + autoload :DatabaseTableAuditingPolicyListResult, '2014-04-01/generated/azure_mgmt_sql/models/database_table_auditing_policy_list_result.rb' + autoload :TopQueries, '2014-04-01/generated/azure_mgmt_sql/models/top_queries.rb' + autoload :ElasticPoolDtuCapability, '2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_dtu_capability.rb' + autoload :TopQueriesListResult, '2014-04-01/generated/azure_mgmt_sql/models/top_queries_list_result.rb' + autoload :AdvisorListResult, '2014-04-01/generated/azure_mgmt_sql/models/advisor_list_result.rb' + autoload :QueryStatisticListResult, '2014-04-01/generated/azure_mgmt_sql/models/query_statistic_list_result.rb' autoload :ProxyResource, '2014-04-01/generated/azure_mgmt_sql/models/proxy_resource.rb' autoload :Advisor, '2014-04-01/generated/azure_mgmt_sql/models/advisor.rb' + autoload :TrackedResource, '2014-04-01/generated/azure_mgmt_sql/models/tracked_resource.rb' autoload :BackupLongTermRetentionPolicy, '2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_policy.rb' autoload :BackupLongTermRetentionVault, '2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_vault.rb' - autoload :TrackedResource, '2014-04-01/generated/azure_mgmt_sql/models/tracked_resource.rb' autoload :RecoverableDatabase, '2014-04-01/generated/azure_mgmt_sql/models/recoverable_database.rb' autoload :RestorableDroppedDatabase, '2014-04-01/generated/azure_mgmt_sql/models/restorable_dropped_database.rb' - autoload :RestorePoint, '2014-04-01/generated/azure_mgmt_sql/models/restore_point.rb' autoload :ServerConnectionPolicy, '2014-04-01/generated/azure_mgmt_sql/models/server_connection_policy.rb' autoload :ServiceTierAdvisor, '2014-04-01/generated/azure_mgmt_sql/models/service_tier_advisor.rb' autoload :TransparentDataEncryption, '2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption.rb' autoload :RecommendedIndex, '2014-04-01/generated/azure_mgmt_sql/models/recommended_index.rb' autoload :Database, '2014-04-01/generated/azure_mgmt_sql/models/database.rb' autoload :DatabaseUpdate, '2014-04-01/generated/azure_mgmt_sql/models/database_update.rb' - autoload :TransparentDataEncryptionActivity, '2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption_activity.rb' - autoload :ElasticPoolDatabaseActivity, '2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_database_activity.rb' - autoload :ElasticPoolActivity, '2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_activity.rb' - autoload :RecommendedElasticPool, '2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool.rb' autoload :DatabaseSecurityAlertPolicy, '2014-04-01/generated/azure_mgmt_sql/models/database_security_alert_policy.rb' autoload :DataMaskingPolicy, '2014-04-01/generated/azure_mgmt_sql/models/data_masking_policy.rb' autoload :DataMaskingRule, '2014-04-01/generated/azure_mgmt_sql/models/data_masking_rule.rb' @@ -156,19 +152,23 @@ module Models autoload :GeoBackupPolicy, '2014-04-01/generated/azure_mgmt_sql/models/geo_backup_policy.rb' autoload :ImportExportResponse, '2014-04-01/generated/azure_mgmt_sql/models/import_export_response.rb' autoload :ImportRequest, '2014-04-01/generated/azure_mgmt_sql/models/import_request.rb' + autoload :RecommendedElasticPool, '2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool.rb' autoload :ReplicationLink, '2014-04-01/generated/azure_mgmt_sql/models/replication_link.rb' + autoload :RestorePoint, '2014-04-01/generated/azure_mgmt_sql/models/restore_point.rb' autoload :ServerAzureADAdministrator, '2014-04-01/generated/azure_mgmt_sql/models/server_azure_adadministrator.rb' autoload :ServerCommunicationLink, '2014-04-01/generated/azure_mgmt_sql/models/server_communication_link.rb' autoload :Server, '2014-04-01/generated/azure_mgmt_sql/models/server.rb' autoload :ServerUpdate, '2014-04-01/generated/azure_mgmt_sql/models/server_update.rb' autoload :ServiceObjective, '2014-04-01/generated/azure_mgmt_sql/models/service_objective.rb' + autoload :ElasticPoolActivity, '2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_activity.rb' + autoload :ElasticPoolDatabaseActivity, '2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_database_activity.rb' + autoload :TransparentDataEncryptionActivity, '2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption_activity.rb' autoload :DatabaseConnectionPolicy, '2014-04-01/generated/azure_mgmt_sql/models/database_connection_policy.rb' autoload :DatabaseTableAuditingPolicy, '2014-04-01/generated/azure_mgmt_sql/models/database_table_auditing_policy.rb' autoload :ServerTableAuditingPolicy, '2014-04-01/generated/azure_mgmt_sql/models/server_table_auditing_policy.rb' autoload :AdvisorStatus, '2014-04-01/generated/azure_mgmt_sql/models/advisor_status.rb' autoload :AutoExecuteStatus, '2014-04-01/generated/azure_mgmt_sql/models/auto_execute_status.rb' autoload :BackupLongTermRetentionPolicyState, '2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_policy_state.rb' - autoload :RestorePointType, '2014-04-01/generated/azure_mgmt_sql/models/restore_point_type.rb' autoload :CapabilityStatus, '2014-04-01/generated/azure_mgmt_sql/models/capability_status.rb' autoload :MaxSizeUnits, '2014-04-01/generated/azure_mgmt_sql/models/max_size_units.rb' autoload :PerformanceLevelUnit, '2014-04-01/generated/azure_mgmt_sql/models/performance_level_unit.rb' @@ -183,8 +183,6 @@ module Models autoload :RecommendedIndexType, '2014-04-01/generated/azure_mgmt_sql/models/recommended_index_type.rb' autoload :ReadScale, '2014-04-01/generated/azure_mgmt_sql/models/read_scale.rb' autoload :SampleName, '2014-04-01/generated/azure_mgmt_sql/models/sample_name.rb' - autoload :TransparentDataEncryptionActivityStatus, '2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption_activity_status.rb' - autoload :ElasticPoolEdition, '2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_edition.rb' autoload :SecurityAlertPolicyState, '2014-04-01/generated/azure_mgmt_sql/models/security_alert_policy_state.rb' autoload :SecurityAlertPolicyEmailAccountAdmins, '2014-04-01/generated/azure_mgmt_sql/models/security_alert_policy_email_account_admins.rb' autoload :SecurityAlertPolicyUseServerDefault, '2014-04-01/generated/azure_mgmt_sql/models/security_alert_policy_use_server_default.rb' @@ -196,6 +194,7 @@ module Models autoload :DisasterRecoveryConfigurationFailoverPolicy, '2014-04-01/generated/azure_mgmt_sql/models/disaster_recovery_configuration_failover_policy.rb' autoload :DisasterRecoveryConfigurationRole, '2014-04-01/generated/azure_mgmt_sql/models/disaster_recovery_configuration_role.rb' autoload :ElasticPoolState, '2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_state.rb' + autoload :ElasticPoolEdition, '2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_edition.rb' autoload :GeoBackupPolicyState, '2014-04-01/generated/azure_mgmt_sql/models/geo_backup_policy_state.rb' autoload :StorageKeyType, '2014-04-01/generated/azure_mgmt_sql/models/storage_key_type.rb' autoload :AuthenticationType, '2014-04-01/generated/azure_mgmt_sql/models/authentication_type.rb' @@ -208,7 +207,9 @@ module Models autoload :QueryMetricUnit, '2014-04-01/generated/azure_mgmt_sql/models/query_metric_unit.rb' autoload :ReplicationRole, '2014-04-01/generated/azure_mgmt_sql/models/replication_role.rb' autoload :ReplicationState, '2014-04-01/generated/azure_mgmt_sql/models/replication_state.rb' + autoload :RestorePointType, '2014-04-01/generated/azure_mgmt_sql/models/restore_point_type.rb' autoload :ServerVersion, '2014-04-01/generated/azure_mgmt_sql/models/server_version.rb' autoload :ServerState, '2014-04-01/generated/azure_mgmt_sql/models/server_state.rb' + autoload :TransparentDataEncryptionActivityStatus, '2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption_activity_status.rb' end end diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/backup_long_term_retention_policies.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/backup_long_term_retention_policies.rb index 360a7ade1b..46e7ef1d97 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/backup_long_term_retention_policies.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/backup_long_term_retention_policies.rb @@ -37,8 +37,8 @@ def initialize(client) # # @return [BackupLongTermRetentionPolicy] operation results. # - def get(resource_group_name, server_name, database_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, database_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -55,8 +55,8 @@ def get(resource_group_name, server_name, database_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -72,7 +72,7 @@ def get_with_http_info(resource_group_name, server_name, database_name, custom_h # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, database_name, custom_headers:nil) + def get_async(resource_group_name, server_name, database_name, 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? @@ -82,7 +82,6 @@ def get_async(resource_group_name, server_name, database_name, custom_headers:ni request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -142,8 +141,8 @@ def get_async(resource_group_name, server_name, database_name, custom_headers:ni # # @return [BackupLongTermRetentionPolicy] operation results. # - def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -161,9 +160,9 @@ def create_or_update(resource_group_name, server_name, database_name, parameters # @return [Concurrent::Promise] promise which provides async access to http # response. # - def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) # Send request - promise = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers) + promise = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -192,8 +191,8 @@ def create_or_update_async(resource_group_name, server_name, database_name, para # # @return [BackupLongTermRetentionPolicyListResult] operation results. # - def list_by_database(resource_group_name, server_name, database_name, custom_headers:nil) - response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -210,8 +209,8 @@ def list_by_database(resource_group_name, server_name, database_name, custom_hea # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -227,7 +226,7 @@ def list_by_database_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_database_async(resource_group_name, server_name, database_name, custom_headers:nil) + def list_by_database_async(resource_group_name, server_name, database_name, 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? @@ -236,7 +235,6 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -296,8 +294,8 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust # # @return [BackupLongTermRetentionPolicy] operation results. # - def begin_create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -316,8 +314,8 @@ def begin_create_or_update(resource_group_name, server_name, database_name, para # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! end # @@ -335,7 +333,7 @@ def begin_create_or_update_with_http_info(resource_group_name, server_name, data # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def begin_create_or_update_async(resource_group_name, server_name, database_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? @@ -346,12 +344,13 @@ def begin_create_or_update_async(resource_group_name, server_name, database_name 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::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionPolicy.mapper() request_content = @client.serialize(request_mapper, parameters) diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/backup_long_term_retention_vaults.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/backup_long_term_retention_vaults.rb index b2f20c9303..2b0b066995 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/backup_long_term_retention_vaults.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/backup_long_term_retention_vaults.rb @@ -36,8 +36,8 @@ def initialize(client) # # @return [BackupLongTermRetentionVault] operation results. # - def get(resource_group_name, server_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -53,8 +53,8 @@ def get(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, custom_headers:nil) - get_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, custom_headers = nil) + get_async(resource_group_name, server_name, custom_headers).value! end # @@ -69,7 +69,7 @@ def get_with_http_info(resource_group_name, server_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, custom_headers:nil) + def get_async(resource_group_name, server_name, 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? @@ -78,7 +78,6 @@ def get_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -137,8 +136,8 @@ def get_async(resource_group_name, server_name, custom_headers:nil) # # @return [BackupLongTermRetentionVault] operation results. # - def create_or_update(resource_group_name, server_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -155,9 +154,9 @@ def create_or_update(resource_group_name, server_name, parameters, custom_header # @return [Concurrent::Promise] promise which provides async access to http # response. # - def create_or_update_async(resource_group_name, server_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil) # Send request - promise = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers) + promise = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -185,8 +184,8 @@ def create_or_update_async(resource_group_name, server_name, parameters, custom_ # # @return [BackupLongTermRetentionVaultListResult] operation results. # - def list_by_server(resource_group_name, server_name, custom_headers:nil) - response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -202,8 +201,8 @@ def list_by_server(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil) - list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! end # @@ -218,7 +217,7 @@ def list_by_server_with_http_info(resource_group_name, server_name, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_async(resource_group_name, server_name, custom_headers:nil) + def list_by_server_async(resource_group_name, server_name, 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? @@ -226,7 +225,6 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -285,8 +283,8 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) # # @return [BackupLongTermRetentionVault] operation results. # - def begin_create_or_update(resource_group_name, server_name, parameters, custom_headers:nil) - response = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update(resource_group_name, server_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -304,8 +302,8 @@ def begin_create_or_update(resource_group_name, server_name, parameters, custom_ # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers:nil) - begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! end # @@ -322,7 +320,7 @@ def begin_create_or_update_with_http_info(resource_group_name, server_name, para # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers:nil) + def begin_create_or_update_async(resource_group_name, server_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? @@ -332,12 +330,13 @@ def begin_create_or_update_async(resource_group_name, server_name, parameters, c 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::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionVault.mapper() request_content = @client.serialize(request_mapper, parameters) diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/capabilities.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/capabilities.rb index 713797bb1a..8e2bef0e7d 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/capabilities.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/capabilities.rb @@ -33,8 +33,8 @@ def initialize(client) # # @return [LocationCapabilities] operation results. # - def list_by_location(location_id, custom_headers:nil) - response = list_by_location_async(location_id, custom_headers:custom_headers).value! + def list_by_location(location_id, custom_headers = nil) + response = list_by_location_async(location_id, custom_headers).value! response.body unless response.nil? end @@ -47,8 +47,8 @@ def list_by_location(location_id, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_location_with_http_info(location_id, custom_headers:nil) - list_by_location_async(location_id, custom_headers:custom_headers).value! + def list_by_location_with_http_info(location_id, custom_headers = nil) + list_by_location_async(location_id, custom_headers).value! end # @@ -60,14 +60,13 @@ def list_by_location_with_http_info(location_id, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_location_async(location_id, custom_headers:nil) + def list_by_location_async(location_id, 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, 'location_id is nil' if location_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/data_masking_policies.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/data_masking_policies.rb index 0d6e39b138..45ab3cc3a3 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/data_masking_policies.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/data_masking_policies.rb @@ -39,8 +39,8 @@ def initialize(client) # # @return [DataMaskingPolicy] operation results. # - def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -59,8 +59,8 @@ def create_or_update(resource_group_name, server_name, database_name, parameters # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! end # @@ -78,7 +78,7 @@ def create_or_update_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, database_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? @@ -89,12 +89,13 @@ def create_or_update_async(resource_group_name, server_name, database_name, para 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::SQL::Mgmt::V2014_04_01::Models::DataMaskingPolicy.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -154,8 +155,8 @@ def create_or_update_async(resource_group_name, server_name, database_name, para # # @return [DataMaskingPolicy] operation results. # - def get(resource_group_name, server_name, database_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, database_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -172,8 +173,8 @@ def get(resource_group_name, server_name, database_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -189,7 +190,7 @@ def get_with_http_info(resource_group_name, server_name, database_name, custom_h # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, database_name, custom_headers:nil) + def get_async(resource_group_name, server_name, database_name, 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? @@ -199,7 +200,6 @@ def get_async(resource_group_name, server_name, database_name, custom_headers:ni request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/data_masking_rules.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/data_masking_rules.rb index 8da1c188e9..e5605bdcbd 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/data_masking_rules.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/data_masking_rules.rb @@ -40,8 +40,8 @@ def initialize(client) # # @return [DataMaskingRule] operation results. # - def create_or_update(resource_group_name, server_name, database_name, data_masking_rule_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, database_name, data_masking_rule_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, database_name, data_masking_rule_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, data_masking_rule_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -61,8 +61,8 @@ def create_or_update(resource_group_name, server_name, database_name, data_maski # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, server_name, database_name, data_masking_rule_name, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, server_name, database_name, data_masking_rule_name, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, server_name, database_name, data_masking_rule_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, database_name, data_masking_rule_name, parameters, custom_headers).value! end # @@ -81,7 +81,7 @@ def create_or_update_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, server_name, database_name, data_masking_rule_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, database_name, data_masking_rule_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? @@ -93,12 +93,13 @@ def create_or_update_async(resource_group_name, server_name, database_name, data 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::SQL::Mgmt::V2014_04_01::Models::DataMaskingRule.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -168,8 +169,8 @@ def create_or_update_async(resource_group_name, server_name, database_name, data # # @return [DataMaskingRuleListResult] operation results. # - def list_by_database(resource_group_name, server_name, database_name, custom_headers:nil) - response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -186,8 +187,8 @@ def list_by_database(resource_group_name, server_name, database_name, custom_hea # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -203,7 +204,7 @@ def list_by_database_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_database_async(resource_group_name, server_name, database_name, custom_headers:nil) + def list_by_database_async(resource_group_name, server_name, database_name, 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? @@ -213,7 +214,6 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/database_advisors.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/database_advisors.rb index 9e639ae252..9d7dc4c434 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/database_advisors.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/database_advisors.rb @@ -37,8 +37,8 @@ def initialize(client) # # @return [AdvisorListResult] operation results. # - def list_by_database(resource_group_name, server_name, database_name, custom_headers:nil) - response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -55,8 +55,8 @@ def list_by_database(resource_group_name, server_name, database_name, custom_hea # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -72,7 +72,7 @@ def list_by_database_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_database_async(resource_group_name, server_name, database_name, custom_headers:nil) + def list_by_database_async(resource_group_name, server_name, database_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -81,7 +81,6 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -140,8 +139,8 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust # # @return [Advisor] operation results. # - def get(resource_group_name, server_name, database_name, advisor_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, database_name, advisor_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, database_name, advisor_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, advisor_name, custom_headers).value! response.body unless response.nil? end @@ -159,8 +158,8 @@ def get(resource_group_name, server_name, database_name, advisor_name, custom_he # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, database_name, advisor_name, custom_headers:nil) - get_async(resource_group_name, server_name, database_name, advisor_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, database_name, advisor_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, advisor_name, custom_headers).value! end # @@ -177,7 +176,7 @@ def get_with_http_info(resource_group_name, server_name, database_name, advisor_ # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, database_name, advisor_name, custom_headers:nil) + def get_async(resource_group_name, server_name, database_name, advisor_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -187,7 +186,6 @@ def get_async(resource_group_name, server_name, database_name, advisor_name, cus request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -247,8 +245,8 @@ def get_async(resource_group_name, server_name, database_name, advisor_name, cus # # @return [Advisor] operation results. # - def create_or_update(resource_group_name, server_name, database_name, advisor_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, database_name, advisor_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, database_name, advisor_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, advisor_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -267,8 +265,8 @@ def create_or_update(resource_group_name, server_name, database_name, advisor_na # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, server_name, database_name, advisor_name, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, server_name, database_name, advisor_name, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, server_name, database_name, advisor_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, database_name, advisor_name, parameters, custom_headers).value! end # @@ -286,7 +284,7 @@ def create_or_update_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, server_name, database_name, advisor_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, database_name, advisor_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -297,12 +295,13 @@ def create_or_update_async(resource_group_name, server_name, database_name, advi 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::SQL::Mgmt::V2014_04_01::Models::Advisor.mapper() request_content = @client.serialize(request_mapper, parameters) diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/database_connection_policies.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/database_connection_policies.rb index fb499df2ff..ba54b4d48c 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/database_connection_policies.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/database_connection_policies.rb @@ -39,8 +39,8 @@ def initialize(client) # # @return [DatabaseConnectionPolicy] operation results. # - def get(resource_group_name, server_name, database_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, database_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -59,8 +59,8 @@ def get(resource_group_name, server_name, database_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -78,7 +78,7 @@ def get_with_http_info(resource_group_name, server_name, database_name, custom_h # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, database_name, custom_headers:nil) + def get_async(resource_group_name, server_name, database_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -88,7 +88,6 @@ def get_async(resource_group_name, server_name, database_name, custom_headers:ni request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -149,8 +148,8 @@ def get_async(resource_group_name, server_name, database_name, custom_headers:ni # # @return [DatabaseConnectionPolicy] operation results. # - def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -170,8 +169,8 @@ def create_or_update(resource_group_name, server_name, database_name, parameters # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! end # @@ -190,7 +189,7 @@ def create_or_update_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -201,12 +200,13 @@ def create_or_update_async(resource_group_name, server_name, database_name, para 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::SQL::Mgmt::V2014_04_01::Models::DatabaseConnectionPolicy.mapper() request_content = @client.serialize(request_mapper, parameters) diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/database_table_auditing_policies.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/database_table_auditing_policies.rb index 6801f37168..06218b9a5e 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/database_table_auditing_policies.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/database_table_auditing_policies.rb @@ -39,8 +39,8 @@ def initialize(client) # # @return [DatabaseTableAuditingPolicy] operation results. # - def get(resource_group_name, server_name, database_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, database_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -59,8 +59,8 @@ def get(resource_group_name, server_name, database_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -78,7 +78,7 @@ def get_with_http_info(resource_group_name, server_name, database_name, custom_h # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, database_name, custom_headers:nil) + def get_async(resource_group_name, server_name, database_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -88,7 +88,6 @@ def get_async(resource_group_name, server_name, database_name, custom_headers:ni request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -150,8 +149,8 @@ def get_async(resource_group_name, server_name, database_name, custom_headers:ni # # @return [DatabaseTableAuditingPolicy] operation results. # - def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -172,8 +171,8 @@ def create_or_update(resource_group_name, server_name, database_name, parameters # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! end # @@ -193,7 +192,7 @@ def create_or_update_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -204,12 +203,13 @@ def create_or_update_async(resource_group_name, server_name, database_name, para 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::SQL::Mgmt::V2014_04_01::Models::DatabaseTableAuditingPolicy.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -281,8 +281,8 @@ def create_or_update_async(resource_group_name, server_name, database_name, para # # @return [DatabaseTableAuditingPolicyListResult] operation results. # - def list_by_database(resource_group_name, server_name, database_name, custom_headers:nil) - response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -301,8 +301,8 @@ def list_by_database(resource_group_name, server_name, database_name, custom_hea # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -320,7 +320,7 @@ def list_by_database_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_database_async(resource_group_name, server_name, database_name, custom_headers:nil) + def list_by_database_async(resource_group_name, server_name, database_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -329,7 +329,6 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/database_threat_detection_policies.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/database_threat_detection_policies.rb index 9d0a60b749..324667357c 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/database_threat_detection_policies.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/database_threat_detection_policies.rb @@ -38,8 +38,8 @@ def initialize(client) # # @return [DatabaseSecurityAlertPolicy] operation results. # - def get(resource_group_name, server_name, database_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, database_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -57,8 +57,8 @@ def get(resource_group_name, server_name, database_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -75,7 +75,7 @@ def get_with_http_info(resource_group_name, server_name, database_name, custom_h # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, database_name, custom_headers:nil) + def get_async(resource_group_name, server_name, database_name, custom_headers = 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, 'server_name is nil' if server_name.nil? @@ -85,7 +85,6 @@ def get_async(resource_group_name, server_name, database_name, custom_headers:ni request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -146,8 +145,8 @@ def get_async(resource_group_name, server_name, database_name, custom_headers:ni # # @return [DatabaseSecurityAlertPolicy] operation results. # - def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -167,8 +166,8 @@ def create_or_update(resource_group_name, server_name, database_name, parameters # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! end # @@ -187,7 +186,7 @@ def create_or_update_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = 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, 'server_name is nil' if server_name.nil? @@ -198,12 +197,13 @@ def create_or_update_async(resource_group_name, server_name, database_name, para 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::SQL::Mgmt::V2014_04_01::Models::DatabaseSecurityAlertPolicy.mapper() request_content = @client.serialize(request_mapper, parameters) diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/database_usages.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/database_usages.rb index 714a3163bd..9c8afaa2df 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/database_usages.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/database_usages.rb @@ -37,8 +37,8 @@ def initialize(client) # # @return [DatabaseUsageListResult] operation results. # - def list_by_database(resource_group_name, server_name, database_name, custom_headers:nil) - response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -55,8 +55,8 @@ def list_by_database(resource_group_name, server_name, database_name, custom_hea # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -72,7 +72,7 @@ def list_by_database_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_database_async(resource_group_name, server_name, database_name, custom_headers:nil) + def list_by_database_async(resource_group_name, server_name, database_name, 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? @@ -81,7 +81,6 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb index 520ea45137..ad9c92af60 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb @@ -35,8 +35,8 @@ def initialize(client) # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - def pause(resource_group_name, server_name, database_name, custom_headers:nil) - response = pause_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def pause(resource_group_name, server_name, database_name, custom_headers = nil) + response = pause_async(resource_group_name, server_name, database_name, custom_headers).value! nil end @@ -52,9 +52,9 @@ def pause(resource_group_name, server_name, database_name, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def pause_async(resource_group_name, server_name, database_name, custom_headers:nil) + def pause_async(resource_group_name, server_name, database_name, custom_headers = nil) # Send request - promise = begin_pause_async(resource_group_name, server_name, database_name, custom_headers:custom_headers) + promise = begin_pause_async(resource_group_name, server_name, database_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -79,8 +79,8 @@ def pause_async(resource_group_name, server_name, database_name, custom_headers: # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - def resume(resource_group_name, server_name, database_name, custom_headers:nil) - response = resume_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def resume(resource_group_name, server_name, database_name, custom_headers = nil) + response = resume_async(resource_group_name, server_name, database_name, custom_headers).value! nil end @@ -96,9 +96,9 @@ def resume(resource_group_name, server_name, database_name, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def resume_async(resource_group_name, server_name, database_name, custom_headers:nil) + def resume_async(resource_group_name, server_name, database_name, custom_headers = nil) # Send request - promise = begin_resume_async(resource_group_name, server_name, database_name, custom_headers:custom_headers) + promise = begin_resume_async(resource_group_name, server_name, database_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -128,8 +128,8 @@ def resume_async(resource_group_name, server_name, database_name, custom_headers # # @return [Database] operation results. # - def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -148,9 +148,9 @@ def create_or_update(resource_group_name, server_name, database_name, parameters # @return [Concurrent::Promise] promise which provides async access to http # response. # - def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) # Send request - promise = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers) + promise = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -181,8 +181,8 @@ def create_or_update_async(resource_group_name, server_name, database_name, para # # @return [Database] operation results. # - def update(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -200,9 +200,9 @@ def update(resource_group_name, server_name, database_name, parameters, custom_h # @return [Concurrent::Promise] promise which provides async access to http # response. # - def update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) # Send request - promise = begin_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers) + promise = begin_update_async(resource_group_name, server_name, database_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -230,8 +230,8 @@ def update_async(resource_group_name, server_name, database_name, parameters, cu # will be added to the HTTP request. # # - def delete(resource_group_name, server_name, database_name, custom_headers:nil) - response = delete_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def delete(resource_group_name, server_name, database_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, database_name, custom_headers).value! nil end @@ -248,8 +248,8 @@ def delete(resource_group_name, server_name, database_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - delete_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + delete_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -265,7 +265,7 @@ def delete_with_http_info(resource_group_name, server_name, database_name, custo # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, server_name, database_name, custom_headers:nil) + def delete_async(resource_group_name, server_name, database_name, 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? @@ -274,7 +274,6 @@ def delete_async(resource_group_name, server_name, database_name, custom_headers request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -325,8 +324,8 @@ def delete_async(resource_group_name, server_name, database_name, custom_headers # # @return [Database] operation results. # - def get(resource_group_name, server_name, database_name, expand:nil, custom_headers:nil) - response = get_async(resource_group_name, server_name, database_name, expand:expand, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, database_name, expand = nil, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, expand, custom_headers).value! response.body unless response.nil? end @@ -346,8 +345,8 @@ def get(resource_group_name, server_name, database_name, expand:nil, custom_head # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, database_name, expand:nil, custom_headers:nil) - get_async(resource_group_name, server_name, database_name, expand:expand, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, database_name, expand = nil, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, expand, custom_headers).value! end # @@ -366,7 +365,7 @@ def get_with_http_info(resource_group_name, server_name, database_name, expand:n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, database_name, expand:nil, custom_headers:nil) + def get_async(resource_group_name, server_name, database_name, expand = nil, 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? @@ -375,7 +374,6 @@ def get_async(resource_group_name, server_name, database_name, expand:nil, custo request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -437,8 +435,8 @@ def get_async(resource_group_name, server_name, database_name, expand:nil, custo # # @return [DatabaseListResult] operation results. # - def list_by_server(resource_group_name, server_name, expand:nil, filter:nil, custom_headers:nil) - response = list_by_server_async(resource_group_name, server_name, expand:expand, filter:filter, custom_headers:custom_headers).value! + def list_by_server(resource_group_name, server_name, expand = nil, filter = nil, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, expand, filter, custom_headers).value! response.body unless response.nil? end @@ -459,8 +457,8 @@ def list_by_server(resource_group_name, server_name, expand:nil, filter:nil, cus # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_with_http_info(resource_group_name, server_name, expand:nil, filter:nil, custom_headers:nil) - list_by_server_async(resource_group_name, server_name, expand:expand, filter:filter, custom_headers:custom_headers).value! + def list_by_server_with_http_info(resource_group_name, server_name, expand = nil, filter = nil, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, expand, filter, custom_headers).value! end # @@ -480,7 +478,7 @@ def list_by_server_with_http_info(resource_group_name, server_name, expand:nil, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_async(resource_group_name, server_name, expand:nil, filter:nil, custom_headers:nil) + def list_by_server_async(resource_group_name, server_name, expand = nil, filter = nil, 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? @@ -488,7 +486,6 @@ def list_by_server_async(resource_group_name, server_name, expand:nil, filter:ni request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -548,8 +545,8 @@ def list_by_server_async(resource_group_name, server_name, expand:nil, filter:ni # # @return [Database] operation results. # - def get_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers:nil) - response = get_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers:custom_headers).value! + def get_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers = nil) + response = get_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -568,8 +565,8 @@ def get_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, dat # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_by_elastic_pool_with_http_info(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers:nil) - get_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers:custom_headers).value! + def get_by_elastic_pool_with_http_info(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers = nil) + get_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers).value! end # @@ -587,7 +584,7 @@ def get_by_elastic_pool_with_http_info(resource_group_name, server_name, elastic # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers:nil) + def get_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, database_name, 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? @@ -597,7 +594,6 @@ def get_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_nam request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -656,8 +652,8 @@ def get_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_nam # # @return [DatabaseListResult] operation results. # - def list_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, custom_headers:nil) - response = list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers:custom_headers).value! + def list_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + response = list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! response.body unless response.nil? end @@ -675,8 +671,8 @@ def list_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, cu # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_elastic_pool_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers:nil) - list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers:custom_headers).value! + def list_by_elastic_pool_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! end # @@ -693,7 +689,7 @@ def list_by_elastic_pool_with_http_info(resource_group_name, server_name, elasti # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers:nil) + def list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, 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? @@ -702,7 +698,6 @@ def list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_na request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -762,8 +757,8 @@ def list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_na # # @return [Database] operation results. # - def get_by_recommended_elastic_pool(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers:nil) - response = get_by_recommended_elastic_pool_async(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers:custom_headers).value! + def get_by_recommended_elastic_pool(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers = nil) + response = get_by_recommended_elastic_pool_async(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -782,8 +777,8 @@ def get_by_recommended_elastic_pool(resource_group_name, server_name, recommende # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_by_recommended_elastic_pool_with_http_info(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers:nil) - get_by_recommended_elastic_pool_async(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers:custom_headers).value! + def get_by_recommended_elastic_pool_with_http_info(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers = nil) + get_by_recommended_elastic_pool_async(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers).value! end # @@ -801,7 +796,7 @@ def get_by_recommended_elastic_pool_with_http_info(resource_group_name, server_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_by_recommended_elastic_pool_async(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers:nil) + def get_by_recommended_elastic_pool_async(resource_group_name, server_name, recommended_elastic_pool_name, database_name, 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? @@ -811,7 +806,6 @@ def get_by_recommended_elastic_pool_async(resource_group_name, server_name, reco request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -870,8 +864,8 @@ def get_by_recommended_elastic_pool_async(resource_group_name, server_name, reco # # @return [DatabaseListResult] operation results. # - def list_by_recommended_elastic_pool(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers:nil) - response = list_by_recommended_elastic_pool_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers:custom_headers).value! + def list_by_recommended_elastic_pool(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers = nil) + response = list_by_recommended_elastic_pool_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers).value! response.body unless response.nil? end @@ -889,8 +883,8 @@ def list_by_recommended_elastic_pool(resource_group_name, server_name, recommend # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_recommended_elastic_pool_with_http_info(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers:nil) - list_by_recommended_elastic_pool_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers:custom_headers).value! + def list_by_recommended_elastic_pool_with_http_info(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers = nil) + list_by_recommended_elastic_pool_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers).value! end # @@ -907,7 +901,7 @@ def list_by_recommended_elastic_pool_with_http_info(resource_group_name, server_ # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_recommended_elastic_pool_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers:nil) + def list_by_recommended_elastic_pool_async(resource_group_name, server_name, recommended_elastic_pool_name, 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? @@ -916,7 +910,6 @@ def list_by_recommended_elastic_pool_async(resource_group_name, server_name, rec request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -975,8 +968,8 @@ def list_by_recommended_elastic_pool_async(resource_group_name, server_name, rec # # @return [ImportExportResponse] operation results. # - def import(resource_group_name, server_name, parameters, custom_headers:nil) - response = import_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def import(resource_group_name, server_name, parameters, custom_headers = nil) + response = import_async(resource_group_name, server_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -993,9 +986,9 @@ def import(resource_group_name, server_name, parameters, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def import_async(resource_group_name, server_name, parameters, custom_headers:nil) + def import_async(resource_group_name, server_name, parameters, custom_headers = nil) # Send request - promise = begin_import_async(resource_group_name, server_name, parameters, custom_headers:custom_headers) + promise = begin_import_async(resource_group_name, server_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -1027,8 +1020,8 @@ def import_async(resource_group_name, server_name, parameters, custom_headers:ni # # @return [ImportExportResponse] operation results. # - def create_import_operation(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = create_import_operation_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def create_import_operation(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_import_operation_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1046,9 +1039,9 @@ def create_import_operation(resource_group_name, server_name, database_name, par # @return [Concurrent::Promise] promise which provides async access to http # response. # - def create_import_operation_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def create_import_operation_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) # Send request - promise = begin_create_import_operation_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers) + promise = begin_create_import_operation_async(resource_group_name, server_name, database_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -1079,8 +1072,8 @@ def create_import_operation_async(resource_group_name, server_name, database_nam # # @return [ImportExportResponse] operation results. # - def export(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = export_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def export(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = export_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1098,9 +1091,9 @@ def export(resource_group_name, server_name, database_name, parameters, custom_h # @return [Concurrent::Promise] promise which provides async access to http # response. # - def export_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def export_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) # Send request - promise = begin_export_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers) + promise = begin_export_async(resource_group_name, server_name, database_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -1131,8 +1124,8 @@ def export_async(resource_group_name, server_name, database_name, parameters, cu # # @return [MetricListResult] operation results. # - def list_metrics(resource_group_name, server_name, database_name, filter, custom_headers:nil) - response = list_metrics_async(resource_group_name, server_name, database_name, filter, custom_headers:custom_headers).value! + def list_metrics(resource_group_name, server_name, database_name, filter, custom_headers = nil) + response = list_metrics_async(resource_group_name, server_name, database_name, filter, custom_headers).value! response.body unless response.nil? end @@ -1151,8 +1144,8 @@ def list_metrics(resource_group_name, server_name, database_name, filter, custom # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_metrics_with_http_info(resource_group_name, server_name, database_name, filter, custom_headers:nil) - list_metrics_async(resource_group_name, server_name, database_name, filter, custom_headers:custom_headers).value! + def list_metrics_with_http_info(resource_group_name, server_name, database_name, filter, custom_headers = nil) + list_metrics_async(resource_group_name, server_name, database_name, filter, custom_headers).value! end # @@ -1170,7 +1163,7 @@ def list_metrics_with_http_info(resource_group_name, server_name, database_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_metrics_async(resource_group_name, server_name, database_name, filter, custom_headers:nil) + def list_metrics_async(resource_group_name, server_name, database_name, filter, 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? @@ -1180,7 +1173,6 @@ def list_metrics_async(resource_group_name, server_name, database_name, filter, request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1238,8 +1230,8 @@ def list_metrics_async(resource_group_name, server_name, database_name, filter, # # @return [MetricDefinitionListResult] operation results. # - def list_metric_definitions(resource_group_name, server_name, database_name, custom_headers:nil) - response = list_metric_definitions_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_metric_definitions(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_metric_definitions_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -1256,8 +1248,8 @@ def list_metric_definitions(resource_group_name, server_name, database_name, cus # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_metric_definitions_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - list_metric_definitions_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_metric_definitions_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_metric_definitions_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -1273,7 +1265,7 @@ def list_metric_definitions_with_http_info(resource_group_name, server_name, dat # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_metric_definitions_async(resource_group_name, server_name, database_name, custom_headers:nil) + def list_metric_definitions_async(resource_group_name, server_name, database_name, 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? @@ -1282,7 +1274,6 @@ def list_metric_definitions_async(resource_group_name, server_name, database_nam request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1339,8 +1330,8 @@ def list_metric_definitions_async(resource_group_name, server_name, database_nam # will be added to the HTTP request. # # - def begin_pause(resource_group_name, server_name, database_name, custom_headers:nil) - response = begin_pause_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def begin_pause(resource_group_name, server_name, database_name, custom_headers = nil) + response = begin_pause_async(resource_group_name, server_name, database_name, custom_headers).value! nil end @@ -1357,8 +1348,8 @@ def begin_pause(resource_group_name, server_name, database_name, custom_headers: # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_pause_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - begin_pause_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def begin_pause_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + begin_pause_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -1374,7 +1365,7 @@ def begin_pause_with_http_info(resource_group_name, server_name, database_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_pause_async(resource_group_name, server_name, database_name, custom_headers:nil) + def begin_pause_async(resource_group_name, server_name, database_name, 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? @@ -1383,7 +1374,6 @@ def begin_pause_async(resource_group_name, server_name, database_name, custom_he request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1430,8 +1420,8 @@ def begin_pause_async(resource_group_name, server_name, database_name, custom_he # will be added to the HTTP request. # # - def begin_resume(resource_group_name, server_name, database_name, custom_headers:nil) - response = begin_resume_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def begin_resume(resource_group_name, server_name, database_name, custom_headers = nil) + response = begin_resume_async(resource_group_name, server_name, database_name, custom_headers).value! nil end @@ -1448,8 +1438,8 @@ def begin_resume(resource_group_name, server_name, database_name, custom_headers # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_resume_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - begin_resume_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def begin_resume_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + begin_resume_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -1465,7 +1455,7 @@ def begin_resume_with_http_info(resource_group_name, server_name, database_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_resume_async(resource_group_name, server_name, database_name, custom_headers:nil) + def begin_resume_async(resource_group_name, server_name, database_name, 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? @@ -1474,7 +1464,6 @@ def begin_resume_async(resource_group_name, server_name, database_name, custom_h request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1525,8 +1514,8 @@ def begin_resume_async(resource_group_name, server_name, database_name, custom_h # # @return [Database] operation results. # - def begin_create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1546,8 +1535,8 @@ def begin_create_or_update(resource_group_name, server_name, database_name, para # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! end # @@ -1566,7 +1555,7 @@ def begin_create_or_update_with_http_info(resource_group_name, server_name, data # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def begin_create_or_update_async(resource_group_name, server_name, database_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? @@ -1576,12 +1565,13 @@ def begin_create_or_update_async(resource_group_name, server_name, database_name 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::SQL::Mgmt::V2014_04_01::Models::Database.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1653,8 +1643,8 @@ def begin_create_or_update_async(resource_group_name, server_name, database_name # # @return [Database] operation results. # - def begin_update(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = begin_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def begin_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = begin_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1673,8 +1663,8 @@ def begin_update(resource_group_name, server_name, database_name, parameters, cu # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - begin_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def begin_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + begin_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! end # @@ -1692,7 +1682,7 @@ def begin_update_with_http_info(resource_group_name, server_name, database_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def begin_update_async(resource_group_name, server_name, database_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? @@ -1702,12 +1692,13 @@ def begin_update_async(resource_group_name, server_name, database_name, paramete 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::SQL::Mgmt::V2014_04_01::Models::DatabaseUpdate.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1768,8 +1759,8 @@ def begin_update_async(resource_group_name, server_name, database_name, paramete # # @return [ImportExportResponse] operation results. # - def begin_import(resource_group_name, server_name, parameters, custom_headers:nil) - response = begin_import_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def begin_import(resource_group_name, server_name, parameters, custom_headers = nil) + response = begin_import_async(resource_group_name, server_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1787,8 +1778,8 @@ def begin_import(resource_group_name, server_name, parameters, custom_headers:ni # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_import_with_http_info(resource_group_name, server_name, parameters, custom_headers:nil) - begin_import_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def begin_import_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil) + begin_import_async(resource_group_name, server_name, parameters, custom_headers).value! end # @@ -1805,7 +1796,7 @@ def begin_import_with_http_info(resource_group_name, server_name, parameters, cu # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_import_async(resource_group_name, server_name, parameters, custom_headers:nil) + def begin_import_async(resource_group_name, server_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? @@ -1814,12 +1805,13 @@ def begin_import_async(resource_group_name, server_name, parameters, custom_head 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::SQL::Mgmt::V2014_04_01::Models::ImportRequest.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1882,8 +1874,8 @@ def begin_import_async(resource_group_name, server_name, parameters, custom_head # # @return [ImportExportResponse] operation results. # - def begin_create_import_operation(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = begin_create_import_operation_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def begin_create_import_operation(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = begin_create_import_operation_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1903,8 +1895,8 @@ def begin_create_import_operation(resource_group_name, server_name, database_nam # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_create_import_operation_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - begin_create_import_operation_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def begin_create_import_operation_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + begin_create_import_operation_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! end # @@ -1923,7 +1915,7 @@ def begin_create_import_operation_with_http_info(resource_group_name, server_nam # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_create_import_operation_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def begin_create_import_operation_async(resource_group_name, server_name, database_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? @@ -1934,12 +1926,13 @@ def begin_create_import_operation_async(resource_group_name, server_name, databa 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::SQL::Mgmt::V2014_04_01::Models::ImportExtensionRequest.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -2001,8 +1994,8 @@ def begin_create_import_operation_async(resource_group_name, server_name, databa # # @return [ImportExportResponse] operation results. # - def begin_export(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = begin_export_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def begin_export(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = begin_export_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -2021,8 +2014,8 @@ def begin_export(resource_group_name, server_name, database_name, parameters, cu # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_export_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - begin_export_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def begin_export_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + begin_export_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! end # @@ -2040,7 +2033,7 @@ def begin_export_with_http_info(resource_group_name, server_name, database_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_export_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def begin_export_async(resource_group_name, server_name, database_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? @@ -2050,12 +2043,13 @@ def begin_export_async(resource_group_name, server_name, database_name, paramete 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::SQL::Mgmt::V2014_04_01::Models::ExportRequest.mapper() request_content = @client.serialize(request_mapper, parameters) diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb index fa01d6efb4..03eec63361 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb @@ -36,8 +36,8 @@ def initialize(client) # # @return [DisasterRecoveryConfigurationListResult] operation results. # - def list(resource_group_name, server_name, custom_headers:nil) - response = list_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list(resource_group_name, server_name, custom_headers = nil) + response = list_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -53,8 +53,8 @@ def list(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_with_http_info(resource_group_name, server_name, custom_headers:nil) - list_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_async(resource_group_name, server_name, custom_headers).value! end # @@ -69,7 +69,7 @@ def list_with_http_info(resource_group_name, server_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_async(resource_group_name, server_name, custom_headers:nil) + def list_async(resource_group_name, server_name, 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? @@ -77,7 +77,6 @@ def list_async(resource_group_name, server_name, custom_headers: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 +133,8 @@ def list_async(resource_group_name, server_name, custom_headers:nil) # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - def delete(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) - response = delete_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value! + def delete(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers).value! nil end @@ -152,9 +151,9 @@ def delete(resource_group_name, server_name, disaster_recovery_configuration_nam # @return [Concurrent::Promise] promise which provides async access to http # response. # - def delete_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) + def delete_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers = nil) # Send request - promise = begin_delete_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers) + promise = begin_delete_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -182,8 +181,8 @@ def delete_async(resource_group_name, server_name, disaster_recovery_configurati # # @return [DisasterRecoveryConfiguration] operation results. # - def create_or_update(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers).value! response.body unless response.nil? end @@ -200,9 +199,9 @@ def create_or_update(resource_group_name, server_name, disaster_recovery_configu # @return [Concurrent::Promise] promise which provides async access to http # response. # - def create_or_update_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers = nil) # Send request - promise = begin_create_or_update_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers) + promise = begin_create_or_update_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -232,8 +231,8 @@ def create_or_update_async(resource_group_name, server_name, disaster_recovery_c # # @return [DisasterRecoveryConfiguration] operation results. # - def get(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers).value! response.body unless response.nil? end @@ -251,8 +250,8 @@ def get(resource_group_name, server_name, disaster_recovery_configuration_name, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) - get_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers = nil) + get_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers).value! end # @@ -269,7 +268,7 @@ def get_with_http_info(resource_group_name, server_name, disaster_recovery_confi # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) + def get_async(resource_group_name, server_name, disaster_recovery_configuration_name, 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? @@ -278,7 +277,6 @@ def get_async(resource_group_name, server_name, disaster_recovery_configuration_ request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -335,8 +333,8 @@ def get_async(resource_group_name, server_name, disaster_recovery_configuration_ # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - def failover(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) - response = failover_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value! + def failover(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers = nil) + response = failover_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers).value! nil end @@ -353,9 +351,9 @@ def failover(resource_group_name, server_name, disaster_recovery_configuration_n # @return [Concurrent::Promise] promise which provides async access to http # response. # - def failover_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) + def failover_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers = nil) # Send request - promise = begin_failover_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers) + promise = begin_failover_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -382,8 +380,8 @@ def failover_async(resource_group_name, server_name, disaster_recovery_configura # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - def failover_allow_data_loss(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) - response = failover_allow_data_loss_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value! + def failover_allow_data_loss(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers = nil) + response = failover_allow_data_loss_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers).value! nil end @@ -400,9 +398,9 @@ def failover_allow_data_loss(resource_group_name, server_name, disaster_recovery # @return [Concurrent::Promise] promise which provides async access to http # response. # - def failover_allow_data_loss_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) + def failover_allow_data_loss_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers = nil) # Send request - promise = begin_failover_allow_data_loss_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers) + promise = begin_failover_allow_data_loss_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -429,8 +427,8 @@ def failover_allow_data_loss_async(resource_group_name, server_name, disaster_re # will be added to the HTTP request. # # - def begin_delete(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) - response = begin_delete_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value! + def begin_delete(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers).value! nil end @@ -448,8 +446,8 @@ def begin_delete(resource_group_name, server_name, disaster_recovery_configurati # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_delete_with_http_info(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) - begin_delete_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value! + def begin_delete_with_http_info(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers = nil) + begin_delete_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers).value! end # @@ -466,7 +464,7 @@ def begin_delete_with_http_info(resource_group_name, server_name, disaster_recov # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_delete_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) + def begin_delete_async(resource_group_name, server_name, disaster_recovery_configuration_name, 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? @@ -475,7 +473,6 @@ def begin_delete_async(resource_group_name, server_name, disaster_recovery_confi request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -524,8 +521,8 @@ def begin_delete_async(resource_group_name, server_name, disaster_recovery_confi # # @return [DisasterRecoveryConfiguration] operation results. # - def begin_create_or_update(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) - response = begin_create_or_update_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value! + def begin_create_or_update(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers).value! response.body unless response.nil? end @@ -543,8 +540,8 @@ def begin_create_or_update(resource_group_name, server_name, disaster_recovery_c # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_create_or_update_with_http_info(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) - begin_create_or_update_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value! + def begin_create_or_update_with_http_info(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers).value! end # @@ -561,7 +558,7 @@ def begin_create_or_update_with_http_info(resource_group_name, server_name, disa # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_create_or_update_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) + def begin_create_or_update_async(resource_group_name, server_name, disaster_recovery_configuration_name, 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? @@ -570,7 +567,6 @@ def begin_create_or_update_async(resource_group_name, server_name, disaster_reco request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -648,8 +644,8 @@ def begin_create_or_update_async(resource_group_name, server_name, disaster_reco # will be added to the HTTP request. # # - def begin_failover(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) - response = begin_failover_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value! + def begin_failover(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers = nil) + response = begin_failover_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers).value! nil end @@ -667,8 +663,8 @@ def begin_failover(resource_group_name, server_name, disaster_recovery_configura # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_failover_with_http_info(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) - begin_failover_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value! + def begin_failover_with_http_info(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers = nil) + begin_failover_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers).value! end # @@ -685,7 +681,7 @@ def begin_failover_with_http_info(resource_group_name, server_name, disaster_rec # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_failover_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) + def begin_failover_async(resource_group_name, server_name, disaster_recovery_configuration_name, 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? @@ -694,7 +690,6 @@ def begin_failover_async(resource_group_name, server_name, disaster_recovery_con request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -743,8 +738,8 @@ def begin_failover_async(resource_group_name, server_name, disaster_recovery_con # will be added to the HTTP request. # # - def begin_failover_allow_data_loss(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) - response = begin_failover_allow_data_loss_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value! + def begin_failover_allow_data_loss(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers = nil) + response = begin_failover_allow_data_loss_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers).value! nil end @@ -763,8 +758,8 @@ def begin_failover_allow_data_loss(resource_group_name, server_name, disaster_re # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_failover_allow_data_loss_with_http_info(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) - begin_failover_allow_data_loss_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value! + def begin_failover_allow_data_loss_with_http_info(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers = nil) + begin_failover_allow_data_loss_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers).value! end # @@ -782,7 +777,7 @@ def begin_failover_allow_data_loss_with_http_info(resource_group_name, server_na # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_failover_allow_data_loss_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) + def begin_failover_allow_data_loss_async(resource_group_name, server_name, disaster_recovery_configuration_name, 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? @@ -791,7 +786,6 @@ def begin_failover_allow_data_loss_async(resource_group_name, server_name, disas request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/elastic_pool_activities.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/elastic_pool_activities.rb index 34fdef1ec1..b2f0229015 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/elastic_pool_activities.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/elastic_pool_activities.rb @@ -38,8 +38,8 @@ def initialize(client) # # @return [ElasticPoolActivityListResult] operation results. # - def list_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, custom_headers:nil) - response = list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers:custom_headers).value! + def list_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + response = list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! response.body unless response.nil? end @@ -57,8 +57,8 @@ def list_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, cu # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_elastic_pool_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers:nil) - list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers:custom_headers).value! + def list_by_elastic_pool_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! end # @@ -75,7 +75,7 @@ def list_by_elastic_pool_with_http_info(resource_group_name, server_name, elasti # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers:nil) + def list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, 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? @@ -84,7 +84,6 @@ def list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_na request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/elastic_pool_database_activities.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/elastic_pool_database_activities.rb index 4b2d135f64..c00c0291b7 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/elastic_pool_database_activities.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/elastic_pool_database_activities.rb @@ -37,8 +37,8 @@ def initialize(client) # # @return [ElasticPoolDatabaseActivityListResult] operation results. # - def list_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, custom_headers:nil) - response = list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers:custom_headers).value! + def list_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + response = list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! response.body unless response.nil? end @@ -55,8 +55,8 @@ def list_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, cu # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_elastic_pool_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers:nil) - list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers:custom_headers).value! + def list_by_elastic_pool_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! end # @@ -72,7 +72,7 @@ def list_by_elastic_pool_with_http_info(resource_group_name, server_name, elasti # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers:nil) + def list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, 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? @@ -81,7 +81,6 @@ def list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_na request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/elastic_pools.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/elastic_pools.rb index a19d85ae37..6d22196d8a 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/elastic_pools.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/elastic_pools.rb @@ -40,8 +40,8 @@ def initialize(client) # # @return [ElasticPool] operation results. # - def create_or_update(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -60,9 +60,9 @@ def create_or_update(resource_group_name, server_name, elastic_pool_name, parame # @return [Concurrent::Promise] promise which provides async access to http # response. # - def create_or_update_async(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers = nil) # Send request - promise = begin_create_or_update_async(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers:custom_headers) + promise = begin_create_or_update_async(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -93,8 +93,8 @@ def create_or_update_async(resource_group_name, server_name, elastic_pool_name, # # @return [ElasticPool] operation results. # - def update(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers:nil) - response = update_async(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers:custom_headers).value! + def update(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -112,9 +112,9 @@ def update(resource_group_name, server_name, elastic_pool_name, parameters, cust # @return [Concurrent::Promise] promise which provides async access to http # response. # - def update_async(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers:nil) + def update_async(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers = nil) # Send request - promise = begin_update_async(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers:custom_headers) + promise = begin_update_async(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -142,8 +142,8 @@ def update_async(resource_group_name, server_name, elastic_pool_name, parameters # will be added to the HTTP request. # # - def delete(resource_group_name, server_name, elastic_pool_name, custom_headers:nil) - response = delete_async(resource_group_name, server_name, elastic_pool_name, custom_headers:custom_headers).value! + def delete(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! nil end @@ -160,8 +160,8 @@ def delete(resource_group_name, server_name, elastic_pool_name, custom_headers:n # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers:nil) - delete_async(resource_group_name, server_name, elastic_pool_name, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + delete_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! end # @@ -177,7 +177,7 @@ def delete_with_http_info(resource_group_name, server_name, elastic_pool_name, c # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, server_name, elastic_pool_name, custom_headers:nil) + def delete_async(resource_group_name, server_name, elastic_pool_name, 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? @@ -186,7 +186,6 @@ def delete_async(resource_group_name, server_name, elastic_pool_name, custom_hea request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -235,8 +234,8 @@ def delete_async(resource_group_name, server_name, elastic_pool_name, custom_hea # # @return [ElasticPool] operation results. # - def get(resource_group_name, server_name, elastic_pool_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, elastic_pool_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! response.body unless response.nil? end @@ -254,8 +253,8 @@ def get(resource_group_name, server_name, elastic_pool_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers:nil) - get_async(resource_group_name, server_name, elastic_pool_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + get_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! end # @@ -272,7 +271,7 @@ def get_with_http_info(resource_group_name, server_name, elastic_pool_name, cust # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, elastic_pool_name, custom_headers:nil) + def get_async(resource_group_name, server_name, elastic_pool_name, 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? @@ -281,7 +280,6 @@ def get_async(resource_group_name, server_name, elastic_pool_name, custom_header request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -338,8 +336,8 @@ def get_async(resource_group_name, server_name, elastic_pool_name, custom_header # # @return [ElasticPoolListResult] operation results. # - def list_by_server(resource_group_name, server_name, custom_headers:nil) - response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -355,8 +353,8 @@ def list_by_server(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil) - list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! end # @@ -371,7 +369,7 @@ def list_by_server_with_http_info(resource_group_name, server_name, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_async(resource_group_name, server_name, custom_headers:nil) + def list_by_server_async(resource_group_name, server_name, 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? @@ -379,7 +377,6 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -439,8 +436,8 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) # # @return [MetricListResult] operation results. # - def list_metrics(resource_group_name, server_name, elastic_pool_name, filter, custom_headers:nil) - response = list_metrics_async(resource_group_name, server_name, elastic_pool_name, filter, custom_headers:custom_headers).value! + def list_metrics(resource_group_name, server_name, elastic_pool_name, filter, custom_headers = nil) + response = list_metrics_async(resource_group_name, server_name, elastic_pool_name, filter, custom_headers).value! response.body unless response.nil? end @@ -459,8 +456,8 @@ def list_metrics(resource_group_name, server_name, elastic_pool_name, filter, cu # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_metrics_with_http_info(resource_group_name, server_name, elastic_pool_name, filter, custom_headers:nil) - list_metrics_async(resource_group_name, server_name, elastic_pool_name, filter, custom_headers:custom_headers).value! + def list_metrics_with_http_info(resource_group_name, server_name, elastic_pool_name, filter, custom_headers = nil) + list_metrics_async(resource_group_name, server_name, elastic_pool_name, filter, custom_headers).value! end # @@ -478,7 +475,7 @@ def list_metrics_with_http_info(resource_group_name, server_name, elastic_pool_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_metrics_async(resource_group_name, server_name, elastic_pool_name, filter, custom_headers:nil) + def list_metrics_async(resource_group_name, server_name, elastic_pool_name, filter, 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? @@ -488,7 +485,6 @@ def list_metrics_async(resource_group_name, server_name, elastic_pool_name, filt request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -546,8 +542,8 @@ def list_metrics_async(resource_group_name, server_name, elastic_pool_name, filt # # @return [MetricDefinitionListResult] operation results. # - def list_metric_definitions(resource_group_name, server_name, elastic_pool_name, custom_headers:nil) - response = list_metric_definitions_async(resource_group_name, server_name, elastic_pool_name, custom_headers:custom_headers).value! + def list_metric_definitions(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + response = list_metric_definitions_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! response.body unless response.nil? end @@ -564,8 +560,8 @@ def list_metric_definitions(resource_group_name, server_name, elastic_pool_name, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_metric_definitions_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers:nil) - list_metric_definitions_async(resource_group_name, server_name, elastic_pool_name, custom_headers:custom_headers).value! + def list_metric_definitions_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + list_metric_definitions_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! end # @@ -581,7 +577,7 @@ def list_metric_definitions_with_http_info(resource_group_name, server_name, ela # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_metric_definitions_async(resource_group_name, server_name, elastic_pool_name, custom_headers:nil) + def list_metric_definitions_async(resource_group_name, server_name, elastic_pool_name, 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? @@ -590,7 +586,6 @@ def list_metric_definitions_async(resource_group_name, server_name, elastic_pool request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -651,8 +646,8 @@ def list_metric_definitions_async(resource_group_name, server_name, elastic_pool # # @return [ElasticPool] operation results. # - def begin_create_or_update(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers:nil) - response = begin_create_or_update_async(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -672,8 +667,8 @@ def begin_create_or_update(resource_group_name, server_name, elastic_pool_name, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_create_or_update_with_http_info(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers:nil) - begin_create_or_update_async(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update_with_http_info(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers).value! end # @@ -692,7 +687,7 @@ def begin_create_or_update_with_http_info(resource_group_name, server_name, elas # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_create_or_update_async(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers:nil) + def begin_create_or_update_async(resource_group_name, server_name, elastic_pool_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? @@ -702,12 +697,13 @@ def begin_create_or_update_async(resource_group_name, server_name, elastic_pool_ 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::SQL::Mgmt::V2014_04_01::Models::ElasticPool.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -779,8 +775,8 @@ def begin_create_or_update_async(resource_group_name, server_name, elastic_pool_ # # @return [ElasticPool] operation results. # - def begin_update(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers:nil) - response = begin_update_async(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers:custom_headers).value! + def begin_update(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers = nil) + response = begin_update_async(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -799,8 +795,8 @@ def begin_update(resource_group_name, server_name, elastic_pool_name, parameters # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_update_with_http_info(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers:nil) - begin_update_async(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers:custom_headers).value! + def begin_update_with_http_info(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers = nil) + begin_update_async(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers).value! end # @@ -818,7 +814,7 @@ def begin_update_with_http_info(resource_group_name, server_name, elastic_pool_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_update_async(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers:nil) + def begin_update_async(resource_group_name, server_name, elastic_pool_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? @@ -828,12 +824,13 @@ def begin_update_async(resource_group_name, server_name, elastic_pool_name, para 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::SQL::Mgmt::V2014_04_01::Models::ElasticPoolUpdate.mapper() request_content = @client.serialize(request_mapper, parameters) diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/extensions.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/extensions.rb index 1987977f47..1f81ee8faf 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/extensions.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/extensions.rb @@ -37,8 +37,8 @@ def initialize(client) # # @return [ExtensionListResult] operation results. # - def list_by_database(resource_group_name, server_name, database_name, custom_headers:nil) - response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -55,8 +55,8 @@ def list_by_database(resource_group_name, server_name, database_name, custom_hea # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -72,7 +72,7 @@ def list_by_database_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_database_async(resource_group_name, server_name, database_name, custom_headers:nil) + def list_by_database_async(resource_group_name, server_name, database_name, 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? @@ -81,7 +81,6 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/firewall_rules.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/firewall_rules.rb index 135da0ec62..b55091f7dc 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/firewall_rules.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/firewall_rules.rb @@ -39,8 +39,8 @@ def initialize(client) # # @return [FirewallRule] operation results. # - def create_or_update(resource_group_name, server_name, firewall_rule_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, firewall_rule_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, firewall_rule_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, firewall_rule_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -59,8 +59,8 @@ def create_or_update(resource_group_name, server_name, firewall_rule_name, param # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, server_name, firewall_rule_name, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, server_name, firewall_rule_name, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, server_name, firewall_rule_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, firewall_rule_name, parameters, custom_headers).value! end # @@ -78,7 +78,7 @@ def create_or_update_with_http_info(resource_group_name, server_name, firewall_r # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, server_name, firewall_rule_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, firewall_rule_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? @@ -88,12 +88,13 @@ def create_or_update_async(resource_group_name, server_name, firewall_rule_name, 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::SQL::Mgmt::V2014_04_01::Models::FirewallRule.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -162,8 +163,8 @@ def create_or_update_async(resource_group_name, server_name, firewall_rule_name, # will be added to the HTTP request. # # - def delete(resource_group_name, server_name, firewall_rule_name, custom_headers:nil) - response = delete_async(resource_group_name, server_name, firewall_rule_name, custom_headers:custom_headers).value! + def delete(resource_group_name, server_name, firewall_rule_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, firewall_rule_name, custom_headers).value! nil end @@ -180,8 +181,8 @@ def delete(resource_group_name, server_name, firewall_rule_name, custom_headers: # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, server_name, firewall_rule_name, custom_headers:nil) - delete_async(resource_group_name, server_name, firewall_rule_name, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, server_name, firewall_rule_name, custom_headers = nil) + delete_async(resource_group_name, server_name, firewall_rule_name, custom_headers).value! end # @@ -197,7 +198,7 @@ def delete_with_http_info(resource_group_name, server_name, firewall_rule_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, server_name, firewall_rule_name, custom_headers:nil) + def delete_async(resource_group_name, server_name, firewall_rule_name, 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? @@ -206,7 +207,6 @@ def delete_async(resource_group_name, server_name, firewall_rule_name, custom_he request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -254,8 +254,8 @@ def delete_async(resource_group_name, server_name, firewall_rule_name, custom_he # # @return [FirewallRule] operation results. # - def get(resource_group_name, server_name, firewall_rule_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, firewall_rule_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, firewall_rule_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, firewall_rule_name, custom_headers).value! response.body unless response.nil? end @@ -272,8 +272,8 @@ def get(resource_group_name, server_name, firewall_rule_name, custom_headers:nil # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, firewall_rule_name, custom_headers:nil) - get_async(resource_group_name, server_name, firewall_rule_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, firewall_rule_name, custom_headers = nil) + get_async(resource_group_name, server_name, firewall_rule_name, custom_headers).value! end # @@ -289,7 +289,7 @@ def get_with_http_info(resource_group_name, server_name, firewall_rule_name, cus # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, firewall_rule_name, custom_headers:nil) + def get_async(resource_group_name, server_name, firewall_rule_name, 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? @@ -298,7 +298,6 @@ def get_async(resource_group_name, server_name, firewall_rule_name, custom_heade request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -355,8 +354,8 @@ def get_async(resource_group_name, server_name, firewall_rule_name, custom_heade # # @return [FirewallRuleListResult] operation results. # - def list_by_server(resource_group_name, server_name, custom_headers:nil) - response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -372,8 +371,8 @@ def list_by_server(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil) - list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! end # @@ -388,7 +387,7 @@ def list_by_server_with_http_info(resource_group_name, server_name, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_async(resource_group_name, server_name, custom_headers:nil) + def list_by_server_async(resource_group_name, server_name, 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? @@ -396,7 +395,6 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/geo_backup_policies.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/geo_backup_policies.rb index 5d0df92d26..d230580db8 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/geo_backup_policies.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/geo_backup_policies.rb @@ -39,8 +39,8 @@ def initialize(client) # # @return [GeoBackupPolicy] operation results. # - def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -59,8 +59,8 @@ def create_or_update(resource_group_name, server_name, database_name, parameters # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! end # @@ -78,7 +78,7 @@ def create_or_update_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, database_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? @@ -89,12 +89,13 @@ def create_or_update_async(resource_group_name, server_name, database_name, para 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::SQL::Mgmt::V2014_04_01::Models::GeoBackupPolicy.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -164,8 +165,8 @@ def create_or_update_async(resource_group_name, server_name, database_name, para # # @return [GeoBackupPolicy] operation results. # - def get(resource_group_name, server_name, database_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, database_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -182,8 +183,8 @@ def get(resource_group_name, server_name, database_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -199,7 +200,7 @@ def get_with_http_info(resource_group_name, server_name, database_name, custom_h # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, database_name, custom_headers:nil) + def get_async(resource_group_name, server_name, database_name, 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? @@ -209,7 +210,6 @@ def get_async(resource_group_name, server_name, database_name, custom_headers:ni request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -267,8 +267,8 @@ def get_async(resource_group_name, server_name, database_name, custom_headers:ni # # @return [GeoBackupPolicyListResult] operation results. # - def list_by_database(resource_group_name, server_name, database_name, custom_headers:nil) - response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -285,8 +285,8 @@ def list_by_database(resource_group_name, server_name, database_name, custom_hea # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -302,7 +302,7 @@ def list_by_database_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_database_async(resource_group_name, server_name, database_name, custom_headers:nil) + def list_by_database_async(resource_group_name, server_name, database_name, 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? @@ -311,7 +311,6 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/advisor.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/advisor.rb index b3b0550bf9..704580f9a4 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/advisor.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/advisor.rb @@ -48,7 +48,6 @@ class Advisor < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Advisor', type: { @@ -56,7 +55,6 @@ def self.mapper() class_name: 'Advisor', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -65,7 +63,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -74,7 +71,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -83,7 +79,6 @@ def self.mapper() } }, kind: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'kind', @@ -92,7 +87,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'location', @@ -101,7 +95,6 @@ def self.mapper() } }, advisor_status: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.advisorStatus', @@ -111,7 +104,6 @@ def self.mapper() } }, auto_execute_value: { - client_side_validation: true, required: true, serialized_name: 'properties.autoExecuteValue', type: { @@ -120,7 +112,6 @@ def self.mapper() } }, recommendations_status: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.recommendationsStatus', @@ -129,7 +120,6 @@ def self.mapper() } }, last_checked: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.lastChecked', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/advisor_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/advisor_list_result.rb index d17178d635..ebe2632b93 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/advisor_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/advisor_list_result.rb @@ -22,7 +22,6 @@ class AdvisorListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'AdvisorListResult', type: { @@ -30,13 +29,11 @@ def self.mapper() class_name: 'AdvisorListResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'AdvisorElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_policy.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_policy.rb index e6f8dc4983..476f48b2b0 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_policy.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_policy.rb @@ -31,7 +31,6 @@ class BackupLongTermRetentionPolicy < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'BackupLongTermRetentionPolicy', type: { @@ -39,7 +38,6 @@ def self.mapper() class_name: 'BackupLongTermRetentionPolicy', 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() } }, location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'location', @@ -75,7 +70,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: true, serialized_name: 'properties.state', type: { @@ -84,7 +78,6 @@ def self.mapper() } }, recovery_services_backup_policy_resource_id: { - client_side_validation: true, required: true, serialized_name: 'properties.recoveryServicesBackupPolicyResourceId', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_policy_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_policy_list_result.rb index c73c252f75..00d1795e00 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_policy_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_policy_list_result.rb @@ -23,7 +23,6 @@ class BackupLongTermRetentionPolicyListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'BackupLongTermRetentionPolicyListResult', type: { @@ -31,13 +30,11 @@ def self.mapper() class_name: 'BackupLongTermRetentionPolicyListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'BackupLongTermRetentionPolicyElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_vault.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_vault.rb index b44113a9bc..cc5a7057fc 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_vault.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_vault.rb @@ -25,7 +25,6 @@ class BackupLongTermRetentionVault < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'BackupLongTermRetentionVault', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'BackupLongTermRetentionVault', 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, read_only: true, serialized_name: 'location', @@ -69,7 +64,6 @@ def self.mapper() } }, recovery_services_vault_resource_id: { - client_side_validation: true, required: true, serialized_name: 'properties.recoveryServicesVaultResourceId', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_vault_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_vault_list_result.rb index 338809b732..a336ebab58 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_vault_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_vault_list_result.rb @@ -23,7 +23,6 @@ class BackupLongTermRetentionVaultListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'BackupLongTermRetentionVaultListResult', type: { @@ -31,13 +30,11 @@ def self.mapper() class_name: 'BackupLongTermRetentionVaultListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'BackupLongTermRetentionVaultElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/check_name_availability_request.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/check_name_availability_request.rb index c2d4d989be..7fb37455ba 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/check_name_availability_request.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/check_name_availability_request.rb @@ -27,7 +27,6 @@ class CheckNameAvailabilityRequest # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'CheckNameAvailabilityRequest', type: { @@ -35,7 +34,6 @@ def self.mapper() class_name: 'CheckNameAvailabilityRequest', model_properties: { name: { - client_side_validation: true, required: true, serialized_name: 'name', type: { @@ -43,7 +41,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: true, is_constant: true, serialized_name: 'type', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/check_name_availability_response.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/check_name_availability_response.rb index 9adb21785d..94f5c65fb0 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/check_name_availability_response.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/check_name_availability_response.rb @@ -35,7 +35,6 @@ class CheckNameAvailabilityResponse # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'CheckNameAvailabilityResponse', type: { @@ -43,7 +42,6 @@ def self.mapper() class_name: 'CheckNameAvailabilityResponse', model_properties: { available: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'available', @@ -52,7 +50,6 @@ def self.mapper() } }, message: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'message', @@ -61,7 +58,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -70,7 +66,6 @@ def self.mapper() } }, reason: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'reason', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/data_masking_policy.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/data_masking_policy.rb index 0261568a20..f61ec8c17d 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/data_masking_policy.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/data_masking_policy.rb @@ -44,7 +44,6 @@ class DataMaskingPolicy < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'DataMaskingPolicy', type: { @@ -52,7 +51,6 @@ def self.mapper() class_name: 'DataMaskingPolicy', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -61,7 +59,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -70,7 +67,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -79,7 +75,6 @@ def self.mapper() } }, data_masking_state: { - client_side_validation: true, required: true, serialized_name: 'properties.dataMaskingState', type: { @@ -88,7 +83,6 @@ def self.mapper() } }, exempt_principals: { - client_side_validation: true, required: false, serialized_name: 'properties.exemptPrincipals', type: { @@ -96,7 +90,6 @@ def self.mapper() } }, application_principals: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.applicationPrincipals', @@ -105,7 +98,6 @@ def self.mapper() } }, masking_level: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.maskingLevel', @@ -114,7 +106,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'location', @@ -123,7 +114,6 @@ def self.mapper() } }, kind: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'kind', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/data_masking_rule.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/data_masking_rule.rb index b262ec70a0..6988f7a91b 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/data_masking_rule.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/data_masking_rule.rb @@ -83,7 +83,6 @@ class DataMaskingRule < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'DataMaskingRule', type: { @@ -91,7 +90,6 @@ def self.mapper() class_name: 'DataMaskingRule', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -100,7 +98,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -109,7 +106,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -118,7 +114,6 @@ def self.mapper() } }, data_masking_rule_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.id', @@ -127,7 +122,6 @@ def self.mapper() } }, alias_name: { - client_side_validation: true, required: false, serialized_name: 'properties.aliasName', type: { @@ -135,7 +129,6 @@ def self.mapper() } }, rule_state: { - client_side_validation: true, required: false, serialized_name: 'properties.ruleState', type: { @@ -144,7 +137,6 @@ def self.mapper() } }, schema_name: { - client_side_validation: true, required: true, serialized_name: 'properties.schemaName', type: { @@ -152,7 +144,6 @@ def self.mapper() } }, table_name: { - client_side_validation: true, required: true, serialized_name: 'properties.tableName', type: { @@ -160,7 +151,6 @@ def self.mapper() } }, column_name: { - client_side_validation: true, required: true, serialized_name: 'properties.columnName', type: { @@ -168,7 +158,6 @@ def self.mapper() } }, masking_function: { - client_side_validation: true, required: true, serialized_name: 'properties.maskingFunction', type: { @@ -177,7 +166,6 @@ def self.mapper() } }, number_from: { - client_side_validation: true, required: false, serialized_name: 'properties.numberFrom', type: { @@ -185,7 +173,6 @@ def self.mapper() } }, number_to: { - client_side_validation: true, required: false, serialized_name: 'properties.numberTo', type: { @@ -193,7 +180,6 @@ def self.mapper() } }, prefix_size: { - client_side_validation: true, required: false, serialized_name: 'properties.prefixSize', type: { @@ -201,7 +187,6 @@ def self.mapper() } }, suffix_size: { - client_side_validation: true, required: false, serialized_name: 'properties.suffixSize', type: { @@ -209,7 +194,6 @@ def self.mapper() } }, replacement_string: { - client_side_validation: true, required: false, serialized_name: 'properties.replacementString', type: { @@ -217,7 +201,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'location', @@ -226,7 +209,6 @@ def self.mapper() } }, kind: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'kind', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/data_masking_rule_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/data_masking_rule_list_result.rb index 70a79ddf8a..cf71ab580c 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/data_masking_rule_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/data_masking_rule_list_result.rb @@ -23,7 +23,6 @@ class DataMaskingRuleListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'DataMaskingRuleListResult', type: { @@ -31,13 +30,11 @@ def self.mapper() class_name: 'DataMaskingRuleListResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'DataMaskingRuleElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database.rb index fda3ab7afb..114e915479 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database.rb @@ -224,7 +224,6 @@ class Database < TrackedResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Database', type: { @@ -232,7 +231,6 @@ def self.mapper() class_name: 'Database', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -241,7 +239,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -250,7 +247,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -258,14 +254,19 @@ def self.mapper() name: 'String' } }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, tags: { - client_side_validation: true, required: false, serialized_name: 'tags', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -274,16 +275,7 @@ def self.mapper() } } }, - location: { - client_side_validation: true, - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, kind: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'kind', @@ -292,7 +284,6 @@ def self.mapper() } }, collation: { - client_side_validation: true, required: false, serialized_name: 'properties.collation', type: { @@ -300,7 +291,6 @@ def self.mapper() } }, creation_date: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.creationDate', @@ -309,7 +299,6 @@ def self.mapper() } }, containment_state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.containmentState', @@ -318,7 +307,6 @@ def self.mapper() } }, current_service_objective_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.currentServiceObjectiveId', @@ -327,7 +315,6 @@ def self.mapper() } }, database_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.databaseId', @@ -336,7 +323,6 @@ def self.mapper() } }, earliest_restore_date: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.earliestRestoreDate', @@ -345,7 +331,6 @@ def self.mapper() } }, create_mode: { - client_side_validation: true, required: false, serialized_name: 'properties.createMode', type: { @@ -353,7 +338,6 @@ def self.mapper() } }, source_database_id: { - client_side_validation: true, required: false, serialized_name: 'properties.sourceDatabaseId', type: { @@ -361,7 +345,6 @@ def self.mapper() } }, source_database_deletion_date: { - client_side_validation: true, required: false, serialized_name: 'properties.sourceDatabaseDeletionDate', type: { @@ -369,7 +352,6 @@ def self.mapper() } }, restore_point_in_time: { - client_side_validation: true, required: false, serialized_name: 'properties.restorePointInTime', type: { @@ -377,7 +359,6 @@ def self.mapper() } }, recovery_services_recovery_point_resource_id: { - client_side_validation: true, required: false, serialized_name: 'properties.recoveryServicesRecoveryPointResourceId', type: { @@ -385,7 +366,6 @@ def self.mapper() } }, edition: { - client_side_validation: true, required: false, serialized_name: 'properties.edition', type: { @@ -393,7 +373,6 @@ def self.mapper() } }, max_size_bytes: { - client_side_validation: true, required: false, serialized_name: 'properties.maxSizeBytes', type: { @@ -401,7 +380,6 @@ def self.mapper() } }, requested_service_objective_id: { - client_side_validation: true, required: false, serialized_name: 'properties.requestedServiceObjectiveId', type: { @@ -409,7 +387,6 @@ def self.mapper() } }, requested_service_objective_name: { - client_side_validation: true, required: false, serialized_name: 'properties.requestedServiceObjectiveName', type: { @@ -417,7 +394,6 @@ def self.mapper() } }, service_level_objective: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.serviceLevelObjective', @@ -426,7 +402,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.status', @@ -435,7 +410,6 @@ def self.mapper() } }, elastic_pool_name: { - client_side_validation: true, required: false, serialized_name: 'properties.elasticPoolName', type: { @@ -443,7 +417,6 @@ def self.mapper() } }, default_secondary_location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.defaultSecondaryLocation', @@ -452,14 +425,12 @@ def self.mapper() } }, service_tier_advisors: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.serviceTierAdvisors', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ServiceTierAdvisorElementType', type: { @@ -470,14 +441,12 @@ def self.mapper() } }, transparent_data_encryption: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.transparentDataEncryption', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'TransparentDataEncryptionElementType', type: { @@ -488,14 +457,12 @@ def self.mapper() } }, recommended_index: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.recommendedIndex', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'RecommendedIndexElementType', type: { @@ -506,7 +473,6 @@ def self.mapper() } }, failover_group_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.failoverGroupId', @@ -515,7 +481,6 @@ def self.mapper() } }, read_scale: { - client_side_validation: true, required: false, serialized_name: 'properties.readScale', type: { @@ -524,7 +489,6 @@ def self.mapper() } }, sample_name: { - client_side_validation: true, required: false, serialized_name: 'properties.sampleName', type: { @@ -532,7 +496,6 @@ def self.mapper() } }, zone_redundant: { - client_side_validation: true, required: false, serialized_name: 'properties.zoneRedundant', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_connection_policy.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_connection_policy.rb index 06fcdb9e9e..e8a09b3c1a 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_connection_policy.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_connection_policy.rb @@ -46,7 +46,6 @@ class DatabaseConnectionPolicy < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'DatabaseConnectionPolicy', type: { @@ -54,7 +53,6 @@ def self.mapper() class_name: 'DatabaseConnectionPolicy', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -63,7 +61,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -72,7 +69,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -81,7 +77,6 @@ def self.mapper() } }, kind: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'kind', @@ -90,7 +85,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'location', @@ -99,7 +93,6 @@ def self.mapper() } }, security_enabled_access: { - client_side_validation: true, required: false, serialized_name: 'properties.securityEnabledAccess', type: { @@ -107,7 +100,6 @@ def self.mapper() } }, proxy_dns_name: { - client_side_validation: true, required: false, serialized_name: 'properties.proxyDnsName', type: { @@ -115,7 +107,6 @@ def self.mapper() } }, proxy_port: { - client_side_validation: true, required: false, serialized_name: 'properties.proxyPort', type: { @@ -123,7 +114,6 @@ def self.mapper() } }, visibility: { - client_side_validation: true, required: false, serialized_name: 'properties.visibility', type: { @@ -131,7 +121,6 @@ def self.mapper() } }, use_server_default: { - client_side_validation: true, required: false, serialized_name: 'properties.useServerDefault', type: { @@ -139,7 +128,6 @@ def self.mapper() } }, redirection_state: { - client_side_validation: true, required: false, serialized_name: 'properties.redirectionState', type: { @@ -147,7 +135,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, serialized_name: 'properties.state', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_list_result.rb index a01984f919..733e835ace 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_list_result.rb @@ -22,7 +22,6 @@ class DatabaseListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'DatabaseListResult', type: { @@ -30,13 +29,11 @@ def self.mapper() class_name: 'DatabaseListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'DatabaseElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_security_alert_policy.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_security_alert_policy.rb index 331a041a65..b945068d19 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_security_alert_policy.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_security_alert_policy.rb @@ -65,7 +65,6 @@ class DatabaseSecurityAlertPolicy < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'DatabaseSecurityAlertPolicy', type: { @@ -73,7 +72,6 @@ def self.mapper() class_name: 'DatabaseSecurityAlertPolicy', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -82,7 +80,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -91,7 +88,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -100,7 +96,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, serialized_name: 'location', type: { @@ -108,7 +103,6 @@ def self.mapper() } }, kind: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'kind', @@ -117,7 +111,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: true, serialized_name: 'properties.state', type: { @@ -126,7 +119,6 @@ def self.mapper() } }, disabled_alerts: { - client_side_validation: true, required: false, serialized_name: 'properties.disabledAlerts', type: { @@ -134,7 +126,6 @@ def self.mapper() } }, email_addresses: { - client_side_validation: true, required: false, serialized_name: 'properties.emailAddresses', type: { @@ -142,7 +133,6 @@ def self.mapper() } }, email_account_admins: { - client_side_validation: true, required: false, serialized_name: 'properties.emailAccountAdmins', type: { @@ -151,7 +141,6 @@ def self.mapper() } }, storage_endpoint: { - client_side_validation: true, required: false, serialized_name: 'properties.storageEndpoint', type: { @@ -159,7 +148,6 @@ def self.mapper() } }, storage_account_access_key: { - client_side_validation: true, required: false, serialized_name: 'properties.storageAccountAccessKey', type: { @@ -167,7 +155,6 @@ def self.mapper() } }, retention_days: { - client_side_validation: true, required: false, serialized_name: 'properties.retentionDays', type: { @@ -175,7 +162,6 @@ def self.mapper() } }, use_server_default: { - client_side_validation: true, required: false, serialized_name: 'properties.useServerDefault', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_table_auditing_policy.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_table_auditing_policy.rb index ce7c747c53..f56d3d334b 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_table_auditing_policy.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_table_auditing_policy.rb @@ -61,7 +61,6 @@ class DatabaseTableAuditingPolicy < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'DatabaseTableAuditingPolicy', type: { @@ -69,7 +68,6 @@ def self.mapper() class_name: 'DatabaseTableAuditingPolicy', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -78,7 +76,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -87,7 +84,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -96,7 +92,6 @@ def self.mapper() } }, kind: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'kind', @@ -105,7 +100,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'location', @@ -114,7 +108,6 @@ def self.mapper() } }, auditing_state: { - client_side_validation: true, required: false, serialized_name: 'properties.auditingState', type: { @@ -122,7 +115,6 @@ def self.mapper() } }, audit_logs_table_name: { - client_side_validation: true, required: false, serialized_name: 'properties.auditLogsTableName', type: { @@ -130,7 +122,6 @@ def self.mapper() } }, event_types_to_audit: { - client_side_validation: true, required: false, serialized_name: 'properties.eventTypesToAudit', type: { @@ -138,7 +129,6 @@ def self.mapper() } }, full_audit_logs_table_name: { - client_side_validation: true, required: false, serialized_name: 'properties.fullAuditLogsTableName', type: { @@ -146,7 +136,6 @@ def self.mapper() } }, retention_days: { - client_side_validation: true, required: false, serialized_name: 'properties.retentionDays', type: { @@ -154,7 +143,6 @@ def self.mapper() } }, storage_account_key: { - client_side_validation: true, required: false, serialized_name: 'properties.storageAccountKey', type: { @@ -162,7 +150,6 @@ def self.mapper() } }, storage_account_name: { - client_side_validation: true, required: false, serialized_name: 'properties.storageAccountName', type: { @@ -170,7 +157,6 @@ def self.mapper() } }, storage_account_resource_group_name: { - client_side_validation: true, required: false, serialized_name: 'properties.storageAccountResourceGroupName', type: { @@ -178,7 +164,6 @@ def self.mapper() } }, storage_account_secondary_key: { - client_side_validation: true, required: false, serialized_name: 'properties.storageAccountSecondaryKey', type: { @@ -186,7 +171,6 @@ def self.mapper() } }, storage_account_subscription_id: { - client_side_validation: true, required: false, serialized_name: 'properties.storageAccountSubscriptionId', type: { @@ -194,7 +178,6 @@ def self.mapper() } }, storage_table_endpoint: { - client_side_validation: true, required: false, serialized_name: 'properties.storageTableEndpoint', type: { @@ -202,7 +185,6 @@ def self.mapper() } }, use_server_default: { - client_side_validation: true, required: false, serialized_name: 'properties.useServerDefault', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_table_auditing_policy_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_table_auditing_policy_list_result.rb index 6c980a9923..0ea97127c8 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_table_auditing_policy_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_table_auditing_policy_list_result.rb @@ -24,7 +24,6 @@ class DatabaseTableAuditingPolicyListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'DatabaseTableAuditingPolicyListResult', type: { @@ -32,13 +31,11 @@ def self.mapper() class_name: 'DatabaseTableAuditingPolicyListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'DatabaseTableAuditingPolicyElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb index ab2ba28b4c..fa81fa5493 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb @@ -223,7 +223,6 @@ class DatabaseUpdate < Resource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'DatabaseUpdate', type: { @@ -231,7 +230,6 @@ def self.mapper() class_name: 'DatabaseUpdate', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -240,7 +238,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -249,7 +246,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -258,13 +254,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: { @@ -274,7 +268,6 @@ def self.mapper() } }, collation: { - client_side_validation: true, required: false, serialized_name: 'properties.collation', type: { @@ -282,7 +275,6 @@ def self.mapper() } }, creation_date: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.creationDate', @@ -291,7 +283,6 @@ def self.mapper() } }, containment_state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.containmentState', @@ -300,7 +291,6 @@ def self.mapper() } }, current_service_objective_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.currentServiceObjectiveId', @@ -309,7 +299,6 @@ def self.mapper() } }, database_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.databaseId', @@ -318,7 +307,6 @@ def self.mapper() } }, earliest_restore_date: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.earliestRestoreDate', @@ -327,7 +315,6 @@ def self.mapper() } }, create_mode: { - client_side_validation: true, required: false, serialized_name: 'properties.createMode', type: { @@ -335,7 +322,6 @@ def self.mapper() } }, source_database_id: { - client_side_validation: true, required: false, serialized_name: 'properties.sourceDatabaseId', type: { @@ -343,7 +329,6 @@ def self.mapper() } }, source_database_deletion_date: { - client_side_validation: true, required: false, serialized_name: 'properties.sourceDatabaseDeletionDate', type: { @@ -351,7 +336,6 @@ def self.mapper() } }, restore_point_in_time: { - client_side_validation: true, required: false, serialized_name: 'properties.restorePointInTime', type: { @@ -359,7 +343,6 @@ def self.mapper() } }, recovery_services_recovery_point_resource_id: { - client_side_validation: true, required: false, serialized_name: 'properties.recoveryServicesRecoveryPointResourceId', type: { @@ -367,7 +350,6 @@ def self.mapper() } }, edition: { - client_side_validation: true, required: false, serialized_name: 'properties.edition', type: { @@ -375,7 +357,6 @@ def self.mapper() } }, max_size_bytes: { - client_side_validation: true, required: false, serialized_name: 'properties.maxSizeBytes', type: { @@ -383,7 +364,6 @@ def self.mapper() } }, requested_service_objective_id: { - client_side_validation: true, required: false, serialized_name: 'properties.requestedServiceObjectiveId', type: { @@ -391,7 +371,6 @@ def self.mapper() } }, requested_service_objective_name: { - client_side_validation: true, required: false, serialized_name: 'properties.requestedServiceObjectiveName', type: { @@ -399,7 +378,6 @@ def self.mapper() } }, service_level_objective: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.serviceLevelObjective', @@ -408,7 +386,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.status', @@ -417,7 +394,6 @@ def self.mapper() } }, elastic_pool_name: { - client_side_validation: true, required: false, serialized_name: 'properties.elasticPoolName', type: { @@ -425,7 +401,6 @@ def self.mapper() } }, default_secondary_location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.defaultSecondaryLocation', @@ -434,14 +409,12 @@ def self.mapper() } }, service_tier_advisors: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.serviceTierAdvisors', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ServiceTierAdvisorElementType', type: { @@ -452,14 +425,12 @@ def self.mapper() } }, transparent_data_encryption: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.transparentDataEncryption', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'TransparentDataEncryptionElementType', type: { @@ -470,14 +441,12 @@ def self.mapper() } }, recommended_index: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.recommendedIndex', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'RecommendedIndexElementType', type: { @@ -488,7 +457,6 @@ def self.mapper() } }, failover_group_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.failoverGroupId', @@ -497,7 +465,6 @@ def self.mapper() } }, read_scale: { - client_side_validation: true, required: false, serialized_name: 'properties.readScale', type: { @@ -506,7 +473,6 @@ def self.mapper() } }, sample_name: { - client_side_validation: true, required: false, serialized_name: 'properties.sampleName', type: { @@ -514,7 +480,6 @@ def self.mapper() } }, zone_redundant: { - client_side_validation: true, required: false, serialized_name: 'properties.zoneRedundant', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_usage.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_usage.rb index 45eb319166..70112215d2 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_usage.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_usage.rb @@ -41,7 +41,6 @@ class DatabaseUsage # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'DatabaseUsage', type: { @@ -49,7 +48,6 @@ def self.mapper() class_name: 'DatabaseUsage', model_properties: { name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -58,7 +56,6 @@ def self.mapper() } }, resource_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'resourceName', @@ -67,7 +64,6 @@ def self.mapper() } }, display_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'displayName', @@ -76,7 +72,6 @@ def self.mapper() } }, current_value: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'currentValue', @@ -85,7 +80,6 @@ def self.mapper() } }, limit: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'limit', @@ -94,7 +88,6 @@ def self.mapper() } }, unit: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'unit', @@ -103,7 +96,6 @@ def self.mapper() } }, next_reset_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'nextResetTime', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_usage_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_usage_list_result.rb index c4fab998f5..4d55f8e9f3 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_usage_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/database_usage_list_result.rb @@ -23,7 +23,6 @@ class DatabaseUsageListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'DatabaseUsageListResult', type: { @@ -31,13 +30,11 @@ def self.mapper() class_name: 'DatabaseUsageListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'DatabaseUsageElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/disaster_recovery_configuration.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/disaster_recovery_configuration.rb index e6d76211af..f0016348a6 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/disaster_recovery_configuration.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/disaster_recovery_configuration.rb @@ -52,7 +52,6 @@ class DisasterRecoveryConfiguration < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'DisasterRecoveryConfiguration', type: { @@ -60,7 +59,6 @@ def self.mapper() class_name: 'DisasterRecoveryConfiguration', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -69,7 +67,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -78,7 +75,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -87,7 +83,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.status', @@ -96,7 +91,6 @@ def self.mapper() } }, auto_failover: { - client_side_validation: true, required: true, serialized_name: 'properties.autoFailover', type: { @@ -104,7 +98,6 @@ def self.mapper() } }, failover_policy: { - client_side_validation: true, required: true, serialized_name: 'properties.failoverPolicy', type: { @@ -112,7 +105,6 @@ def self.mapper() } }, partner_server_id: { - client_side_validation: true, required: true, serialized_name: 'properties.partnerServerId', type: { @@ -120,7 +112,6 @@ def self.mapper() } }, logical_server_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.logicalServerName', @@ -129,7 +120,6 @@ def self.mapper() } }, partner_logical_server_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.partnerLogicalServerName', @@ -138,7 +128,6 @@ def self.mapper() } }, role: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.role', @@ -147,7 +136,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'location', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/disaster_recovery_configuration_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/disaster_recovery_configuration_list_result.rb index 0fb429dddf..1cca192686 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/disaster_recovery_configuration_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/disaster_recovery_configuration_list_result.rb @@ -24,7 +24,6 @@ class DisasterRecoveryConfigurationListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'DisasterRecoveryConfigurationListResult', type: { @@ -32,13 +31,11 @@ def self.mapper() class_name: 'DisasterRecoveryConfigurationListResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'DisasterRecoveryConfigurationElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/edition_capability.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/edition_capability.rb index 46a96be81b..664e3b31ce 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/edition_capability.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/edition_capability.rb @@ -34,7 +34,6 @@ class EditionCapability # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'EditionCapability', type: { @@ -42,7 +41,6 @@ def self.mapper() class_name: 'EditionCapability', model_properties: { name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -51,7 +49,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'status', @@ -61,14 +58,12 @@ def self.mapper() } }, supported_service_level_objectives: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'supportedServiceLevelObjectives', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ServiceObjectiveCapabilityElementType', type: { @@ -79,7 +74,6 @@ def self.mapper() } }, zone_redundant: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'zoneRedundant', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool.rb index 2860bc9eec..d660ee104a 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool.rb @@ -53,7 +53,6 @@ class ElasticPool < TrackedResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ElasticPool', type: { @@ -61,7 +60,6 @@ def self.mapper() class_name: 'ElasticPool', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -70,7 +68,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -79,7 +76,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -87,14 +83,19 @@ def self.mapper() name: 'String' } }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, tags: { - client_side_validation: true, required: false, serialized_name: 'tags', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -103,16 +104,7 @@ def self.mapper() } } }, - location: { - client_side_validation: true, - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, creation_date: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.creationDate', @@ -121,7 +113,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.state', @@ -130,7 +121,6 @@ def self.mapper() } }, edition: { - client_side_validation: true, required: false, serialized_name: 'properties.edition', type: { @@ -138,7 +128,6 @@ def self.mapper() } }, dtu: { - client_side_validation: true, required: false, serialized_name: 'properties.dtu', type: { @@ -146,7 +135,6 @@ def self.mapper() } }, database_dtu_max: { - client_side_validation: true, required: false, serialized_name: 'properties.databaseDtuMax', type: { @@ -154,7 +142,6 @@ def self.mapper() } }, database_dtu_min: { - client_side_validation: true, required: false, serialized_name: 'properties.databaseDtuMin', type: { @@ -162,7 +149,6 @@ def self.mapper() } }, storage_mb: { - client_side_validation: true, required: false, serialized_name: 'properties.storageMB', type: { @@ -170,7 +156,6 @@ def self.mapper() } }, zone_redundant: { - client_side_validation: true, required: false, serialized_name: 'properties.zoneRedundant', type: { @@ -178,7 +163,6 @@ def self.mapper() } }, kind: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'kind', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_activity.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_activity.rb index 9f7eeb039f..8e0169527d 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_activity.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_activity.rb @@ -83,7 +83,6 @@ class ElasticPoolActivity < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ElasticPoolActivity', type: { @@ -91,7 +90,6 @@ def self.mapper() class_name: 'ElasticPoolActivity', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -100,7 +98,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -109,7 +106,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -118,7 +114,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, serialized_name: 'location', type: { @@ -126,7 +121,6 @@ def self.mapper() } }, end_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.endTime', @@ -135,7 +129,6 @@ def self.mapper() } }, error_code: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.errorCode', @@ -144,7 +137,6 @@ def self.mapper() } }, error_message: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.errorMessage', @@ -153,7 +145,6 @@ def self.mapper() } }, error_severity: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.errorSeverity', @@ -162,7 +153,6 @@ def self.mapper() } }, operation: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.operation', @@ -171,7 +161,6 @@ def self.mapper() } }, operation_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.operationId', @@ -180,7 +169,6 @@ def self.mapper() } }, percent_complete: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.percentComplete', @@ -189,7 +177,6 @@ def self.mapper() } }, requested_database_dtu_max: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.requestedDatabaseDtuMax', @@ -198,7 +185,6 @@ def self.mapper() } }, requested_database_dtu_min: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.requestedDatabaseDtuMin', @@ -207,7 +193,6 @@ def self.mapper() } }, requested_dtu: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.requestedDtu', @@ -216,7 +201,6 @@ def self.mapper() } }, requested_elastic_pool_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.requestedElasticPoolName', @@ -225,7 +209,6 @@ def self.mapper() } }, requested_storage_limit_in_gb: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.requestedStorageLimitInGB', @@ -234,7 +217,6 @@ def self.mapper() } }, elastic_pool_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.elasticPoolName', @@ -243,7 +225,6 @@ def self.mapper() } }, server_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.serverName', @@ -252,7 +233,6 @@ def self.mapper() } }, start_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.startTime', @@ -261,7 +241,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.state', @@ -270,7 +249,6 @@ def self.mapper() } }, requested_storage_limit_in_mb: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.requestedStorageLimitInMB', @@ -279,7 +257,6 @@ def self.mapper() } }, requested_database_dtu_guarantee: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.requestedDatabaseDtuGuarantee', @@ -288,7 +265,6 @@ def self.mapper() } }, requested_database_dtu_cap: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.requestedDatabaseDtuCap', @@ -297,7 +273,6 @@ def self.mapper() } }, requested_dtu_guarantee: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.requestedDtuGuarantee', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_activity_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_activity_list_result.rb index d76e3d1aac..bd7fc8cb9d 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_activity_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_activity_list_result.rb @@ -23,7 +23,6 @@ class ElasticPoolActivityListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ElasticPoolActivityListResult', type: { @@ -31,13 +30,11 @@ def self.mapper() class_name: 'ElasticPoolActivityListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ElasticPoolActivityElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_database_activity.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_database_activity.rb index 1c5878f32d..5951e9fb10 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_database_activity.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_database_activity.rb @@ -71,7 +71,6 @@ class ElasticPoolDatabaseActivity < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ElasticPoolDatabaseActivity', type: { @@ -79,7 +78,6 @@ def self.mapper() class_name: 'ElasticPoolDatabaseActivity', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -88,7 +86,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -97,7 +94,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -106,7 +102,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, serialized_name: 'location', type: { @@ -114,7 +109,6 @@ def self.mapper() } }, database_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.databaseName', @@ -123,7 +117,6 @@ def self.mapper() } }, end_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.endTime', @@ -132,7 +125,6 @@ def self.mapper() } }, error_code: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.errorCode', @@ -141,7 +133,6 @@ def self.mapper() } }, error_message: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.errorMessage', @@ -150,7 +141,6 @@ def self.mapper() } }, error_severity: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.errorSeverity', @@ -159,7 +149,6 @@ def self.mapper() } }, operation: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.operation', @@ -168,7 +157,6 @@ def self.mapper() } }, operation_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.operationId', @@ -177,7 +165,6 @@ def self.mapper() } }, percent_complete: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.percentComplete', @@ -186,7 +173,6 @@ def self.mapper() } }, requested_elastic_pool_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.requestedElasticPoolName', @@ -195,7 +181,6 @@ def self.mapper() } }, current_elastic_pool_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.currentElasticPoolName', @@ -204,7 +189,6 @@ def self.mapper() } }, current_service_objective: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.currentServiceObjective', @@ -213,7 +197,6 @@ def self.mapper() } }, requested_service_objective: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.requestedServiceObjective', @@ -222,7 +205,6 @@ def self.mapper() } }, server_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.serverName', @@ -231,7 +213,6 @@ def self.mapper() } }, start_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.startTime', @@ -240,7 +221,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.state', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_database_activity_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_database_activity_list_result.rb index 06278e8339..4d93bf0896 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_database_activity_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_database_activity_list_result.rb @@ -23,7 +23,6 @@ class ElasticPoolDatabaseActivityListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ElasticPoolDatabaseActivityListResult', type: { @@ -31,13 +30,11 @@ def self.mapper() class_name: 'ElasticPoolDatabaseActivityListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ElasticPoolDatabaseActivityElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_dtu_capability.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_dtu_capability.rb index fe07fcf27b..0e1c556d7d 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_dtu_capability.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_dtu_capability.rb @@ -45,7 +45,6 @@ class ElasticPoolDtuCapability # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ElasticPoolDtuCapability', type: { @@ -53,7 +52,6 @@ def self.mapper() class_name: 'ElasticPoolDtuCapability', model_properties: { limit: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'limit', @@ -62,7 +60,6 @@ def self.mapper() } }, max_database_count: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'maxDatabaseCount', @@ -71,7 +68,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'status', @@ -81,14 +77,12 @@ def self.mapper() } }, supported_max_sizes: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'supportedMaxSizes', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'MaxSizeCapabilityElementType', type: { @@ -99,7 +93,6 @@ def self.mapper() } }, included_max_size: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'includedMaxSize', @@ -109,14 +102,12 @@ def self.mapper() } }, supported_per_database_max_sizes: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'supportedPerDatabaseMaxSizes', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'MaxSizeCapabilityElementType', type: { @@ -127,14 +118,12 @@ def self.mapper() } }, supported_per_database_max_dtus: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'supportedPerDatabaseMaxDtus', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ElasticPoolPerDatabaseMaxDtuCapabilityElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_edition_capability.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_edition_capability.rb index d41d95b822..170a27f71b 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_edition_capability.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_edition_capability.rb @@ -34,7 +34,6 @@ class ElasticPoolEditionCapability # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ElasticPoolEditionCapability', type: { @@ -42,7 +41,6 @@ def self.mapper() class_name: 'ElasticPoolEditionCapability', model_properties: { name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -51,7 +49,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'status', @@ -61,14 +58,12 @@ def self.mapper() } }, supported_elastic_pool_dtus: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'supportedElasticPoolDtus', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ElasticPoolDtuCapabilityElementType', type: { @@ -79,7 +74,6 @@ def self.mapper() } }, zone_redundant: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'zoneRedundant', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_list_result.rb index 679c3de2c2..7faf6c52be 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_list_result.rb @@ -23,7 +23,6 @@ class ElasticPoolListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ElasticPoolListResult', type: { @@ -31,13 +30,11 @@ def self.mapper() class_name: 'ElasticPoolListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ElasticPoolElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_per_database_max_dtu_capability.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_per_database_max_dtu_capability.rb index 7d4e0491a4..d553d4596c 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_per_database_max_dtu_capability.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_per_database_max_dtu_capability.rb @@ -30,7 +30,6 @@ class ElasticPoolPerDatabaseMaxDtuCapability # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ElasticPoolPerDatabaseMaxDtuCapability', type: { @@ -38,7 +37,6 @@ def self.mapper() class_name: 'ElasticPoolPerDatabaseMaxDtuCapability', model_properties: { limit: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'limit', @@ -47,7 +45,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'status', @@ -57,14 +54,12 @@ def self.mapper() } }, supported_per_database_min_dtus: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'supportedPerDatabaseMinDtus', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ElasticPoolPerDatabaseMinDtuCapabilityElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_per_database_min_dtu_capability.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_per_database_min_dtu_capability.rb index 9dd9ac2c0e..488dd56511 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_per_database_min_dtu_capability.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_per_database_min_dtu_capability.rb @@ -26,7 +26,6 @@ class ElasticPoolPerDatabaseMinDtuCapability # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ElasticPoolPerDatabaseMinDtuCapability', type: { @@ -34,7 +33,6 @@ def self.mapper() class_name: 'ElasticPoolPerDatabaseMinDtuCapability', model_properties: { limit: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'limit', @@ -43,7 +41,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'status', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_update.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_update.rb index 05eda6b056..c11252149e 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_update.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_update.rb @@ -52,7 +52,6 @@ class ElasticPoolUpdate < Resource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ElasticPoolUpdate', type: { @@ -60,7 +59,6 @@ def self.mapper() class_name: 'ElasticPoolUpdate', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -69,7 +67,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -78,7 +75,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -87,13 +83,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: { @@ -103,7 +97,6 @@ def self.mapper() } }, creation_date: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.creationDate', @@ -112,7 +105,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.state', @@ -121,7 +113,6 @@ def self.mapper() } }, edition: { - client_side_validation: true, required: false, serialized_name: 'properties.edition', type: { @@ -129,7 +120,6 @@ def self.mapper() } }, dtu: { - client_side_validation: true, required: false, serialized_name: 'properties.dtu', type: { @@ -137,7 +127,6 @@ def self.mapper() } }, database_dtu_max: { - client_side_validation: true, required: false, serialized_name: 'properties.databaseDtuMax', type: { @@ -145,7 +134,6 @@ def self.mapper() } }, database_dtu_min: { - client_side_validation: true, required: false, serialized_name: 'properties.databaseDtuMin', type: { @@ -153,7 +141,6 @@ def self.mapper() } }, storage_mb: { - client_side_validation: true, required: false, serialized_name: 'properties.storageMB', type: { @@ -161,7 +148,6 @@ def self.mapper() } }, zone_redundant: { - client_side_validation: true, required: false, serialized_name: 'properties.zoneRedundant', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/export_request.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/export_request.rb index 483e918f3e..421f90f187 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/export_request.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/export_request.rb @@ -40,7 +40,6 @@ class ExportRequest # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ExportRequest', type: { @@ -48,7 +47,6 @@ def self.mapper() class_name: 'ExportRequest', model_properties: { storage_key_type: { - client_side_validation: true, required: true, serialized_name: 'storageKeyType', type: { @@ -57,7 +55,6 @@ def self.mapper() } }, storage_key: { - client_side_validation: true, required: true, serialized_name: 'storageKey', type: { @@ -65,7 +62,6 @@ def self.mapper() } }, storage_uri: { - client_side_validation: true, required: true, serialized_name: 'storageUri', type: { @@ -73,7 +69,6 @@ def self.mapper() } }, administrator_login: { - client_side_validation: true, required: true, serialized_name: 'administratorLogin', type: { @@ -81,7 +76,6 @@ def self.mapper() } }, administrator_login_password: { - client_side_validation: true, required: true, serialized_name: 'administratorLoginPassword', type: { @@ -89,7 +83,6 @@ def self.mapper() } }, authentication_type: { - client_side_validation: true, required: false, serialized_name: 'authenticationType', default_value: 'SQL', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/extension_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/extension_list_result.rb index 84f4f97bd0..1d27e928ab 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/extension_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/extension_list_result.rb @@ -22,7 +22,6 @@ class ExtensionListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ExtensionListResult', type: { @@ -30,13 +29,11 @@ def self.mapper() class_name: 'ExtensionListResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ObjectElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/firewall_rule.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/firewall_rule.rb index 5d8f9e9e36..3e377a1461 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/firewall_rule.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/firewall_rule.rb @@ -36,7 +36,6 @@ class FirewallRule < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'FirewallRule', type: { @@ -44,7 +43,6 @@ def self.mapper() class_name: 'FirewallRule', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -53,7 +51,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -62,7 +59,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -71,7 +67,6 @@ def self.mapper() } }, kind: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'kind', @@ -80,7 +75,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'location', @@ -89,7 +83,6 @@ def self.mapper() } }, start_ip_address: { - client_side_validation: true, required: true, serialized_name: 'properties.startIpAddress', type: { @@ -97,7 +90,6 @@ def self.mapper() } }, end_ip_address: { - client_side_validation: true, required: true, serialized_name: 'properties.endIpAddress', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/firewall_rule_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/firewall_rule_list_result.rb index c29ec66028..c5c73570de 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/firewall_rule_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/firewall_rule_list_result.rb @@ -22,7 +22,6 @@ class FirewallRuleListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'FirewallRuleListResult', type: { @@ -30,13 +29,11 @@ def self.mapper() class_name: 'FirewallRuleListResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'FirewallRuleElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/geo_backup_policy.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/geo_backup_policy.rb index 79ff72984e..b71b094bc1 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/geo_backup_policy.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/geo_backup_policy.rb @@ -33,7 +33,6 @@ class GeoBackupPolicy < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'GeoBackupPolicy', type: { @@ -41,7 +40,6 @@ def self.mapper() class_name: 'GeoBackupPolicy', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -50,7 +48,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -59,7 +56,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -68,7 +64,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: true, serialized_name: 'properties.state', type: { @@ -77,7 +72,6 @@ def self.mapper() } }, storage_type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.storageType', @@ -86,7 +80,6 @@ def self.mapper() } }, kind: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'kind', @@ -95,7 +88,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'location', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/geo_backup_policy_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/geo_backup_policy_list_result.rb index c59f559b91..58e8f92fe7 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/geo_backup_policy_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/geo_backup_policy_list_result.rb @@ -22,7 +22,6 @@ class GeoBackupPolicyListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'GeoBackupPolicyListResult', type: { @@ -30,13 +29,11 @@ def self.mapper() class_name: 'GeoBackupPolicyListResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'GeoBackupPolicyElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/import_export_response.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/import_export_response.rb index 60f62a271a..ba9fc03a19 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/import_export_response.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/import_export_response.rb @@ -46,7 +46,6 @@ class ImportExportResponse < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ImportExportResponse', type: { @@ -54,7 +53,6 @@ def self.mapper() class_name: 'ImportExportResponse', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -63,7 +61,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -72,7 +69,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -81,7 +77,6 @@ def self.mapper() } }, request_type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.requestType', @@ -90,7 +85,6 @@ def self.mapper() } }, request_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.requestId', @@ -99,7 +93,6 @@ def self.mapper() } }, server_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.serverName', @@ -108,7 +101,6 @@ def self.mapper() } }, database_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.databaseName', @@ -117,7 +109,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.status', @@ -126,7 +117,6 @@ def self.mapper() } }, last_modified_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.lastModifiedTime', @@ -135,7 +125,6 @@ def self.mapper() } }, queued_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.queuedTime', @@ -144,7 +133,6 @@ def self.mapper() } }, blob_uri: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.blobUri', @@ -153,7 +141,6 @@ def self.mapper() } }, error_message: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.errorMessage', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/import_extension_request.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/import_extension_request.rb index 2e857ae220..04c3dcda81 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/import_extension_request.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/import_extension_request.rb @@ -50,7 +50,6 @@ class ImportExtensionRequest # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ImportExtensionRequest', type: { @@ -58,7 +57,6 @@ def self.mapper() class_name: 'ImportExtensionRequest', model_properties: { name: { - client_side_validation: true, required: false, serialized_name: 'name', 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() } }, storage_key_type: { - client_side_validation: true, required: true, serialized_name: 'properties.storageKeyType', type: { @@ -83,7 +79,6 @@ def self.mapper() } }, storage_key: { - client_side_validation: true, required: true, serialized_name: 'properties.storageKey', type: { @@ -91,7 +86,6 @@ def self.mapper() } }, storage_uri: { - client_side_validation: true, required: true, serialized_name: 'properties.storageUri', type: { @@ -99,7 +93,6 @@ def self.mapper() } }, administrator_login: { - client_side_validation: true, required: true, serialized_name: 'properties.administratorLogin', type: { @@ -107,7 +100,6 @@ def self.mapper() } }, administrator_login_password: { - client_side_validation: true, required: true, serialized_name: 'properties.administratorLoginPassword', type: { @@ -115,7 +107,6 @@ def self.mapper() } }, authentication_type: { - client_side_validation: true, required: false, serialized_name: 'properties.authenticationType', default_value: 'SQL', @@ -125,7 +116,6 @@ def self.mapper() } }, operation_mode: { - client_side_validation: true, required: true, is_constant: true, serialized_name: 'properties.operationMode', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/import_request.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/import_request.rb index aa7b2e86d0..ad77be6135 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/import_request.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/import_request.rb @@ -44,7 +44,6 @@ class ImportRequest < ExportRequest # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ImportRequest', type: { @@ -52,7 +51,6 @@ def self.mapper() class_name: 'ImportRequest', model_properties: { storage_key_type: { - client_side_validation: true, required: true, serialized_name: 'storageKeyType', type: { @@ -61,7 +59,6 @@ def self.mapper() } }, storage_key: { - client_side_validation: true, required: true, serialized_name: 'storageKey', type: { @@ -69,7 +66,6 @@ def self.mapper() } }, storage_uri: { - client_side_validation: true, required: true, serialized_name: 'storageUri', type: { @@ -77,7 +73,6 @@ def self.mapper() } }, administrator_login: { - client_side_validation: true, required: true, serialized_name: 'administratorLogin', type: { @@ -85,7 +80,6 @@ def self.mapper() } }, administrator_login_password: { - client_side_validation: true, required: true, serialized_name: 'administratorLoginPassword', type: { @@ -93,7 +87,6 @@ def self.mapper() } }, authentication_type: { - client_side_validation: true, required: false, serialized_name: 'authenticationType', default_value: 'SQL', @@ -103,7 +96,6 @@ def self.mapper() } }, database_name: { - client_side_validation: true, required: true, serialized_name: 'databaseName', type: { @@ -111,7 +103,6 @@ def self.mapper() } }, edition: { - client_side_validation: true, required: true, serialized_name: 'edition', type: { @@ -119,7 +110,6 @@ def self.mapper() } }, service_objective_name: { - client_side_validation: true, required: true, serialized_name: 'serviceObjectiveName', type: { @@ -127,7 +117,6 @@ def self.mapper() } }, max_size_bytes: { - client_side_validation: true, required: true, serialized_name: 'maxSizeBytes', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/location_capabilities.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/location_capabilities.rb index 77a45c0b3c..15aecb4c29 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/location_capabilities.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/location_capabilities.rb @@ -31,7 +31,6 @@ class LocationCapabilities # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'LocationCapabilities', type: { @@ -39,7 +38,6 @@ def self.mapper() class_name: 'LocationCapabilities', model_properties: { name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -48,7 +46,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'status', @@ -58,14 +55,12 @@ def self.mapper() } }, supported_server_versions: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'supportedServerVersions', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ServerVersionCapabilityElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/max_size_capability.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/max_size_capability.rb index 9ae70d9f54..ec3e2cd13a 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/max_size_capability.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/max_size_capability.rb @@ -32,7 +32,6 @@ class MaxSizeCapability # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'MaxSizeCapability', type: { @@ -40,7 +39,6 @@ def self.mapper() class_name: 'MaxSizeCapability', model_properties: { limit: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'limit', @@ -49,7 +47,6 @@ def self.mapper() } }, unit: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'unit', @@ -59,7 +56,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'status', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric.rb index db22edf425..a5c00c7735 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric.rb @@ -41,7 +41,6 @@ class Metric # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Metric', type: { @@ -49,7 +48,6 @@ def self.mapper() class_name: 'Metric', model_properties: { start_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'startTime', @@ -58,7 +56,6 @@ def self.mapper() } }, end_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'endTime', @@ -67,7 +64,6 @@ def self.mapper() } }, time_grain: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'timeGrain', @@ -76,7 +72,6 @@ def self.mapper() } }, unit: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'unit', @@ -85,7 +80,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -95,14 +89,12 @@ def self.mapper() } }, metric_values: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'metricValues', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'MetricValueElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_availability.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_availability.rb index f5aea50369..eeb10a2f54 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_availability.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_availability.rb @@ -25,7 +25,6 @@ class MetricAvailability # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'MetricAvailability', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'MetricAvailability', model_properties: { retention: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'retention', @@ -42,7 +40,6 @@ def self.mapper() } }, time_grain: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'timeGrain', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_definition.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_definition.rb index 203fb271df..ad6fb5c924 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_definition.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_definition.rb @@ -39,7 +39,6 @@ class MetricDefinition # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'MetricDefinition', type: { @@ -47,7 +46,6 @@ def self.mapper() class_name: 'MetricDefinition', model_properties: { name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -57,7 +55,6 @@ def self.mapper() } }, primary_aggregation_type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'primaryAggregationType', @@ -66,7 +63,6 @@ def self.mapper() } }, resource_uri: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'resourceUri', @@ -75,7 +71,6 @@ def self.mapper() } }, unit: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'unit', @@ -84,14 +79,12 @@ def self.mapper() } }, metric_availabilities: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'metricAvailabilities', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'MetricAvailabilityElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_definition_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_definition_list_result.rb index d1d69663d2..90e2fe796c 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_definition_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_definition_list_result.rb @@ -23,7 +23,6 @@ class MetricDefinitionListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'MetricDefinitionListResult', type: { @@ -31,13 +30,11 @@ def self.mapper() class_name: 'MetricDefinitionListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'MetricDefinitionElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_list_result.rb index f33c98e628..f51521499a 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_list_result.rb @@ -22,7 +22,6 @@ class MetricListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'MetricListResult', type: { @@ -30,13 +29,11 @@ def self.mapper() class_name: 'MetricListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'MetricElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_name.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_name.rb index 8f4e1b101e..b22899785d 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_name.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_name.rb @@ -25,7 +25,6 @@ class MetricName # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'MetricName', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'MetricName', model_properties: { value: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'value', @@ -42,7 +40,6 @@ def self.mapper() } }, localized_value: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'localizedValue', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_value.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_value.rb index 8478c97671..4635862f16 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_value.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/metric_value.rb @@ -37,7 +37,6 @@ class MetricValue # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'MetricValue', type: { @@ -45,7 +44,6 @@ def self.mapper() class_name: 'MetricValue', model_properties: { count: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'count', @@ -54,7 +52,6 @@ def self.mapper() } }, average: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'average', @@ -63,7 +60,6 @@ def self.mapper() } }, maximum: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'maximum', @@ -72,7 +68,6 @@ def self.mapper() } }, minimum: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'minimum', @@ -81,7 +76,6 @@ def self.mapper() } }, timestamp: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'timestamp', @@ -90,7 +84,6 @@ def self.mapper() } }, total: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'total', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/operation.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/operation.rb index 410bda22fd..b3b0e219e9 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/operation.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/operation.rb @@ -26,7 +26,6 @@ class Operation # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Operation', type: { @@ -34,7 +33,6 @@ def self.mapper() class_name: 'Operation', model_properties: { name: { - client_side_validation: true, required: false, serialized_name: 'name', type: { @@ -42,7 +40,6 @@ def self.mapper() } }, display: { - client_side_validation: true, required: false, serialized_name: 'display', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/operation_display.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/operation_display.rb index b0ea6e2521..a5da7965d4 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/operation_display.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/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, serialized_name: 'provider', type: { @@ -45,7 +43,6 @@ def self.mapper() } }, resource: { - client_side_validation: true, required: false, serialized_name: 'resource', type: { @@ -53,7 +50,6 @@ def self.mapper() } }, operation: { - client_side_validation: true, required: false, serialized_name: 'operation', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/operation_impact.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/operation_impact.rb index e05bdcf466..648482e170 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/operation_impact.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/operation_impact.rb @@ -33,7 +33,6 @@ class OperationImpact # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OperationImpact', type: { @@ -41,7 +40,6 @@ def self.mapper() class_name: 'OperationImpact', model_properties: { name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -50,7 +48,6 @@ def self.mapper() } }, unit: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'unit', @@ -59,7 +56,6 @@ def self.mapper() } }, change_value_absolute: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'changeValueAbsolute', @@ -68,7 +64,6 @@ def self.mapper() } }, change_value_relative: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'changeValueRelative', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/operation_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/operation_list_result.rb index e86a3d7e7a..60e8440e67 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/operation_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/operation_list_result.rb @@ -28,7 +28,6 @@ class OperationListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OperationListResult', type: { @@ -36,13 +35,11 @@ def self.mapper() class_name: 'OperationListResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'OperationElementType', type: { @@ -53,7 +50,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/proxy_resource.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/proxy_resource.rb index cd408abce1..bef94ebd4d 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/proxy_resource.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/proxy_resource.rb @@ -19,7 +19,6 @@ class ProxyResource < Resource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ProxyResource', type: { @@ -27,7 +26,6 @@ def self.mapper() class_name: 'ProxyResource', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -36,7 +34,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -45,7 +42,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_interval.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_interval.rb index c88b4c22a6..e4f83ab2b1 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_interval.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_interval.rb @@ -31,7 +31,6 @@ class QueryInterval # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'QueryInterval', type: { @@ -39,7 +38,6 @@ def self.mapper() class_name: 'QueryInterval', model_properties: { interval_start_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'intervalStartTime', @@ -48,7 +46,6 @@ def self.mapper() } }, execution_count: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'executionCount', @@ -57,14 +54,12 @@ def self.mapper() } }, metrics: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'metrics', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'QueryMetricElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_metric.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_metric.rb index faac96b8a7..35b74ecf44 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_metric.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_metric.rb @@ -32,7 +32,6 @@ class QueryMetric # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'QueryMetric', type: { @@ -40,7 +39,6 @@ def self.mapper() class_name: 'QueryMetric', model_properties: { name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -49,7 +47,6 @@ def self.mapper() } }, display_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'displayName', @@ -58,7 +55,6 @@ def self.mapper() } }, unit: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'unit', @@ -68,7 +64,6 @@ def self.mapper() } }, value: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'value', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_statistic.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_statistic.rb index ed78bda944..1ac603edda 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_statistic.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_statistic.rb @@ -25,7 +25,6 @@ class QueryStatistic # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'QueryStatistic', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'QueryStatistic', model_properties: { query_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'queryId', @@ -42,14 +40,12 @@ def self.mapper() } }, intervals: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'intervals', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'QueryIntervalElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_statistic_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_statistic_list_result.rb index 79627354dc..bcd91e3412 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_statistic_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_statistic_list_result.rb @@ -22,7 +22,6 @@ class QueryStatisticListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'QueryStatisticListResult', type: { @@ -30,13 +29,11 @@ def self.mapper() class_name: 'QueryStatisticListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'QueryStatisticElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_text.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_text.rb index 38bd2f7c74..1ef4aa379b 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_text.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_text.rb @@ -29,7 +29,6 @@ class QueryText # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'QueryText', type: { @@ -37,7 +36,6 @@ def self.mapper() class_name: 'QueryText', model_properties: { name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -46,7 +44,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -55,7 +52,6 @@ def self.mapper() } }, query_text: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'queryText', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_text_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_text_list_result.rb index dbbd338730..de645d1718 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_text_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/query_text_list_result.rb @@ -22,7 +22,6 @@ class QueryTextListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'QueryTextListResult', type: { @@ -30,13 +29,11 @@ def self.mapper() class_name: 'QueryTextListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'QueryTextElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool.rb index 9f55b0eb6a..998f3620f7 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool.rb @@ -56,7 +56,6 @@ class RecommendedElasticPool < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RecommendedElasticPool', type: { @@ -64,7 +63,6 @@ def self.mapper() class_name: 'RecommendedElasticPool', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -73,7 +71,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -82,7 +79,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -91,7 +87,6 @@ def self.mapper() } }, database_edition: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.databaseEdition', @@ -100,7 +95,6 @@ def self.mapper() } }, dtu: { - client_side_validation: true, required: false, serialized_name: 'properties.dtu', type: { @@ -108,7 +102,6 @@ def self.mapper() } }, database_dtu_min: { - client_side_validation: true, required: false, serialized_name: 'properties.databaseDtuMin', type: { @@ -116,7 +109,6 @@ def self.mapper() } }, database_dtu_max: { - client_side_validation: true, required: false, serialized_name: 'properties.databaseDtuMax', type: { @@ -124,7 +116,6 @@ def self.mapper() } }, storage_mb: { - client_side_validation: true, required: false, serialized_name: 'properties.storageMB', type: { @@ -132,7 +123,6 @@ def self.mapper() } }, observation_period_start: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.observationPeriodStart', @@ -141,7 +131,6 @@ def self.mapper() } }, observation_period_end: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.observationPeriodEnd', @@ -150,7 +139,6 @@ def self.mapper() } }, max_observed_dtu: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.maxObservedDtu', @@ -159,7 +147,6 @@ def self.mapper() } }, max_observed_storage_mb: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.maxObservedStorageMB', @@ -168,14 +155,12 @@ def self.mapper() } }, databases: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.databases', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'DatabaseElementType', type: { @@ -186,14 +171,12 @@ def self.mapper() } }, metrics: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.metrics', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'RecommendedElasticPoolMetricElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool_list_metrics_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool_list_metrics_result.rb index 9d1dfba3e1..8977056927 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool_list_metrics_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool_list_metrics_result.rb @@ -24,7 +24,6 @@ class RecommendedElasticPoolListMetricsResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RecommendedElasticPoolListMetricsResult', type: { @@ -32,13 +31,11 @@ def self.mapper() class_name: 'RecommendedElasticPoolListMetricsResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'RecommendedElasticPoolMetricElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool_list_result.rb index 8fb4114421..66dfedb354 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool_list_result.rb @@ -23,7 +23,6 @@ class RecommendedElasticPoolListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RecommendedElasticPoolListResult', type: { @@ -31,13 +30,11 @@ def self.mapper() class_name: 'RecommendedElasticPoolListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'RecommendedElasticPoolElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool_metric.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool_metric.rb index f5389512f1..dd3273d6d0 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool_metric.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recommended_elastic_pool_metric.rb @@ -29,7 +29,6 @@ class RecommendedElasticPoolMetric # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RecommendedElasticPoolMetric', type: { @@ -37,7 +36,6 @@ def self.mapper() class_name: 'RecommendedElasticPoolMetric', model_properties: { date_time: { - client_side_validation: true, required: false, serialized_name: 'dateTime', type: { @@ -45,7 +43,6 @@ def self.mapper() } }, dtu: { - client_side_validation: true, required: false, serialized_name: 'dtu', type: { @@ -53,7 +50,6 @@ def self.mapper() } }, size_gb: { - client_side_validation: true, required: false, serialized_name: 'sizeGB', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recommended_index.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recommended_index.rb index 9d6511f965..bd89ff341c 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recommended_index.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recommended_index.rb @@ -69,7 +69,6 @@ class RecommendedIndex < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RecommendedIndex', type: { @@ -77,7 +76,6 @@ def self.mapper() class_name: 'RecommendedIndex', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -86,7 +84,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -95,7 +92,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -104,7 +100,6 @@ def self.mapper() } }, action: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.action', @@ -114,7 +109,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.state', @@ -124,7 +118,6 @@ def self.mapper() } }, created: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.created', @@ -133,7 +126,6 @@ def self.mapper() } }, last_modified: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.lastModified', @@ -142,7 +134,6 @@ def self.mapper() } }, index_type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.indexType', @@ -152,7 +143,6 @@ def self.mapper() } }, schema: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.schema', @@ -161,7 +151,6 @@ def self.mapper() } }, table: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.table', @@ -170,14 +159,12 @@ def self.mapper() } }, columns: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.columns', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -187,14 +174,12 @@ def self.mapper() } }, included_columns: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.includedColumns', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -204,7 +189,6 @@ def self.mapper() } }, index_script: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.indexScript', @@ -213,14 +197,12 @@ def self.mapper() } }, estimated_impact: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.estimatedImpact', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'OperationImpactElementType', type: { @@ -231,14 +213,12 @@ def self.mapper() } }, reported_impact: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.reportedImpact', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'OperationImpactElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recoverable_database.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recoverable_database.rb index fcb56a7ef8..097e8f1eae 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recoverable_database.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recoverable_database.rb @@ -32,7 +32,6 @@ class RecoverableDatabase < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RecoverableDatabase', type: { @@ -40,7 +39,6 @@ def self.mapper() class_name: 'RecoverableDatabase', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -49,7 +47,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -58,7 +55,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -67,7 +63,6 @@ def self.mapper() } }, edition: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.edition', @@ -76,7 +71,6 @@ def self.mapper() } }, service_level_objective: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.serviceLevelObjective', @@ -85,7 +79,6 @@ def self.mapper() } }, elastic_pool_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.elasticPoolName', @@ -94,7 +87,6 @@ def self.mapper() } }, last_available_backup_date: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.lastAvailableBackupDate', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recoverable_database_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recoverable_database_list_result.rb index c16498ad21..61226c153f 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recoverable_database_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/recoverable_database_list_result.rb @@ -22,7 +22,6 @@ class RecoverableDatabaseListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RecoverableDatabaseListResult', type: { @@ -30,13 +29,11 @@ def self.mapper() class_name: 'RecoverableDatabaseListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'RecoverableDatabaseElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/replication_link.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/replication_link.rb index c483e037f5..8df08edbb3 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/replication_link.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/replication_link.rb @@ -61,7 +61,6 @@ class ReplicationLink < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ReplicationLink', type: { @@ -69,7 +68,6 @@ def self.mapper() class_name: 'ReplicationLink', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -78,7 +76,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -87,7 +84,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -96,7 +92,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'location', @@ -105,7 +100,6 @@ def self.mapper() } }, is_termination_allowed: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.isTerminationAllowed', @@ -114,7 +108,6 @@ def self.mapper() } }, replication_mode: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.replicationMode', @@ -123,7 +116,6 @@ def self.mapper() } }, partner_server: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.partnerServer', @@ -132,7 +124,6 @@ def self.mapper() } }, partner_database: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.partnerDatabase', @@ -141,7 +132,6 @@ def self.mapper() } }, partner_location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.partnerLocation', @@ -150,7 +140,6 @@ def self.mapper() } }, role: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.role', @@ -160,7 +149,6 @@ def self.mapper() } }, partner_role: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.partnerRole', @@ -170,7 +158,6 @@ def self.mapper() } }, start_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.startTime', @@ -179,7 +166,6 @@ def self.mapper() } }, percent_complete: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.percentComplete', @@ -188,7 +174,6 @@ def self.mapper() } }, replication_state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.replicationState', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/replication_link_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/replication_link_list_result.rb index 45d55e5b93..9503e14b18 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/replication_link_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/replication_link_list_result.rb @@ -23,7 +23,6 @@ class ReplicationLinkListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ReplicationLinkListResult', type: { @@ -31,13 +30,11 @@ def self.mapper() class_name: 'ReplicationLinkListResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ReplicationLinkElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/resource.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/resource.rb index 1a1d35a0bb..2f8acc19a0 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/resource.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/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_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/restorable_dropped_database.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/restorable_dropped_database.rb index 00fa5705ba..a11659ebf8 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/restorable_dropped_database.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/restorable_dropped_database.rb @@ -47,7 +47,6 @@ class RestorableDroppedDatabase < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RestorableDroppedDatabase', type: { @@ -55,7 +54,6 @@ def self.mapper() class_name: 'RestorableDroppedDatabase', 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, read_only: true, serialized_name: 'location', @@ -91,7 +86,6 @@ def self.mapper() } }, database_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.databaseName', @@ -100,7 +94,6 @@ def self.mapper() } }, edition: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.edition', @@ -109,7 +102,6 @@ def self.mapper() } }, max_size_bytes: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.maxSizeBytes', @@ -118,7 +110,6 @@ def self.mapper() } }, service_level_objective: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.serviceLevelObjective', @@ -127,7 +118,6 @@ def self.mapper() } }, elastic_pool_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.elasticPoolName', @@ -136,7 +126,6 @@ def self.mapper() } }, creation_date: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.creationDate', @@ -145,7 +134,6 @@ def self.mapper() } }, deletion_date: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.deletionDate', @@ -154,7 +142,6 @@ def self.mapper() } }, earliest_restore_date: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.earliestRestoreDate', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/restorable_dropped_database_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/restorable_dropped_database_list_result.rb index 6702bcee8c..62b71f0d3b 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/restorable_dropped_database_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/restorable_dropped_database_list_result.rb @@ -23,7 +23,6 @@ class RestorableDroppedDatabaseListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RestorableDroppedDatabaseListResult', type: { @@ -31,13 +30,11 @@ def self.mapper() class_name: 'RestorableDroppedDatabaseListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'RestorableDroppedDatabaseElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/restore_point.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/restore_point.rb index a2257c007f..8df0045809 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/restore_point.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/restore_point.rb @@ -31,7 +31,6 @@ class RestorePoint < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RestorePoint', type: { @@ -39,7 +38,6 @@ def self.mapper() class_name: 'RestorePoint', 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() } }, restore_point_type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.restorePointType', @@ -76,7 +71,6 @@ def self.mapper() } }, restore_point_creation_date: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.restorePointCreationDate', @@ -85,7 +79,6 @@ def self.mapper() } }, earliest_restore_date: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.earliestRestoreDate', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/restore_point_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/restore_point_list_result.rb index edb03aebcd..a0aec88883 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/restore_point_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/restore_point_list_result.rb @@ -22,7 +22,6 @@ class RestorePointListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RestorePointListResult', type: { @@ -30,13 +29,11 @@ def self.mapper() class_name: 'RestorePointListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'RestorePointElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server.rb index 1a802d98cd..79d467841f 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server.rb @@ -54,7 +54,6 @@ class Server < TrackedResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Server', type: { @@ -62,7 +61,6 @@ def self.mapper() class_name: 'Server', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -71,7 +69,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -80,7 +77,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -88,14 +84,19 @@ def self.mapper() name: 'String' } }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, tags: { - client_side_validation: true, required: false, serialized_name: 'tags', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -104,16 +105,7 @@ def self.mapper() } } }, - location: { - client_side_validation: true, - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, kind: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'kind', @@ -122,7 +114,6 @@ def self.mapper() } }, fully_qualified_domain_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.fullyQualifiedDomainName', @@ -131,7 +122,6 @@ def self.mapper() } }, version: { - client_side_validation: true, required: false, serialized_name: 'properties.version', type: { @@ -139,7 +129,6 @@ def self.mapper() } }, administrator_login: { - client_side_validation: true, required: false, serialized_name: 'properties.administratorLogin', type: { @@ -147,7 +136,6 @@ def self.mapper() } }, administrator_login_password: { - client_side_validation: true, required: false, serialized_name: 'properties.administratorLoginPassword', type: { @@ -155,7 +143,6 @@ def self.mapper() } }, external_administrator_sid: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.externalAdministratorSid', @@ -164,7 +151,6 @@ def self.mapper() } }, external_administrator_login: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.externalAdministratorLogin', @@ -173,7 +159,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.state', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_administrator_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_administrator_list_result.rb index cdced4e8c1..8a1f97d5f0 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_administrator_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_administrator_list_result.rb @@ -23,7 +23,6 @@ class ServerAdministratorListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServerAdministratorListResult', type: { @@ -31,13 +30,11 @@ def self.mapper() class_name: 'ServerAdministratorListResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ServerAzureADAdministratorElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_azure_adadministrator.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_azure_adadministrator.rb index 26b288579a..f8563e8402 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_azure_adadministrator.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_azure_adadministrator.rb @@ -32,7 +32,6 @@ class ServerAzureADAdministrator < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServerAzureADAdministrator', type: { @@ -40,7 +39,6 @@ def self.mapper() class_name: 'ServerAzureADAdministrator', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -49,7 +47,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -58,7 +55,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -67,7 +63,6 @@ def self.mapper() } }, administrator_type: { - client_side_validation: true, required: true, is_constant: true, serialized_name: 'properties.administratorType', @@ -77,7 +72,6 @@ def self.mapper() } }, login: { - client_side_validation: true, required: true, serialized_name: 'properties.login', type: { @@ -85,7 +79,6 @@ def self.mapper() } }, sid: { - client_side_validation: true, required: true, serialized_name: 'properties.sid', type: { @@ -93,7 +86,6 @@ def self.mapper() } }, tenant_id: { - client_side_validation: true, required: true, serialized_name: 'properties.tenantId', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_communication_link.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_communication_link.rb index aa721d20b7..e6f03bc16a 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_communication_link.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_communication_link.rb @@ -32,7 +32,6 @@ class ServerCommunicationLink < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServerCommunicationLink', type: { @@ -40,7 +39,6 @@ def self.mapper() class_name: 'ServerCommunicationLink', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -49,7 +47,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -58,7 +55,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -67,7 +63,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.state', @@ -76,7 +71,6 @@ def self.mapper() } }, partner_server: { - client_side_validation: true, required: true, serialized_name: 'properties.partnerServer', type: { @@ -84,7 +78,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'location', @@ -93,7 +86,6 @@ def self.mapper() } }, kind: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'kind', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_communication_link_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_communication_link_list_result.rb index 5af9609eff..83e4153e9c 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_communication_link_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_communication_link_list_result.rb @@ -23,7 +23,6 @@ class ServerCommunicationLinkListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServerCommunicationLinkListResult', type: { @@ -31,13 +30,11 @@ def self.mapper() class_name: 'ServerCommunicationLinkListResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ServerCommunicationLinkElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_connection_policy.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_connection_policy.rb index 6a6ff5086f..ef412d1907 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_connection_policy.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_connection_policy.rb @@ -29,7 +29,6 @@ class ServerConnectionPolicy < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServerConnectionPolicy', type: { @@ -37,7 +36,6 @@ def self.mapper() class_name: 'ServerConnectionPolicy', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -46,7 +44,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -55,7 +52,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -64,7 +60,6 @@ def self.mapper() } }, kind: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'kind', @@ -73,7 +68,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'location', @@ -82,7 +76,6 @@ def self.mapper() } }, connection_type: { - client_side_validation: true, required: true, serialized_name: 'properties.connectionType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_list_result.rb index e3bfb05ac9..8dab186990 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_list_result.rb @@ -22,7 +22,6 @@ class ServerListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServerListResult', type: { @@ -30,13 +29,11 @@ def self.mapper() class_name: 'ServerListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ServerElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_table_auditing_policy.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_table_auditing_policy.rb index c4c66bb128..2899879a75 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_table_auditing_policy.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_table_auditing_policy.rb @@ -58,7 +58,6 @@ class ServerTableAuditingPolicy < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServerTableAuditingPolicy', type: { @@ -66,7 +65,6 @@ def self.mapper() class_name: 'ServerTableAuditingPolicy', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -75,7 +73,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -84,7 +81,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -93,7 +89,6 @@ def self.mapper() } }, kind: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'kind', @@ -102,7 +97,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'location', @@ -111,7 +105,6 @@ def self.mapper() } }, auditing_state: { - client_side_validation: true, required: false, serialized_name: 'properties.auditingState', type: { @@ -119,7 +112,6 @@ def self.mapper() } }, audit_logs_table_name: { - client_side_validation: true, required: false, serialized_name: 'properties.auditLogsTableName', type: { @@ -127,7 +119,6 @@ def self.mapper() } }, event_types_to_audit: { - client_side_validation: true, required: false, serialized_name: 'properties.eventTypesToAudit', type: { @@ -135,7 +126,6 @@ def self.mapper() } }, full_audit_logs_table_name: { - client_side_validation: true, required: false, serialized_name: 'properties.fullAuditLogsTableName', type: { @@ -143,7 +133,6 @@ def self.mapper() } }, retention_days: { - client_side_validation: true, required: false, serialized_name: 'properties.retentionDays', type: { @@ -151,7 +140,6 @@ def self.mapper() } }, storage_account_key: { - client_side_validation: true, required: false, serialized_name: 'properties.storageAccountKey', type: { @@ -159,7 +147,6 @@ def self.mapper() } }, storage_account_name: { - client_side_validation: true, required: false, serialized_name: 'properties.storageAccountName', type: { @@ -167,7 +154,6 @@ def self.mapper() } }, storage_account_resource_group_name: { - client_side_validation: true, required: false, serialized_name: 'properties.storageAccountResourceGroupName', type: { @@ -175,7 +161,6 @@ def self.mapper() } }, storage_account_secondary_key: { - client_side_validation: true, required: false, serialized_name: 'properties.storageAccountSecondaryKey', type: { @@ -183,7 +168,6 @@ def self.mapper() } }, storage_account_subscription_id: { - client_side_validation: true, required: false, serialized_name: 'properties.storageAccountSubscriptionId', type: { @@ -191,7 +175,6 @@ def self.mapper() } }, storage_table_endpoint: { - client_side_validation: true, required: false, serialized_name: 'properties.storageTableEndpoint', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_table_auditing_policy_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_table_auditing_policy_list_result.rb index f21d853886..89299b3e48 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_table_auditing_policy_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_table_auditing_policy_list_result.rb @@ -23,7 +23,6 @@ class ServerTableAuditingPolicyListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServerTableAuditingPolicyListResult', type: { @@ -31,13 +30,11 @@ def self.mapper() class_name: 'ServerTableAuditingPolicyListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ServerTableAuditingPolicyElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_update.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_update.rb index 3061fd4240..666d717a1f 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_update.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_update.rb @@ -53,7 +53,6 @@ class ServerUpdate < Resource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServerUpdate', type: { @@ -61,7 +60,6 @@ def self.mapper() class_name: 'ServerUpdate', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -70,7 +68,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -79,7 +76,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -88,13 +84,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: { @@ -104,7 +98,6 @@ def self.mapper() } }, fully_qualified_domain_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.fullyQualifiedDomainName', @@ -113,7 +106,6 @@ def self.mapper() } }, version: { - client_side_validation: true, required: false, serialized_name: 'properties.version', type: { @@ -121,7 +113,6 @@ def self.mapper() } }, administrator_login: { - client_side_validation: true, required: false, serialized_name: 'properties.administratorLogin', type: { @@ -129,7 +120,6 @@ def self.mapper() } }, administrator_login_password: { - client_side_validation: true, required: false, serialized_name: 'properties.administratorLoginPassword', type: { @@ -137,7 +127,6 @@ def self.mapper() } }, external_administrator_sid: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.externalAdministratorSid', @@ -146,7 +135,6 @@ def self.mapper() } }, external_administrator_login: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.externalAdministratorLogin', @@ -155,7 +143,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.state', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_usage.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_usage.rb index c3847486d8..7ccc5f8861 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_usage.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_usage.rb @@ -40,7 +40,6 @@ class ServerUsage # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServerUsage', type: { @@ -48,7 +47,6 @@ def self.mapper() class_name: 'ServerUsage', model_properties: { name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -57,7 +55,6 @@ def self.mapper() } }, resource_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'resourceName', @@ -66,7 +63,6 @@ def self.mapper() } }, display_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'displayName', @@ -75,7 +71,6 @@ def self.mapper() } }, current_value: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'currentValue', @@ -84,7 +79,6 @@ def self.mapper() } }, limit: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'limit', @@ -93,7 +87,6 @@ def self.mapper() } }, unit: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'unit', @@ -102,7 +95,6 @@ def self.mapper() } }, next_reset_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'nextResetTime', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_usage_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_usage_list_result.rb index a071be3cc6..ce8053e410 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_usage_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_usage_list_result.rb @@ -22,7 +22,6 @@ class ServerUsageListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServerUsageListResult', type: { @@ -30,13 +29,11 @@ def self.mapper() class_name: 'ServerUsageListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ServerUsageElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_version_capability.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_version_capability.rb index 0786d8ed23..7582b6fcfc 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_version_capability.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/server_version_capability.rb @@ -34,7 +34,6 @@ class ServerVersionCapability # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServerVersionCapability', type: { @@ -42,7 +41,6 @@ def self.mapper() class_name: 'ServerVersionCapability', model_properties: { name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -51,7 +49,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'status', @@ -61,14 +58,12 @@ def self.mapper() } }, supported_editions: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'supportedEditions', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'EditionCapabilityElementType', type: { @@ -79,14 +74,12 @@ def self.mapper() } }, supported_elastic_pool_editions: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'supportedElasticPoolEditions', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ElasticPoolEditionCapabilityElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/service_objective.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/service_objective.rb index 8680b7464d..89b19239cb 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/service_objective.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/service_objective.rb @@ -36,7 +36,6 @@ class ServiceObjective < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServiceObjective', type: { @@ -44,7 +43,6 @@ def self.mapper() class_name: 'ServiceObjective', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -53,7 +51,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -62,7 +59,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -71,7 +67,6 @@ def self.mapper() } }, service_objective_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.serviceObjectiveName', @@ -80,7 +75,6 @@ def self.mapper() } }, is_default: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.isDefault', @@ -89,7 +83,6 @@ def self.mapper() } }, is_system: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.isSystem', @@ -98,7 +91,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.description', @@ -107,7 +99,6 @@ def self.mapper() } }, enabled: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.enabled', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/service_objective_capability.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/service_objective_capability.rb index 4664abcc48..6731c7adbe 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/service_objective_capability.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/service_objective_capability.rb @@ -44,7 +44,6 @@ class ServiceObjectiveCapability # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServiceObjectiveCapability', type: { @@ -52,7 +51,6 @@ def self.mapper() class_name: 'ServiceObjectiveCapability', model_properties: { name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -61,7 +59,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'status', @@ -71,7 +68,6 @@ def self.mapper() } }, unit: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'performanceLevel.unit', @@ -81,7 +77,6 @@ def self.mapper() } }, value: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'performanceLevel.value', @@ -90,7 +85,6 @@ def self.mapper() } }, id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -99,14 +93,12 @@ def self.mapper() } }, supported_max_sizes: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'supportedMaxSizes', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'MaxSizeCapabilityElementType', type: { @@ -117,7 +109,6 @@ def self.mapper() } }, included_max_size: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'includedMaxSize', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/service_objective_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/service_objective_list_result.rb index f50550f390..b03abd83c0 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/service_objective_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/service_objective_list_result.rb @@ -23,7 +23,6 @@ class ServiceObjectiveListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServiceObjectiveListResult', type: { @@ -31,13 +30,11 @@ def self.mapper() class_name: 'ServiceObjectiveListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ServiceObjectiveElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/service_tier_advisor.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/service_tier_advisor.rb index e3d30f99cd..3c073b4c43 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/service_tier_advisor.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/service_tier_advisor.rb @@ -91,7 +91,6 @@ class ServiceTierAdvisor < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServiceTierAdvisor', type: { @@ -99,7 +98,6 @@ def self.mapper() class_name: 'ServiceTierAdvisor', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -108,7 +106,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -117,7 +114,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -126,7 +122,6 @@ def self.mapper() } }, observation_period_start: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.observationPeriodStart', @@ -135,7 +130,6 @@ def self.mapper() } }, observation_period_end: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.observationPeriodEnd', @@ -144,7 +138,6 @@ def self.mapper() } }, active_time_ratio: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.activeTimeRatio', @@ -153,7 +146,6 @@ def self.mapper() } }, min_dtu: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.minDtu', @@ -162,7 +154,6 @@ def self.mapper() } }, avg_dtu: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.avgDtu', @@ -171,7 +162,6 @@ def self.mapper() } }, max_dtu: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.maxDtu', @@ -180,7 +170,6 @@ def self.mapper() } }, max_size_in_gb: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.maxSizeInGB', @@ -189,14 +178,12 @@ def self.mapper() } }, service_level_objective_usage_metrics: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.serviceLevelObjectiveUsageMetrics', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'SloUsageMetricElementType', type: { @@ -207,7 +194,6 @@ def self.mapper() } }, current_service_level_objective: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.currentServiceLevelObjective', @@ -216,7 +202,6 @@ def self.mapper() } }, current_service_level_objective_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.currentServiceLevelObjectiveId', @@ -225,7 +210,6 @@ def self.mapper() } }, usage_based_recommendation_service_level_objective: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.usageBasedRecommendationServiceLevelObjective', @@ -234,7 +218,6 @@ def self.mapper() } }, usage_based_recommendation_service_level_objective_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.usageBasedRecommendationServiceLevelObjectiveId', @@ -243,7 +226,6 @@ def self.mapper() } }, database_size_based_recommendation_service_level_objective: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.databaseSizeBasedRecommendationServiceLevelObjective', @@ -252,7 +234,6 @@ def self.mapper() } }, database_size_based_recommendation_service_level_objective_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.databaseSizeBasedRecommendationServiceLevelObjectiveId', @@ -261,7 +242,6 @@ def self.mapper() } }, disaster_plan_based_recommendation_service_level_objective: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.disasterPlanBasedRecommendationServiceLevelObjective', @@ -270,7 +250,6 @@ def self.mapper() } }, disaster_plan_based_recommendation_service_level_objective_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.disasterPlanBasedRecommendationServiceLevelObjectiveId', @@ -279,7 +258,6 @@ def self.mapper() } }, overall_recommendation_service_level_objective: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.overallRecommendationServiceLevelObjective', @@ -288,7 +266,6 @@ def self.mapper() } }, overall_recommendation_service_level_objective_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.overallRecommendationServiceLevelObjectiveId', @@ -297,7 +274,6 @@ def self.mapper() } }, confidence: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.confidence', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/service_tier_advisor_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/service_tier_advisor_list_result.rb index 9d5d2f7406..7418a98df4 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/service_tier_advisor_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/service_tier_advisor_list_result.rb @@ -23,7 +23,6 @@ class ServiceTierAdvisorListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServiceTierAdvisorListResult', type: { @@ -31,13 +30,11 @@ def self.mapper() class_name: 'ServiceTierAdvisorListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ServiceTierAdvisorElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/slo_usage_metric.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/slo_usage_metric.rb index dc2de4fedd..e55fc618bf 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/slo_usage_metric.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/slo_usage_metric.rb @@ -38,7 +38,6 @@ class SloUsageMetric # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SloUsageMetric', type: { @@ -46,7 +45,6 @@ def self.mapper() class_name: 'SloUsageMetric', model_properties: { service_level_objective: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'serviceLevelObjective', @@ -55,7 +53,6 @@ def self.mapper() } }, service_level_objective_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'serviceLevelObjectiveId', @@ -64,7 +61,6 @@ def self.mapper() } }, in_range_time_ratio: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'inRangeTimeRatio', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/table_auditing_policy_properties.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/table_auditing_policy_properties.rb index dc4e0e6232..e5fa5f602d 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/table_auditing_policy_properties.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/table_auditing_policy_properties.rb @@ -52,7 +52,6 @@ class TableAuditingPolicyProperties # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'TableAuditingPolicyProperties', type: { @@ -60,7 +59,6 @@ def self.mapper() class_name: 'TableAuditingPolicyProperties', model_properties: { auditing_state: { - client_side_validation: true, required: false, serialized_name: 'auditingState', type: { @@ -68,7 +66,6 @@ def self.mapper() } }, audit_logs_table_name: { - client_side_validation: true, required: false, serialized_name: 'auditLogsTableName', type: { @@ -76,7 +73,6 @@ def self.mapper() } }, event_types_to_audit: { - client_side_validation: true, required: false, serialized_name: 'eventTypesToAudit', type: { @@ -84,7 +80,6 @@ def self.mapper() } }, full_audit_logs_table_name: { - client_side_validation: true, required: false, serialized_name: 'fullAuditLogsTableName', type: { @@ -92,7 +87,6 @@ def self.mapper() } }, retention_days: { - client_side_validation: true, required: false, serialized_name: 'retentionDays', type: { @@ -100,7 +94,6 @@ def self.mapper() } }, storage_account_key: { - client_side_validation: true, required: false, serialized_name: 'storageAccountKey', type: { @@ -108,7 +101,6 @@ def self.mapper() } }, storage_account_name: { - client_side_validation: true, required: false, serialized_name: 'storageAccountName', type: { @@ -116,7 +108,6 @@ def self.mapper() } }, storage_account_resource_group_name: { - client_side_validation: true, required: false, serialized_name: 'storageAccountResourceGroupName', type: { @@ -124,7 +115,6 @@ def self.mapper() } }, storage_account_secondary_key: { - client_side_validation: true, required: false, serialized_name: 'storageAccountSecondaryKey', type: { @@ -132,7 +122,6 @@ def self.mapper() } }, storage_account_subscription_id: { - client_side_validation: true, required: false, serialized_name: 'storageAccountSubscriptionId', type: { @@ -140,7 +129,6 @@ def self.mapper() } }, storage_table_endpoint: { - client_side_validation: true, required: false, serialized_name: 'storageTableEndpoint', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/top_queries.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/top_queries.rb index 9bef2f2d3d..fef707e2c1 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/top_queries.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/top_queries.rb @@ -52,7 +52,6 @@ class TopQueries # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'TopQueries', type: { @@ -60,7 +59,6 @@ def self.mapper() class_name: 'TopQueries', model_properties: { aggregation_function: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'aggregationFunction', @@ -70,7 +68,6 @@ def self.mapper() } }, execution_type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'executionType', @@ -80,7 +77,6 @@ def self.mapper() } }, interval_type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'intervalType', @@ -89,7 +85,6 @@ def self.mapper() } }, number_of_top_queries: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'numberOfTopQueries', @@ -98,7 +93,6 @@ def self.mapper() } }, observation_start_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'observationStartTime', @@ -107,7 +101,6 @@ def self.mapper() } }, observation_end_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'observationEndTime', @@ -116,7 +109,6 @@ def self.mapper() } }, observed_metric: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'observedMetric', @@ -126,14 +118,12 @@ def self.mapper() } }, queries: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'queries', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'QueryStatisticElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/top_queries_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/top_queries_list_result.rb index c7f80955e6..5f0036cf93 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/top_queries_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/top_queries_list_result.rb @@ -22,7 +22,6 @@ class TopQueriesListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'TopQueriesListResult', type: { @@ -30,13 +29,11 @@ def self.mapper() class_name: 'TopQueriesListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'TopQueriesElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/tracked_resource.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/tracked_resource.rb index 0edd186b7c..08c4ca94f3 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/tracked_resource.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/tracked_resource.rb @@ -12,12 +12,12 @@ class TrackedResource < Resource include MsRestAzure - # @return [Hash{String => String}] Resource tags. - attr_accessor :tags - # @return [String] Resource location. attr_accessor :location + # @return [Hash{String => String}] Resource tags. + attr_accessor :tags + # # Mapper for TrackedResource class as Ruby Hash. @@ -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', @@ -59,14 +55,19 @@ def self.mapper() name: 'String' } }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, tags: { - client_side_validation: true, required: false, serialized_name: 'tags', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -74,14 +75,6 @@ def self.mapper() } } } - }, - location: { - client_side_validation: true, - required: true, - serialized_name: 'location', - type: { - name: 'String' - } } } } diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption.rb index bac2121464..b50c081d08 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption.rb @@ -27,7 +27,6 @@ class TransparentDataEncryption < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'TransparentDataEncryption', type: { @@ -35,7 +34,6 @@ def self.mapper() class_name: 'TransparentDataEncryption', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -44,7 +42,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -53,7 +50,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -62,7 +58,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'location', @@ -71,7 +66,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, serialized_name: 'properties.status', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption_activity.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption_activity.rb index da85b0bcf5..bcec04afaf 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption_activity.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption_activity.rb @@ -30,7 +30,6 @@ class TransparentDataEncryptionActivity < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'TransparentDataEncryptionActivity', type: { @@ -38,7 +37,6 @@ def self.mapper() class_name: 'TransparentDataEncryptionActivity', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -47,7 +45,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -56,7 +53,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -65,7 +61,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'location', @@ -74,7 +69,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.status', @@ -83,7 +77,6 @@ def self.mapper() } }, percent_complete: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.percentComplete', diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption_activity_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption_activity_list_result.rb index ece01ffc75..f0f91b6d6b 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption_activity_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption_activity_list_result.rb @@ -25,7 +25,6 @@ class TransparentDataEncryptionActivityListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'TransparentDataEncryptionActivityListResult', type: { @@ -33,13 +32,11 @@ def self.mapper() class_name: 'TransparentDataEncryptionActivityListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'TransparentDataEncryptionActivityElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption_list_result.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption_list_result.rb index 92f8a83750..8921afc6aa 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption_list_result.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/models/transparent_data_encryption_list_result.rb @@ -24,7 +24,6 @@ class TransparentDataEncryptionListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'TransparentDataEncryptionListResult', type: { @@ -32,13 +31,11 @@ def self.mapper() class_name: 'TransparentDataEncryptionListResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'TransparentDataEncryptionElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/operations.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/operations.rb index 6840be6885..021e1a8029 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/operations.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/operations.rb @@ -32,8 +32,8 @@ def initialize(client) # # @return [OperationListResult] operation results. # - def list(custom_headers:nil) - response = list_async(custom_headers:custom_headers).value! + def list(custom_headers = nil) + response = list_async(custom_headers).value! response.body unless response.nil? end @@ -45,8 +45,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 # @@ -57,12 +57,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 diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/queries.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/queries.rb index 026ad613fc..de6f8db53c 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/queries.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/queries.rb @@ -37,8 +37,8 @@ def initialize(client) # # @return [TopQueriesListResult] operation results. # - def list_by_database(resource_group_name, server_name, database_name, custom_headers:nil) - response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -55,8 +55,8 @@ def list_by_database(resource_group_name, server_name, database_name, custom_hea # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -72,7 +72,7 @@ def list_by_database_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_database_async(resource_group_name, server_name, database_name, custom_headers:nil) + def list_by_database_async(resource_group_name, server_name, database_name, 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? @@ -81,7 +81,6 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/query_statistics.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/query_statistics.rb index 5a231025e6..7580909ba2 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/query_statistics.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/query_statistics.rb @@ -38,8 +38,8 @@ def initialize(client) # # @return [QueryStatisticListResult] operation results. # - def list_by_query(resource_group_name, server_name, database_name, query_id, custom_headers:nil) - response = list_by_query_async(resource_group_name, server_name, database_name, query_id, custom_headers:custom_headers).value! + def list_by_query(resource_group_name, server_name, database_name, query_id, custom_headers = nil) + response = list_by_query_async(resource_group_name, server_name, database_name, query_id, custom_headers).value! response.body unless response.nil? end @@ -57,8 +57,8 @@ def list_by_query(resource_group_name, server_name, database_name, query_id, cus # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_query_with_http_info(resource_group_name, server_name, database_name, query_id, custom_headers:nil) - list_by_query_async(resource_group_name, server_name, database_name, query_id, custom_headers:custom_headers).value! + def list_by_query_with_http_info(resource_group_name, server_name, database_name, query_id, custom_headers = nil) + list_by_query_async(resource_group_name, server_name, database_name, query_id, custom_headers).value! end # @@ -75,7 +75,7 @@ def list_by_query_with_http_info(resource_group_name, server_name, database_name # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_query_async(resource_group_name, server_name, database_name, query_id, custom_headers:nil) + def list_by_query_async(resource_group_name, server_name, database_name, query_id, 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? @@ -85,7 +85,6 @@ def list_by_query_async(resource_group_name, server_name, database_name, query_i request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/query_texts.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/query_texts.rb index 82b9acb2f5..19283c7f4b 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/query_texts.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/query_texts.rb @@ -38,8 +38,8 @@ def initialize(client) # # @return [QueryTextListResult] operation results. # - def list_by_query(resource_group_name, server_name, database_name, query_id, custom_headers:nil) - response = list_by_query_async(resource_group_name, server_name, database_name, query_id, custom_headers:custom_headers).value! + def list_by_query(resource_group_name, server_name, database_name, query_id, custom_headers = nil) + response = list_by_query_async(resource_group_name, server_name, database_name, query_id, custom_headers).value! response.body unless response.nil? end @@ -57,8 +57,8 @@ def list_by_query(resource_group_name, server_name, database_name, query_id, cus # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_query_with_http_info(resource_group_name, server_name, database_name, query_id, custom_headers:nil) - list_by_query_async(resource_group_name, server_name, database_name, query_id, custom_headers:custom_headers).value! + def list_by_query_with_http_info(resource_group_name, server_name, database_name, query_id, custom_headers = nil) + list_by_query_async(resource_group_name, server_name, database_name, query_id, custom_headers).value! end # @@ -75,7 +75,7 @@ def list_by_query_with_http_info(resource_group_name, server_name, database_name # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_query_async(resource_group_name, server_name, database_name, query_id, custom_headers:nil) + def list_by_query_async(resource_group_name, server_name, database_name, query_id, 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? @@ -85,7 +85,6 @@ def list_by_query_async(resource_group_name, server_name, database_name, query_i request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/recommended_elastic_pools.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/recommended_elastic_pools.rb index 723786de22..89b9dfc990 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/recommended_elastic_pools.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/recommended_elastic_pools.rb @@ -38,8 +38,8 @@ def initialize(client) # # @return [RecommendedElasticPool] operation results. # - def get(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers).value! response.body unless response.nil? end @@ -57,8 +57,8 @@ def get(resource_group_name, server_name, recommended_elastic_pool_name, custom_ # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers:nil) - get_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers = nil) + get_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers).value! end # @@ -75,7 +75,7 @@ def get_with_http_info(resource_group_name, server_name, recommended_elastic_poo # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers:nil) + def get_async(resource_group_name, server_name, recommended_elastic_pool_name, 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? @@ -84,7 +84,6 @@ def get_async(resource_group_name, server_name, recommended_elastic_pool_name, c request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -141,8 +140,8 @@ def get_async(resource_group_name, server_name, recommended_elastic_pool_name, c # # @return [RecommendedElasticPoolListResult] operation results. # - def list_by_server(resource_group_name, server_name, custom_headers:nil) - response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -158,8 +157,8 @@ def list_by_server(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil) - list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! end # @@ -174,7 +173,7 @@ def list_by_server_with_http_info(resource_group_name, server_name, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_async(resource_group_name, server_name, custom_headers:nil) + def list_by_server_async(resource_group_name, server_name, 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? @@ -182,7 +181,6 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -241,8 +239,8 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) # # @return [RecommendedElasticPoolListMetricsResult] operation results. # - def list_metrics(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers:nil) - response = list_metrics_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers:custom_headers).value! + def list_metrics(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers = nil) + response = list_metrics_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers).value! response.body unless response.nil? end @@ -260,8 +258,8 @@ def list_metrics(resource_group_name, server_name, recommended_elastic_pool_name # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_metrics_with_http_info(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers:nil) - list_metrics_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers:custom_headers).value! + def list_metrics_with_http_info(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers = nil) + list_metrics_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers).value! end # @@ -278,7 +276,7 @@ def list_metrics_with_http_info(resource_group_name, server_name, recommended_el # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_metrics_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers:nil) + def list_metrics_async(resource_group_name, server_name, recommended_elastic_pool_name, 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? @@ -287,7 +285,6 @@ def list_metrics_async(resource_group_name, server_name, recommended_elastic_poo request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/recoverable_databases.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/recoverable_databases.rb index 0a6744982a..8be0da1699 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/recoverable_databases.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/recoverable_databases.rb @@ -38,8 +38,8 @@ def initialize(client) # # @return [RecoverableDatabase] operation results. # - def get(resource_group_name, server_name, database_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, database_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -57,8 +57,8 @@ def get(resource_group_name, server_name, database_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -75,7 +75,7 @@ def get_with_http_info(resource_group_name, server_name, database_name, custom_h # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, database_name, custom_headers:nil) + def get_async(resource_group_name, server_name, database_name, 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? @@ -84,7 +84,6 @@ def get_async(resource_group_name, server_name, database_name, custom_headers:ni request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -141,8 +140,8 @@ def get_async(resource_group_name, server_name, database_name, custom_headers:ni # # @return [RecoverableDatabaseListResult] operation results. # - def list_by_server(resource_group_name, server_name, custom_headers:nil) - response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -158,8 +157,8 @@ def list_by_server(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil) - list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! end # @@ -174,7 +173,7 @@ def list_by_server_with_http_info(resource_group_name, server_name, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_async(resource_group_name, server_name, custom_headers:nil) + def list_by_server_async(resource_group_name, server_name, 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? @@ -182,7 +181,6 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/replication_links.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/replication_links.rb index cd1d45d109..6bbab753d7 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/replication_links.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/replication_links.rb @@ -38,8 +38,8 @@ def initialize(client) # will be added to the HTTP request. # # - def delete(resource_group_name, server_name, database_name, link_id, custom_headers:nil) - response = delete_async(resource_group_name, server_name, database_name, link_id, custom_headers:custom_headers).value! + def delete(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + response = delete_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! nil end @@ -58,8 +58,8 @@ def delete(resource_group_name, server_name, database_name, link_id, custom_head # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, server_name, database_name, link_id, custom_headers:nil) - delete_async(resource_group_name, server_name, database_name, link_id, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + delete_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! end # @@ -77,7 +77,7 @@ def delete_with_http_info(resource_group_name, server_name, database_name, link_ # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, server_name, database_name, link_id, custom_headers:nil) + def delete_async(resource_group_name, server_name, database_name, link_id, 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? @@ -87,7 +87,6 @@ def delete_async(resource_group_name, server_name, database_name, link_id, custo request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -136,8 +135,8 @@ def delete_async(resource_group_name, server_name, database_name, link_id, custo # # @return [ReplicationLink] operation results. # - def get(resource_group_name, server_name, database_name, link_id, custom_headers:nil) - response = get_async(resource_group_name, server_name, database_name, link_id, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! response.body unless response.nil? end @@ -155,8 +154,8 @@ def get(resource_group_name, server_name, database_name, link_id, custom_headers # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, database_name, link_id, custom_headers:nil) - get_async(resource_group_name, server_name, database_name, link_id, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! end # @@ -173,7 +172,7 @@ def get_with_http_info(resource_group_name, server_name, database_name, link_id, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, database_name, link_id, custom_headers:nil) + def get_async(resource_group_name, server_name, database_name, link_id, 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? @@ -183,7 +182,6 @@ def get_async(resource_group_name, server_name, database_name, link_id, custom_h request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -242,8 +240,8 @@ def get_async(resource_group_name, server_name, database_name, link_id, custom_h # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - def failover(resource_group_name, server_name, database_name, link_id, custom_headers:nil) - response = failover_async(resource_group_name, server_name, database_name, link_id, custom_headers:custom_headers).value! + def failover(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + response = failover_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! nil end @@ -261,9 +259,9 @@ def failover(resource_group_name, server_name, database_name, link_id, custom_he # @return [Concurrent::Promise] promise which provides async access to http # response. # - def failover_async(resource_group_name, server_name, database_name, link_id, custom_headers:nil) + def failover_async(resource_group_name, server_name, database_name, link_id, custom_headers = nil) # Send request - promise = begin_failover_async(resource_group_name, server_name, database_name, link_id, custom_headers:custom_headers) + promise = begin_failover_async(resource_group_name, server_name, database_name, link_id, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -291,8 +289,8 @@ def failover_async(resource_group_name, server_name, database_name, link_id, cus # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - def failover_allow_data_loss(resource_group_name, server_name, database_name, link_id, custom_headers:nil) - response = failover_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers:custom_headers).value! + def failover_allow_data_loss(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + response = failover_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! nil end @@ -310,9 +308,9 @@ def failover_allow_data_loss(resource_group_name, server_name, database_name, li # @return [Concurrent::Promise] promise which provides async access to http # response. # - def failover_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers:nil) + def failover_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers = nil) # Send request - promise = begin_failover_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers:custom_headers) + promise = begin_failover_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -339,8 +337,8 @@ def failover_allow_data_loss_async(resource_group_name, server_name, database_na # # @return [ReplicationLinkListResult] operation results. # - def list_by_database(resource_group_name, server_name, database_name, custom_headers:nil) - response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -357,8 +355,8 @@ def list_by_database(resource_group_name, server_name, database_name, custom_hea # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -374,7 +372,7 @@ def list_by_database_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_database_async(resource_group_name, server_name, database_name, custom_headers:nil) + def list_by_database_async(resource_group_name, server_name, database_name, 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? @@ -383,7 +381,6 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -443,8 +440,8 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust # will be added to the HTTP request. # # - def begin_failover(resource_group_name, server_name, database_name, link_id, custom_headers:nil) - response = begin_failover_async(resource_group_name, server_name, database_name, link_id, custom_headers:custom_headers).value! + def begin_failover(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + response = begin_failover_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! nil end @@ -464,8 +461,8 @@ def begin_failover(resource_group_name, server_name, database_name, link_id, cus # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_failover_with_http_info(resource_group_name, server_name, database_name, link_id, custom_headers:nil) - begin_failover_async(resource_group_name, server_name, database_name, link_id, custom_headers:custom_headers).value! + def begin_failover_with_http_info(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + begin_failover_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! end # @@ -484,7 +481,7 @@ def begin_failover_with_http_info(resource_group_name, server_name, database_nam # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_failover_async(resource_group_name, server_name, database_name, link_id, custom_headers:nil) + def begin_failover_async(resource_group_name, server_name, database_name, link_id, 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? @@ -494,7 +491,6 @@ def begin_failover_async(resource_group_name, server_name, database_name, link_i request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -544,8 +540,8 @@ def begin_failover_async(resource_group_name, server_name, database_name, link_i # will be added to the HTTP request. # # - def begin_failover_allow_data_loss(resource_group_name, server_name, database_name, link_id, custom_headers:nil) - response = begin_failover_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers:custom_headers).value! + def begin_failover_allow_data_loss(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + response = begin_failover_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! nil end @@ -565,8 +561,8 @@ def begin_failover_allow_data_loss(resource_group_name, server_name, database_na # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_failover_allow_data_loss_with_http_info(resource_group_name, server_name, database_name, link_id, custom_headers:nil) - begin_failover_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers:custom_headers).value! + def begin_failover_allow_data_loss_with_http_info(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + begin_failover_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! end # @@ -585,7 +581,7 @@ def begin_failover_allow_data_loss_with_http_info(resource_group_name, server_na # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_failover_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers:nil) + def begin_failover_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, 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? @@ -595,7 +591,6 @@ def begin_failover_allow_data_loss_async(resource_group_name, server_name, datab request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/restorable_dropped_databases.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/restorable_dropped_databases.rb index 64f24b2362..3085e3282c 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/restorable_dropped_databases.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/restorable_dropped_databases.rb @@ -38,8 +38,8 @@ def initialize(client) # # @return [RestorableDroppedDatabase] operation results. # - def get(resource_group_name, server_name, restorable_droppeded_database_id, custom_headers:nil) - response = get_async(resource_group_name, server_name, restorable_droppeded_database_id, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, restorable_droppeded_database_id, custom_headers = nil) + response = get_async(resource_group_name, server_name, restorable_droppeded_database_id, custom_headers).value! response.body unless response.nil? end @@ -57,8 +57,8 @@ def get(resource_group_name, server_name, restorable_droppeded_database_id, cust # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, restorable_droppeded_database_id, custom_headers:nil) - get_async(resource_group_name, server_name, restorable_droppeded_database_id, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, restorable_droppeded_database_id, custom_headers = nil) + get_async(resource_group_name, server_name, restorable_droppeded_database_id, custom_headers).value! end # @@ -75,7 +75,7 @@ def get_with_http_info(resource_group_name, server_name, restorable_droppeded_da # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, restorable_droppeded_database_id, custom_headers:nil) + def get_async(resource_group_name, server_name, restorable_droppeded_database_id, 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? @@ -84,7 +84,6 @@ def get_async(resource_group_name, server_name, restorable_droppeded_database_id request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -141,8 +140,8 @@ def get_async(resource_group_name, server_name, restorable_droppeded_database_id # # @return [RestorableDroppedDatabaseListResult] operation results. # - def list_by_server(resource_group_name, server_name, custom_headers:nil) - response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -158,8 +157,8 @@ def list_by_server(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil) - list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! end # @@ -174,7 +173,7 @@ def list_by_server_with_http_info(resource_group_name, server_name, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_async(resource_group_name, server_name, custom_headers:nil) + def list_by_server_async(resource_group_name, server_name, 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? @@ -182,7 +181,6 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/restore_points.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/restore_points.rb index 1e90fee94f..31ae5d66df 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/restore_points.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/restore_points.rb @@ -38,8 +38,8 @@ def initialize(client) # # @return [RestorePointListResult] operation results. # - def list_by_database(resource_group_name, server_name, database_name, custom_headers:nil) - response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -57,8 +57,8 @@ def list_by_database(resource_group_name, server_name, database_name, custom_hea # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -75,7 +75,7 @@ def list_by_database_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_database_async(resource_group_name, server_name, database_name, custom_headers:nil) + def list_by_database_async(resource_group_name, server_name, database_name, 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? @@ -84,7 +84,6 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_advisors.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_advisors.rb new file mode 100644 index 0000000000..0cd12cc4a5 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_advisors.rb @@ -0,0 +1,454 @@ +# 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::SQL::Mgmt::V2014_04_01 + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class ServerAdvisors + include MsRestAzure + + # + # Creates and initializes a new instance of the ServerAdvisors class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets a list of server advisors. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AdvisorListResult] operation results. + # + def list_by_server(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a list of server advisors. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @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_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! + end + + # + # Gets a list of server advisors. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @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_server_async(resource_group_name, server_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/advisors' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2014_04_01::Models::AdvisorListResult.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 server advisor. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param advisor_name [String] The name of the Server Advisor. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Advisor] operation results. + # + def get(resource_group_name, server_name, advisor_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, advisor_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a server advisor. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param advisor_name [String] The name of the Server Advisor. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, advisor_name, custom_headers = nil) + get_async(resource_group_name, server_name, advisor_name, custom_headers).value! + end + + # + # Gets a server advisor. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param advisor_name [String] The name of the Server Advisor. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, advisor_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'advisor_name is nil' if advisor_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/advisors/{advisorName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'advisorName' => advisor_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2014_04_01::Models::Advisor.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Updates a server advisor. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param advisor_name [String] The name of the Server Advisor. + # @param parameters [Advisor] The requested advisor resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Advisor] operation results. + # + def update(resource_group_name, server_name, advisor_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, server_name, advisor_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates a server advisor. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param advisor_name [String] The name of the Server Advisor. + # @param parameters [Advisor] The requested advisor resource state. + # @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 update_with_http_info(resource_group_name, server_name, advisor_name, parameters, custom_headers = nil) + update_async(resource_group_name, server_name, advisor_name, parameters, custom_headers).value! + end + + # + # Updates a server advisor. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param advisor_name [String] The name of the Server Advisor. + # @param parameters [Advisor] The requested advisor resource state. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def update_async(resource_group_name, server_name, advisor_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'advisor_name is nil' if advisor_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2014_04_01::Models::Advisor.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advisors/{advisorName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'advisorName' => advisor_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + 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::SQL::Mgmt::V2014_04_01::Models::Advisor.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates or updates a server advisor. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param advisor_name [String] The name of the Server Advisor. + # @param parameters [Advisor] The requested advisor resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Advisor] operation results. + # + def create_or_update(resource_group_name, server_name, advisor_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, advisor_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a server advisor. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param advisor_name [String] The name of the Server Advisor. + # @param parameters [Advisor] The requested advisor resource state. + # @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 create_or_update_with_http_info(resource_group_name, server_name, advisor_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, advisor_name, parameters, custom_headers).value! + end + + # + # Creates or updates a server advisor. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param advisor_name [String] The name of the Server Advisor. + # @param parameters [Advisor] The requested advisor resource state. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_async(resource_group_name, server_name, advisor_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'advisor_name is nil' if advisor_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2014_04_01::Models::Advisor.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advisors/{advisorName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'advisorName' => advisor_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + 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::SQL::Mgmt::V2014_04_01::Models::Advisor.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 + + end +end diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_azure_adadministrators.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_azure_adadministrators.rb index c0600e2172..05bead0613 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_azure_adadministrators.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_azure_adadministrators.rb @@ -39,8 +39,8 @@ def initialize(client) # # @return [ServerAzureADAdministrator] operation results. # - def create_or_update(resource_group_name, server_name, properties, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, properties, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, properties, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, properties, custom_headers).value! response.body unless response.nil? end @@ -57,9 +57,9 @@ def create_or_update(resource_group_name, server_name, properties, custom_header # @return [Concurrent::Promise] promise which provides async access to http # response. # - def create_or_update_async(resource_group_name, server_name, properties, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, properties, custom_headers = nil) # Send request - promise = begin_create_or_update_async(resource_group_name, server_name, properties, custom_headers:custom_headers) + promise = begin_create_or_update_async(resource_group_name, server_name, properties, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -87,8 +87,8 @@ def create_or_update_async(resource_group_name, server_name, properties, custom_ # # @return [ServerAzureADAdministrator] operation results. # - def delete(resource_group_name, server_name, custom_headers:nil) - response = delete_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def delete(resource_group_name, server_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -103,9 +103,9 @@ def delete(resource_group_name, server_name, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def delete_async(resource_group_name, server_name, custom_headers:nil) + def delete_async(resource_group_name, server_name, custom_headers = nil) # Send request - promise = begin_delete_async(resource_group_name, server_name, custom_headers:custom_headers) + promise = begin_delete_async(resource_group_name, server_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -133,8 +133,8 @@ def delete_async(resource_group_name, server_name, custom_headers:nil) # # @return [ServerAzureADAdministrator] operation results. # - def get(resource_group_name, server_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -150,8 +150,8 @@ def get(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, custom_headers:nil) - get_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, custom_headers = nil) + get_async(resource_group_name, server_name, custom_headers).value! end # @@ -166,7 +166,7 @@ def get_with_http_info(resource_group_name, server_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, custom_headers:nil) + def get_async(resource_group_name, server_name, 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? @@ -175,7 +175,6 @@ def get_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -232,8 +231,8 @@ def get_async(resource_group_name, server_name, custom_headers:nil) # # @return [ServerAdministratorListResult] operation results. # - def list_by_server(resource_group_name, server_name, custom_headers:nil) - response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -249,8 +248,8 @@ def list_by_server(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil) - list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! end # @@ -265,7 +264,7 @@ def list_by_server_with_http_info(resource_group_name, server_name, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_async(resource_group_name, server_name, custom_headers:nil) + def list_by_server_async(resource_group_name, server_name, 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? @@ -273,7 +272,6 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -333,8 +331,8 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) # # @return [ServerAzureADAdministrator] operation results. # - def begin_create_or_update(resource_group_name, server_name, properties, custom_headers:nil) - response = begin_create_or_update_async(resource_group_name, server_name, properties, custom_headers:custom_headers).value! + def begin_create_or_update(resource_group_name, server_name, properties, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, properties, custom_headers).value! response.body unless response.nil? end @@ -353,8 +351,8 @@ def begin_create_or_update(resource_group_name, server_name, properties, custom_ # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_create_or_update_with_http_info(resource_group_name, server_name, properties, custom_headers:nil) - begin_create_or_update_async(resource_group_name, server_name, properties, custom_headers:custom_headers).value! + def begin_create_or_update_with_http_info(resource_group_name, server_name, properties, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, properties, custom_headers).value! end # @@ -372,7 +370,7 @@ def begin_create_or_update_with_http_info(resource_group_name, server_name, prop # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_create_or_update_async(resource_group_name, server_name, properties, custom_headers:nil) + def begin_create_or_update_async(resource_group_name, server_name, properties, 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? @@ -382,12 +380,13 @@ def begin_create_or_update_async(resource_group_name, server_name, properties, c 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::SQL::Mgmt::V2014_04_01::Models::ServerAzureADAdministrator.mapper() request_content = @client.serialize(request_mapper, properties) @@ -466,8 +465,8 @@ def begin_create_or_update_async(resource_group_name, server_name, properties, c # # @return [ServerAzureADAdministrator] operation results. # - def begin_delete(resource_group_name, server_name, custom_headers:nil) - response = begin_delete_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def begin_delete(resource_group_name, server_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -483,8 +482,8 @@ def begin_delete(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_delete_with_http_info(resource_group_name, server_name, custom_headers:nil) - begin_delete_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def begin_delete_with_http_info(resource_group_name, server_name, custom_headers = nil) + begin_delete_async(resource_group_name, server_name, custom_headers).value! end # @@ -499,7 +498,7 @@ def begin_delete_with_http_info(resource_group_name, server_name, custom_headers # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_delete_async(resource_group_name, server_name, custom_headers:nil) + def begin_delete_async(resource_group_name, server_name, 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? @@ -508,7 +507,6 @@ def begin_delete_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_communication_links.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_communication_links.rb index 0858018ec0..907ba90eb5 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_communication_links.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_communication_links.rb @@ -37,8 +37,8 @@ def initialize(client) # will be added to the HTTP request. # # - def delete(resource_group_name, server_name, communication_link_name, custom_headers:nil) - response = delete_async(resource_group_name, server_name, communication_link_name, custom_headers:custom_headers).value! + def delete(resource_group_name, server_name, communication_link_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, communication_link_name, custom_headers).value! nil end @@ -56,8 +56,8 @@ def delete(resource_group_name, server_name, communication_link_name, custom_hea # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, server_name, communication_link_name, custom_headers:nil) - delete_async(resource_group_name, server_name, communication_link_name, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, server_name, communication_link_name, custom_headers = nil) + delete_async(resource_group_name, server_name, communication_link_name, custom_headers).value! end # @@ -74,7 +74,7 @@ def delete_with_http_info(resource_group_name, server_name, communication_link_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, server_name, communication_link_name, custom_headers:nil) + def delete_async(resource_group_name, server_name, communication_link_name, 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? @@ -83,7 +83,6 @@ def delete_async(resource_group_name, server_name, communication_link_name, cust request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -132,8 +131,8 @@ def delete_async(resource_group_name, server_name, communication_link_name, cust # # @return [ServerCommunicationLink] operation results. # - def get(resource_group_name, server_name, communication_link_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, communication_link_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, communication_link_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, communication_link_name, custom_headers).value! response.body unless response.nil? end @@ -151,8 +150,8 @@ def get(resource_group_name, server_name, communication_link_name, custom_header # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, communication_link_name, custom_headers:nil) - get_async(resource_group_name, server_name, communication_link_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, communication_link_name, custom_headers = nil) + get_async(resource_group_name, server_name, communication_link_name, custom_headers).value! end # @@ -169,7 +168,7 @@ def get_with_http_info(resource_group_name, server_name, communication_link_name # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, communication_link_name, custom_headers:nil) + def get_async(resource_group_name, server_name, communication_link_name, 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? @@ -178,7 +177,6 @@ def get_async(resource_group_name, server_name, communication_link_name, custom_ request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -239,8 +237,8 @@ def get_async(resource_group_name, server_name, communication_link_name, custom_ # # @return [ServerCommunicationLink] operation results. # - def create_or_update(resource_group_name, server_name, communication_link_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, communication_link_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, communication_link_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, communication_link_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -259,9 +257,9 @@ def create_or_update(resource_group_name, server_name, communication_link_name, # @return [Concurrent::Promise] promise which provides async access to http # response. # - def create_or_update_async(resource_group_name, server_name, communication_link_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, communication_link_name, parameters, custom_headers = nil) # Send request - promise = begin_create_or_update_async(resource_group_name, server_name, communication_link_name, parameters, custom_headers:custom_headers) + promise = begin_create_or_update_async(resource_group_name, server_name, communication_link_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -289,8 +287,8 @@ def create_or_update_async(resource_group_name, server_name, communication_link_ # # @return [ServerCommunicationLinkListResult] operation results. # - def list_by_server(resource_group_name, server_name, custom_headers:nil) - response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -306,8 +304,8 @@ def list_by_server(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil) - list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! end # @@ -322,7 +320,7 @@ def list_by_server_with_http_info(resource_group_name, server_name, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_async(resource_group_name, server_name, custom_headers:nil) + def list_by_server_async(resource_group_name, server_name, 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? @@ -330,7 +328,6 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -391,8 +388,8 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) # # @return [ServerCommunicationLink] operation results. # - def begin_create_or_update(resource_group_name, server_name, communication_link_name, parameters, custom_headers:nil) - response = begin_create_or_update_async(resource_group_name, server_name, communication_link_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update(resource_group_name, server_name, communication_link_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, communication_link_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -412,8 +409,8 @@ def begin_create_or_update(resource_group_name, server_name, communication_link_ # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_create_or_update_with_http_info(resource_group_name, server_name, communication_link_name, parameters, custom_headers:nil) - begin_create_or_update_async(resource_group_name, server_name, communication_link_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update_with_http_info(resource_group_name, server_name, communication_link_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, communication_link_name, parameters, custom_headers).value! end # @@ -432,7 +429,7 @@ def begin_create_or_update_with_http_info(resource_group_name, server_name, comm # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_create_or_update_async(resource_group_name, server_name, communication_link_name, parameters, custom_headers:nil) + def begin_create_or_update_async(resource_group_name, server_name, communication_link_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? @@ -442,12 +439,13 @@ def begin_create_or_update_async(resource_group_name, server_name, communication 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::SQL::Mgmt::V2014_04_01::Models::ServerCommunicationLink.mapper() request_content = @client.serialize(request_mapper, parameters) diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_connection_policies.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_connection_policies.rb index a4baaf0990..55e89a54c5 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_connection_policies.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_connection_policies.rb @@ -38,8 +38,8 @@ def initialize(client) # # @return [ServerConnectionPolicy] operation results. # - def create_or_update(resource_group_name, server_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -57,8 +57,8 @@ def create_or_update(resource_group_name, server_name, parameters, custom_header # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! end # @@ -75,7 +75,7 @@ def create_or_update_with_http_info(resource_group_name, server_name, parameters # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, server_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_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? @@ -85,12 +85,13 @@ def create_or_update_async(resource_group_name, server_name, parameters, custom_ 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::SQL::Mgmt::V2014_04_01::Models::ServerConnectionPolicy.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -159,8 +160,8 @@ def create_or_update_async(resource_group_name, server_name, parameters, custom_ # # @return [ServerConnectionPolicy] operation results. # - def get(resource_group_name, server_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -176,8 +177,8 @@ def get(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, custom_headers:nil) - get_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, custom_headers = nil) + get_async(resource_group_name, server_name, custom_headers).value! end # @@ -192,7 +193,7 @@ def get_with_http_info(resource_group_name, server_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, custom_headers:nil) + def get_async(resource_group_name, server_name, 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? @@ -201,7 +202,6 @@ def get_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_table_auditing_policies.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_table_auditing_policies.rb index 8f840e6022..436b88740b 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_table_auditing_policies.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_table_auditing_policies.rb @@ -37,8 +37,8 @@ def initialize(client) # # @return [ServerTableAuditingPolicy] operation results. # - def get(resource_group_name, server_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -55,8 +55,8 @@ def get(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, custom_headers:nil) - get_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, custom_headers = nil) + get_async(resource_group_name, server_name, custom_headers).value! end # @@ -72,7 +72,7 @@ def get_with_http_info(resource_group_name, server_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, custom_headers:nil) + def get_async(resource_group_name, server_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? table_auditing_policy_name = 'default' @@ -81,7 +81,6 @@ def get_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -141,8 +140,8 @@ def get_async(resource_group_name, server_name, custom_headers:nil) # # @return [ServerTableAuditingPolicy] operation results. # - def create_or_update(resource_group_name, server_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -161,8 +160,8 @@ def create_or_update(resource_group_name, server_name, parameters, custom_header # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! end # @@ -180,7 +179,7 @@ def create_or_update_with_http_info(resource_group_name, server_name, parameters # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, server_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? table_auditing_policy_name = 'default' @@ -190,12 +189,13 @@ def create_or_update_async(resource_group_name, server_name, parameters, custom_ 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::SQL::Mgmt::V2014_04_01::Models::ServerTableAuditingPolicy.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -265,8 +265,8 @@ def create_or_update_async(resource_group_name, server_name, parameters, custom_ # # @return [ServerTableAuditingPolicyListResult] operation results. # - def list_by_server(resource_group_name, server_name, custom_headers:nil) - response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -283,8 +283,8 @@ def list_by_server(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil) - list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! end # @@ -300,7 +300,7 @@ def list_by_server_with_http_info(resource_group_name, server_name, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_async(resource_group_name, server_name, custom_headers:nil) + def list_by_server_async(resource_group_name, server_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -308,7 +308,6 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_usages.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_usages.rb index da2d11583e..2cc94fb86a 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_usages.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_usages.rb @@ -36,8 +36,8 @@ def initialize(client) # # @return [ServerUsageListResult] operation results. # - def list_by_server(resource_group_name, server_name, custom_headers:nil) - response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -53,8 +53,8 @@ def list_by_server(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil) - list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! end # @@ -69,7 +69,7 @@ def list_by_server_with_http_info(resource_group_name, server_name, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_async(resource_group_name, server_name, custom_headers:nil) + def list_by_server_async(resource_group_name, server_name, 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? @@ -77,7 +77,6 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/servers.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/servers.rb index db4d48074a..d7b05b2606 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/servers.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/servers.rb @@ -34,8 +34,8 @@ def initialize(client) # # @return [CheckNameAvailabilityResponse] 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 @@ -49,8 +49,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 # @@ -63,19 +63,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::SQL::Mgmt::V2014_04_01::Models::CheckNameAvailabilityRequest.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -130,8 +131,8 @@ def check_name_availability_async(parameters, custom_headers:nil) # # @return [ServerListResult] operation results. # - def list(custom_headers:nil) - response = list_async(custom_headers:custom_headers).value! + def list(custom_headers = nil) + response = list_async(custom_headers).value! response.body unless response.nil? end @@ -143,8 +144,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 @@ -220,8 +220,8 @@ def list_async(custom_headers:nil) # # @return [Server] operation results. # - def create_or_update(resource_group_name, server_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -239,8 +239,8 @@ def create_or_update(resource_group_name, server_name, parameters, custom_header # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! end # @@ -257,7 +257,7 @@ def create_or_update_with_http_info(resource_group_name, server_name, parameters # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, server_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_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? @@ -266,12 +266,13 @@ def create_or_update_async(resource_group_name, server_name, parameters, custom_ 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::SQL::Mgmt::V2014_04_01::Models::Server.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -342,8 +343,8 @@ def create_or_update_async(resource_group_name, server_name, parameters, custom_ # # @return [Server] operation results. # - def update(resource_group_name, server_name, parameters, custom_headers:nil) - response = update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def update(resource_group_name, server_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, server_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -361,8 +362,8 @@ def update(resource_group_name, server_name, parameters, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, server_name, parameters, custom_headers:nil) - update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil) + update_async(resource_group_name, server_name, parameters, custom_headers).value! end # @@ -379,7 +380,7 @@ def update_with_http_info(resource_group_name, server_name, parameters, custom_h # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, server_name, parameters, custom_headers:nil) + def update_async(resource_group_name, server_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? @@ -388,12 +389,13 @@ def update_async(resource_group_name, server_name, parameters, custom_headers:ni 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::SQL::Mgmt::V2014_04_01::Models::ServerUpdate.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -451,8 +453,8 @@ def update_async(resource_group_name, server_name, parameters, custom_headers:ni # will be added to the HTTP request. # # - def delete(resource_group_name, server_name, custom_headers:nil) - response = delete_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def delete(resource_group_name, server_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, custom_headers).value! nil end @@ -468,8 +470,8 @@ def delete(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, server_name, custom_headers:nil) - delete_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, server_name, custom_headers = nil) + delete_async(resource_group_name, server_name, custom_headers).value! end # @@ -484,7 +486,7 @@ def delete_with_http_info(resource_group_name, server_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, server_name, custom_headers:nil) + def delete_async(resource_group_name, server_name, 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? @@ -492,7 +494,6 @@ def delete_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -539,8 +540,8 @@ def delete_async(resource_group_name, server_name, custom_headers:nil) # # @return [Server] operation results. # - def get(resource_group_name, server_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -556,8 +557,8 @@ def get(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, custom_headers:nil) - get_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, custom_headers = nil) + get_async(resource_group_name, server_name, custom_headers).value! end # @@ -572,7 +573,7 @@ def get_with_http_info(resource_group_name, server_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, custom_headers:nil) + def get_async(resource_group_name, server_name, 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? @@ -580,7 +581,6 @@ def get_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -636,8 +636,8 @@ def get_async(resource_group_name, server_name, custom_headers:nil) # # @return [ServerListResult] operation results. # - def list_by_resource_group(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(resource_group_name, custom_headers = nil) + response = list_by_resource_group_async(resource_group_name, custom_headers).value! response.body unless response.nil? end @@ -652,8 +652,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 # @@ -667,14 +667,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, '@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? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/service_objectives.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/service_objectives.rb index 5e08a88d61..b90b965de7 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/service_objectives.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/service_objectives.rb @@ -38,8 +38,8 @@ def initialize(client) # # @return [ServiceObjective] operation results. # - def get(resource_group_name, server_name, service_objective_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, service_objective_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, service_objective_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, service_objective_name, custom_headers).value! response.body unless response.nil? end @@ -57,8 +57,8 @@ def get(resource_group_name, server_name, service_objective_name, custom_headers # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, service_objective_name, custom_headers:nil) - get_async(resource_group_name, server_name, service_objective_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, service_objective_name, custom_headers = nil) + get_async(resource_group_name, server_name, service_objective_name, custom_headers).value! end # @@ -75,7 +75,7 @@ def get_with_http_info(resource_group_name, server_name, service_objective_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, service_objective_name, custom_headers:nil) + def get_async(resource_group_name, server_name, service_objective_name, 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? @@ -84,7 +84,6 @@ def get_async(resource_group_name, server_name, service_objective_name, custom_h request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -141,8 +140,8 @@ def get_async(resource_group_name, server_name, service_objective_name, custom_h # # @return [ServiceObjectiveListResult] operation results. # - def list_by_server(resource_group_name, server_name, custom_headers:nil) - response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -158,8 +157,8 @@ def list_by_server(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil) - list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! end # @@ -174,7 +173,7 @@ def list_by_server_with_http_info(resource_group_name, server_name, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_async(resource_group_name, server_name, custom_headers:nil) + def list_by_server_async(resource_group_name, server_name, 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? @@ -182,7 +181,6 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/service_tier_advisors.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/service_tier_advisors.rb index b37fb82003..1399895b97 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/service_tier_advisors.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/service_tier_advisors.rb @@ -38,8 +38,8 @@ def initialize(client) # # @return [ServiceTierAdvisor] operation results. # - def get(resource_group_name, server_name, database_name, service_tier_advisor_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, database_name, service_tier_advisor_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, database_name, service_tier_advisor_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, service_tier_advisor_name, custom_headers).value! response.body unless response.nil? end @@ -57,8 +57,8 @@ def get(resource_group_name, server_name, database_name, service_tier_advisor_na # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, database_name, service_tier_advisor_name, custom_headers:nil) - get_async(resource_group_name, server_name, database_name, service_tier_advisor_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, database_name, service_tier_advisor_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, service_tier_advisor_name, custom_headers).value! end # @@ -75,7 +75,7 @@ def get_with_http_info(resource_group_name, server_name, database_name, service_ # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, database_name, service_tier_advisor_name, custom_headers:nil) + def get_async(resource_group_name, server_name, database_name, service_tier_advisor_name, 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? @@ -85,7 +85,6 @@ def get_async(resource_group_name, server_name, database_name, service_tier_advi request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -143,8 +142,8 @@ def get_async(resource_group_name, server_name, database_name, service_tier_advi # # @return [ServiceTierAdvisorListResult] operation results. # - def list_by_database(resource_group_name, server_name, database_name, custom_headers:nil) - response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -161,8 +160,8 @@ def list_by_database(resource_group_name, server_name, database_name, custom_hea # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -178,7 +177,7 @@ def list_by_database_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_database_async(resource_group_name, server_name, database_name, custom_headers:nil) + def list_by_database_async(resource_group_name, server_name, database_name, 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? @@ -187,7 +186,6 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/sql_management_client.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/sql_management_client.rb index a0b860f140..8e7caa72c2 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/sql_management_client.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/sql_management_client.rb @@ -17,13 +17,13 @@ class SqlManagementClient < MsRestAzure::AzureServiceClient # @return Credentials needed for the client to connect to Azure. attr_reader :credentials + # @return [String] The API version to use for the request. + attr_reader :api_version + # @return [String] The subscription ID that identifies an Azure # subscription. attr_accessor :subscription_id - # @return [String] The API version to use for the request. - attr_reader :api_version - # @return [String] Gets or sets the preferred language for the response. attr_accessor :accept_language @@ -35,6 +35,9 @@ class SqlManagementClient < MsRestAzure::AzureServiceClient # is generated and included in each request. Default is true. attr_accessor :generate_client_request_id + # @return [ServerAdvisors] server_advisors + attr_reader :server_advisors + # @return [DatabaseAdvisors] database_advisors attr_reader :database_advisors @@ -51,9 +54,6 @@ class SqlManagementClient < MsRestAzure::AzureServiceClient # @return [RestorableDroppedDatabases] restorable_dropped_databases attr_reader :restorable_dropped_databases - # @return [RestorePoints] restore_points - attr_reader :restore_points - # @return [Capabilities] capabilities attr_reader :capabilities @@ -107,9 +107,15 @@ class SqlManagementClient < MsRestAzure::AzureServiceClient # @return [QueryTexts] query_texts attr_reader :query_texts + # @return [RecommendedElasticPools] recommended_elastic_pools + attr_reader :recommended_elastic_pools + # @return [ReplicationLinks] replication_links attr_reader :replication_links + # @return [RestorePoints] restore_points + attr_reader :restore_points + # @return [ServerAzureADAdministrators] server_azure_adadministrators attr_reader :server_azure_adadministrators @@ -125,9 +131,6 @@ class SqlManagementClient < MsRestAzure::AzureServiceClient # @return [ElasticPoolDatabaseActivities] elastic_pool_database_activities attr_reader :elastic_pool_database_activities - # @return [RecommendedElasticPools] recommended_elastic_pools - attr_reader :recommended_elastic_pools - # @return [ServiceTierAdvisors] service_tier_advisors attr_reader :service_tier_advisors @@ -166,12 +169,12 @@ def initialize(credentials = nil, base_url = nil, options = nil) fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil? @credentials = credentials + @server_advisors = ServerAdvisors.new(self) @database_advisors = DatabaseAdvisors.new(self) @backup_long_term_retention_policies = BackupLongTermRetentionPolicies.new(self) @backup_long_term_retention_vaults = BackupLongTermRetentionVaults.new(self) @recoverable_databases = RecoverableDatabases.new(self) @restorable_dropped_databases = RestorableDroppedDatabases.new(self) - @restore_points = RestorePoints.new(self) @capabilities = Capabilities.new(self) @servers = Servers.new(self) @server_connection_policies = ServerConnectionPolicies.new(self) @@ -189,13 +192,14 @@ def initialize(credentials = nil, base_url = nil, options = nil) @queries = Queries.new(self) @query_statistics = QueryStatistics.new(self) @query_texts = QueryTexts.new(self) + @recommended_elastic_pools = RecommendedElasticPools.new(self) @replication_links = ReplicationLinks.new(self) + @restore_points = RestorePoints.new(self) @server_azure_adadministrators = ServerAzureADAdministrators.new(self) @server_communication_links = ServerCommunicationLinks.new(self) @service_objectives = ServiceObjectives.new(self) @elastic_pool_activities = ElasticPoolActivities.new(self) @elastic_pool_database_activities = ElasticPoolDatabaseActivities.new(self) - @recommended_elastic_pools = RecommendedElasticPools.new(self) @service_tier_advisors = ServiceTierAdvisors.new(self) @transparent_data_encryptions = TransparentDataEncryptions.new(self) @transparent_data_encryption_activities = TransparentDataEncryptionActivities.new(self) @@ -257,9 +261,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? @@ -276,7 +277,9 @@ def make_request_async(method, path, options = {}) # def add_telemetry sdk_information = 'azure_mgmt_sql' - sdk_information = "#{sdk_information}/0.16.0" + if defined? Azure::SQL::Mgmt::V2014_04_01::VERSION + sdk_information = "#{sdk_information}/#{Azure::SQL::Mgmt::V2014_04_01::VERSION}" + end add_user_agent_information(sdk_information) end end diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/transparent_data_encryption_activities.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/transparent_data_encryption_activities.rb index d19877de9b..c1908eab40 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/transparent_data_encryption_activities.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/transparent_data_encryption_activities.rb @@ -38,8 +38,8 @@ def initialize(client) # # @return [TransparentDataEncryptionActivityListResult] operation results. # - def list_by_configuration(resource_group_name, server_name, database_name, custom_headers:nil) - response = list_by_configuration_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_configuration(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_configuration_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -57,8 +57,8 @@ def list_by_configuration(resource_group_name, server_name, database_name, custo # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_configuration_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - list_by_configuration_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_configuration_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_configuration_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -75,7 +75,7 @@ def list_by_configuration_with_http_info(resource_group_name, server_name, datab # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_configuration_async(resource_group_name, server_name, database_name, custom_headers:nil) + def list_by_configuration_async(resource_group_name, server_name, database_name, 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? @@ -85,7 +85,6 @@ def list_by_configuration_async(resource_group_name, server_name, database_name, request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/transparent_data_encryption_configurations.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/transparent_data_encryption_configurations.rb index e8131d4ddf..17be6dc7f9 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/transparent_data_encryption_configurations.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/transparent_data_encryption_configurations.rb @@ -40,8 +40,8 @@ def initialize(client) # # @return [TransparentDataEncryptionListResult] operation results. # - def list_by_database(resource_group_name, server_name, database_name, custom_headers:nil) - response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -61,8 +61,8 @@ def list_by_database(resource_group_name, server_name, database_name, custom_hea # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -81,7 +81,7 @@ def list_by_database_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_database_async(resource_group_name, server_name, database_name, custom_headers:nil) + def list_by_database_async(resource_group_name, server_name, database_name, 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? @@ -90,7 +90,6 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/transparent_data_encryptions.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/transparent_data_encryptions.rb index deba8dacc1..da3553608c 100644 --- a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/transparent_data_encryptions.rb +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/transparent_data_encryptions.rb @@ -40,8 +40,8 @@ def initialize(client) # # @return [TransparentDataEncryption] operation results. # - def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -61,8 +61,8 @@ def create_or_update(resource_group_name, server_name, database_name, parameters # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! end # @@ -81,7 +81,7 @@ def create_or_update_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, database_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? @@ -92,12 +92,13 @@ def create_or_update_async(resource_group_name, server_name, database_name, para 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::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryption.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -168,8 +169,8 @@ def create_or_update_async(resource_group_name, server_name, database_name, para # # @return [TransparentDataEncryption] operation results. # - def get(resource_group_name, server_name, database_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, database_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -187,8 +188,8 @@ def get(resource_group_name, server_name, database_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -205,7 +206,7 @@ def get_with_http_info(resource_group_name, server_name, database_name, custom_h # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, database_name, custom_headers:nil) + def get_async(resource_group_name, server_name, database_name, 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? @@ -215,7 +216,6 @@ def get_async(resource_group_name, server_name, database_name, custom_headers:ni request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid diff --git a/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/version.rb b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/version.rb new file mode 100644 index 0000000000..5d66b5eedc --- /dev/null +++ b/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/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::SQL::Mgmt::V2014_04_01 + VERSION = '0.16.0' +end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql.rb index 938b0ef104..dbc013c88f 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql.rb @@ -24,8 +24,11 @@ module Azure::SQL::Mgmt::V2015_05_01_preview autoload :DatabaseRecommendedActions, '2015-05-01-preview/generated/azure_mgmt_sql/database_recommended_actions.rb' autoload :ServerAdvisors, '2015-05-01-preview/generated/azure_mgmt_sql/server_advisors.rb' autoload :DatabaseBlobAuditingPolicies, '2015-05-01-preview/generated/azure_mgmt_sql/database_blob_auditing_policies.rb' + autoload :DatabaseAutomaticTuningOperations, '2015-05-01-preview/generated/azure_mgmt_sql/database_automatic_tuning_operations.rb' autoload :EncryptionProtectors, '2015-05-01-preview/generated/azure_mgmt_sql/encryption_protectors.rb' autoload :FailoverGroups, '2015-05-01-preview/generated/azure_mgmt_sql/failover_groups.rb' + autoload :FirewallRules, '2015-05-01-preview/generated/azure_mgmt_sql/firewall_rules.rb' + autoload :ManagedInstances, '2015-05-01-preview/generated/azure_mgmt_sql/managed_instances.rb' autoload :Operations, '2015-05-01-preview/generated/azure_mgmt_sql/operations.rb' autoload :ServerKeys, '2015-05-01-preview/generated/azure_mgmt_sql/server_keys.rb' autoload :Servers, '2015-05-01-preview/generated/azure_mgmt_sql/servers.rb' @@ -37,51 +40,62 @@ module Azure::SQL::Mgmt::V2015_05_01_preview autoload :SqlManagementClient, '2015-05-01-preview/generated/azure_mgmt_sql/sql_management_client.rb' module Models - autoload :ServerKeyListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/server_key_list_result.rb' - autoload :Resource, '2015-05-01-preview/generated/azure_mgmt_sql/models/resource.rb' + autoload :OperationDisplay, '2015-05-01-preview/generated/azure_mgmt_sql/models/operation_display.rb' + autoload :Operation, '2015-05-01-preview/generated/azure_mgmt_sql/models/operation.rb' + autoload :RecommendedActionImplementationInfo, '2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_implementation_info.rb' + autoload :OperationListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/operation_list_result.rb' + autoload :RecommendedActionImpactRecord, '2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_impact_record.rb' + autoload :ManagedInstanceUpdate, '2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance_update.rb' + autoload :FirewallRuleList, '2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule_list.rb' autoload :ResourceIdentity, '2015-05-01-preview/generated/azure_mgmt_sql/models/resource_identity.rb' + autoload :SyncGroupSchema, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_schema.rb' + autoload :Sku, '2015-05-01-preview/generated/azure_mgmt_sql/models/sku.rb' + autoload :SyncDatabaseIdListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_database_id_list_result.rb' + autoload :SyncGroupSchemaTable, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_schema_table.rb' + autoload :SyncFullSchemaTable, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_table.rb' + autoload :SyncGroupSchemaTableColumn, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_schema_table_column.rb' + autoload :ManagedInstanceListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance_list_result.rb' + autoload :EncryptionProtectorListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/encryption_protector_list_result.rb' + autoload :SyncFullSchemaTableColumn, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_table_column.rb' + autoload :FailoverGroupReadOnlyEndpoint, '2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_read_only_endpoint.rb' autoload :RecommendedActionStateInfo, '2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_state_info.rb' + autoload :SyncGroupLogProperties, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_log_properties.rb' autoload :RecommendedActionErrorInfo, '2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_error_info.rb' - autoload :ServerListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/server_list_result.rb' + autoload :FailoverGroupListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_list_result.rb' autoload :RecommendedActionMetricInfo, '2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_metric_info.rb' + autoload :SyncFullSchemaPropertiesListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_properties_list_result.rb' + autoload :FirewallRuleListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule_list_result.rb' + autoload :ServerKeyListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/server_key_list_result.rb' + autoload :Resource, '2015-05-01-preview/generated/azure_mgmt_sql/models/resource.rb' autoload :VirtualNetworkRuleListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/virtual_network_rule_list_result.rb' - autoload :RecommendedActionImpactRecord, '2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_impact_record.rb' - autoload :SyncGroupListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_list_result.rb' - autoload :SyncGroupSchema, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_schema.rb' - autoload :SyncGroupLogProperties, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_log_properties.rb' - autoload :FailoverGroupReadWriteEndpoint, '2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_read_write_endpoint.rb' autoload :SyncGroupLogListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_log_list_result.rb' + autoload :ServerListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/server_list_result.rb' autoload :PartnerInfo, '2015-05-01-preview/generated/azure_mgmt_sql/models/partner_info.rb' autoload :ServerUpdate, '2015-05-01-preview/generated/azure_mgmt_sql/models/server_update.rb' - autoload :FailoverGroupUpdate, '2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_update.rb' + autoload :ResourceWithWritableName, '2015-05-01-preview/generated/azure_mgmt_sql/models/resource_with_writable_name.rb' autoload :SubscriptionUsageListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/subscription_usage_list_result.rb' - autoload :OperationDisplay, '2015-05-01-preview/generated/azure_mgmt_sql/models/operation_display.rb' + autoload :SyncGroupListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_list_result.rb' autoload :SyncAgentListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent_list_result.rb' - autoload :OperationListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/operation_list_result.rb' + autoload :FailoverGroupReadWriteEndpoint, '2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_read_write_endpoint.rb' autoload :SyncAgentKeyProperties, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent_key_properties.rb' - autoload :SyncFullSchemaPropertiesListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_properties_list_result.rb' - autoload :RecommendedActionImplementationInfo, '2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_implementation_info.rb' + autoload :SyncFullSchemaProperties, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_properties.rb' autoload :SyncMemberListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_member_list_result.rb' - autoload :FailoverGroupReadOnlyEndpoint, '2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_read_only_endpoint.rb' + autoload :FailoverGroupUpdate, '2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_update.rb' autoload :SyncAgentLinkedDatabaseListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent_linked_database_list_result.rb' - autoload :FailoverGroupListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_list_result.rb' + autoload :AutomaticTuningOptions, '2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_options.rb' autoload :SyncDatabaseIdProperties, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_database_id_properties.rb' - autoload :SyncGroupSchemaTableColumn, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_schema_table_column.rb' - autoload :SyncDatabaseIdListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_database_id_list_result.rb' - autoload :SyncGroupSchemaTable, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_schema_table.rb' - autoload :SyncFullSchemaTableColumn, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_table_column.rb' - autoload :EncryptionProtectorListResult, '2015-05-01-preview/generated/azure_mgmt_sql/models/encryption_protector_list_result.rb' - autoload :SyncFullSchemaTable, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_table.rb' - autoload :Operation, '2015-05-01-preview/generated/azure_mgmt_sql/models/operation.rb' - autoload :SyncFullSchemaProperties, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_properties.rb' autoload :ProxyResource, '2015-05-01-preview/generated/azure_mgmt_sql/models/proxy_resource.rb' autoload :RecommendedAction, '2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action.rb' autoload :Advisor, '2015-05-01-preview/generated/azure_mgmt_sql/models/advisor.rb' + autoload :TrackedResource, '2015-05-01-preview/generated/azure_mgmt_sql/models/tracked_resource.rb' autoload :DatabaseBlobAuditingPolicy, '2015-05-01-preview/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb' + autoload :DatabaseAutomaticTuning, '2015-05-01-preview/generated/azure_mgmt_sql/models/database_automatic_tuning.rb' autoload :EncryptionProtector, '2015-05-01-preview/generated/azure_mgmt_sql/models/encryption_protector.rb' autoload :FailoverGroup, '2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group.rb' + autoload :ProxyResourceWithWritableName, '2015-05-01-preview/generated/azure_mgmt_sql/models/proxy_resource_with_writable_name.rb' + autoload :FirewallRule, '2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule.rb' + autoload :ManagedInstance, '2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance.rb' autoload :ServerKey, '2015-05-01-preview/generated/azure_mgmt_sql/models/server_key.rb' - autoload :TrackedResource, '2015-05-01-preview/generated/azure_mgmt_sql/models/tracked_resource.rb' autoload :Server, '2015-05-01-preview/generated/azure_mgmt_sql/models/server.rb' autoload :SyncAgent, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent.rb' autoload :SyncAgentLinkedDatabase, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent_linked_database.rb' @@ -97,12 +111,16 @@ module Models autoload :ImplementationMethod, '2015-05-01-preview/generated/azure_mgmt_sql/models/implementation_method.rb' autoload :IsRetryable, '2015-05-01-preview/generated/azure_mgmt_sql/models/is_retryable.rb' autoload :BlobAuditingPolicyState, '2015-05-01-preview/generated/azure_mgmt_sql/models/blob_auditing_policy_state.rb' + autoload :AutomaticTuningMode, '2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_mode.rb' + autoload :AutomaticTuningOptionModeDesired, '2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_option_mode_desired.rb' + autoload :AutomaticTuningOptionModeActual, '2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_option_mode_actual.rb' + autoload :AutomaticTuningDisabledReason, '2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_disabled_reason.rb' autoload :ServerKeyType, '2015-05-01-preview/generated/azure_mgmt_sql/models/server_key_type.rb' autoload :ReadWriteEndpointFailoverPolicy, '2015-05-01-preview/generated/azure_mgmt_sql/models/read_write_endpoint_failover_policy.rb' autoload :ReadOnlyEndpointFailoverPolicy, '2015-05-01-preview/generated/azure_mgmt_sql/models/read_only_endpoint_failover_policy.rb' autoload :FailoverGroupReplicationRole, '2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_replication_role.rb' - autoload :OperationOrigin, '2015-05-01-preview/generated/azure_mgmt_sql/models/operation_origin.rb' autoload :IdentityType, '2015-05-01-preview/generated/azure_mgmt_sql/models/identity_type.rb' + autoload :OperationOrigin, '2015-05-01-preview/generated/azure_mgmt_sql/models/operation_origin.rb' autoload :SyncAgentState, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent_state.rb' autoload :SyncMemberDbType, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_member_db_type.rb' autoload :SyncGroupLogType, '2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_log_type.rb' diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_advisors.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_advisors.rb index 808021151e..9b4bfc41cf 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_advisors.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_advisors.rb @@ -37,8 +37,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_database(resource_group_name, server_name, database_name, custom_headers:nil) - response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -55,8 +55,8 @@ def list_by_database(resource_group_name, server_name, database_name, custom_hea # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -72,7 +72,7 @@ def list_by_database_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_database_async(resource_group_name, server_name, database_name, custom_headers:nil) + def list_by_database_async(resource_group_name, server_name, database_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -81,7 +81,6 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -114,13 +113,11 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { - client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'AdvisorElementType', type: { @@ -156,8 +153,8 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust # # @return [Advisor] operation results. # - def get(resource_group_name, server_name, database_name, advisor_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, database_name, advisor_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, database_name, advisor_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, advisor_name, custom_headers).value! response.body unless response.nil? end @@ -175,8 +172,8 @@ def get(resource_group_name, server_name, database_name, advisor_name, custom_he # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, database_name, advisor_name, custom_headers:nil) - get_async(resource_group_name, server_name, database_name, advisor_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, database_name, advisor_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, advisor_name, custom_headers).value! end # @@ -193,7 +190,7 @@ def get_with_http_info(resource_group_name, server_name, database_name, advisor_ # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, database_name, advisor_name, custom_headers:nil) + def get_async(resource_group_name, server_name, database_name, advisor_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -203,7 +200,6 @@ def get_async(resource_group_name, server_name, database_name, advisor_name, cus request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -263,8 +259,8 @@ def get_async(resource_group_name, server_name, database_name, advisor_name, cus # # @return [Advisor] operation results. # - def update(resource_group_name, server_name, database_name, advisor_name, parameters, custom_headers:nil) - response = update_async(resource_group_name, server_name, database_name, advisor_name, parameters, custom_headers:custom_headers).value! + def update(resource_group_name, server_name, database_name, advisor_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, server_name, database_name, advisor_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -283,8 +279,8 @@ def update(resource_group_name, server_name, database_name, advisor_name, parame # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, server_name, database_name, advisor_name, parameters, custom_headers:nil) - update_async(resource_group_name, server_name, database_name, advisor_name, parameters, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, server_name, database_name, advisor_name, parameters, custom_headers = nil) + update_async(resource_group_name, server_name, database_name, advisor_name, parameters, custom_headers).value! end # @@ -302,7 +298,7 @@ def update_with_http_info(resource_group_name, server_name, database_name, advis # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, server_name, database_name, advisor_name, parameters, custom_headers:nil) + def update_async(resource_group_name, server_name, database_name, advisor_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -313,12 +309,13 @@ def update_async(resource_group_name, server_name, database_name, advisor_name, 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::SQL::Mgmt::V2015_05_01_preview::Models::Advisor.mapper() request_content = @client.serialize(request_mapper, parameters) diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_automatic_tuning_operations.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_automatic_tuning_operations.rb new file mode 100644 index 0000000000..76358733a9 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_automatic_tuning_operations.rb @@ -0,0 +1,246 @@ +# 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::SQL::Mgmt::V2015_05_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class DatabaseAutomaticTuningOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the DatabaseAutomaticTuningOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets a database's automatic tuning. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DatabaseAutomaticTuning] operation results. + # + def get(resource_group_name, server_name, database_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a database's automatic tuning. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Gets a database's automatic tuning. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, database_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/databases/{databaseName}/automaticTuning/current' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::DatabaseAutomaticTuning.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 + + # + # Update automatic tuning properties for target database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [DatabaseAutomaticTuning] The requested automatic tuning + # resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DatabaseAutomaticTuning] operation results. + # + def update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Update automatic tuning properties for target database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [DatabaseAutomaticTuning] The requested automatic tuning + # resource state. + # @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 update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + end + + # + # Update automatic tuning properties for target database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [DatabaseAutomaticTuning] The requested automatic tuning + # resource state. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::DatabaseAutomaticTuning.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/automaticTuning/current' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + 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::SQL::Mgmt::V2015_05_01_preview::Models::DatabaseAutomaticTuning.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 + + end +end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_blob_auditing_policies.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_blob_auditing_policies.rb index 29e64369ef..ead20f329b 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_blob_auditing_policies.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_blob_auditing_policies.rb @@ -31,15 +31,14 @@ def initialize(client) # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which the blob - # audit policy is defined. + # @param database_name [String] The name of the database. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [DatabaseBlobAuditingPolicy] operation results. # - def get(resource_group_name, server_name, database_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, database_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -50,15 +49,14 @@ def get(resource_group_name, server_name, database_name, custom_headers:nil) # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which the blob - # audit policy is defined. + # @param database_name [String] The name of the database. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -68,14 +66,13 @@ def get_with_http_info(resource_group_name, server_name, database_name, custom_h # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which the blob - # audit policy is defined. + # @param database_name [String] The name of the database. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, database_name, custom_headers:nil) + def get_async(resource_group_name, server_name, database_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -85,7 +82,6 @@ def get_async(resource_group_name, server_name, database_name, custom_headers:ni request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -137,8 +133,7 @@ def get_async(resource_group_name, server_name, database_name, custom_headers:ni # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which the blob - # auditing policy will be defined. + # @param database_name [String] The name of the database. # @param parameters [DatabaseBlobAuditingPolicy] The database blob auditing # policy. # @param custom_headers [Hash{String => String}] A hash of custom headers that @@ -146,8 +141,8 @@ def get_async(resource_group_name, server_name, database_name, custom_headers:ni # # @return [DatabaseBlobAuditingPolicy] operation results. # - def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -158,8 +153,7 @@ def create_or_update(resource_group_name, server_name, database_name, parameters # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which the blob - # auditing policy will be defined. + # @param database_name [String] The name of the database. # @param parameters [DatabaseBlobAuditingPolicy] The database blob auditing # policy. # @param custom_headers [Hash{String => String}] A hash of custom headers that @@ -167,8 +161,8 @@ def create_or_update(resource_group_name, server_name, database_name, parameters # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! end # @@ -178,8 +172,7 @@ def create_or_update_with_http_info(resource_group_name, server_name, database_n # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which the blob - # auditing policy will be defined. + # @param database_name [String] The name of the database. # @param parameters [DatabaseBlobAuditingPolicy] The database blob auditing # policy. # @param [Hash{String => String}] A hash of custom headers that will be added @@ -187,7 +180,7 @@ def create_or_update_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -198,12 +191,13 @@ def create_or_update_async(resource_group_name, server_name, database_name, para 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::SQL::Mgmt::V2015_05_01_preview::Models::DatabaseBlobAuditingPolicy.mapper() request_content = @client.serialize(request_mapper, parameters) diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_recommended_actions.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_recommended_actions.rb index d25f5d7d84..4964e41ea1 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_recommended_actions.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_recommended_actions.rb @@ -38,8 +38,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_database_advisor(resource_group_name, server_name, database_name, advisor_name, custom_headers:nil) - response = list_by_database_advisor_async(resource_group_name, server_name, database_name, advisor_name, custom_headers:custom_headers).value! + def list_by_database_advisor(resource_group_name, server_name, database_name, advisor_name, custom_headers = nil) + response = list_by_database_advisor_async(resource_group_name, server_name, database_name, advisor_name, custom_headers).value! response.body unless response.nil? end @@ -57,8 +57,8 @@ def list_by_database_advisor(resource_group_name, server_name, database_name, ad # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_database_advisor_with_http_info(resource_group_name, server_name, database_name, advisor_name, custom_headers:nil) - list_by_database_advisor_async(resource_group_name, server_name, database_name, advisor_name, custom_headers:custom_headers).value! + def list_by_database_advisor_with_http_info(resource_group_name, server_name, database_name, advisor_name, custom_headers = nil) + list_by_database_advisor_async(resource_group_name, server_name, database_name, advisor_name, custom_headers).value! end # @@ -75,7 +75,7 @@ def list_by_database_advisor_with_http_info(resource_group_name, server_name, da # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_database_advisor_async(resource_group_name, server_name, database_name, advisor_name, custom_headers:nil) + def list_by_database_advisor_async(resource_group_name, server_name, database_name, advisor_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -85,7 +85,6 @@ def list_by_database_advisor_async(resource_group_name, server_name, database_na request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -118,13 +117,11 @@ def list_by_database_advisor_async(resource_group_name, server_name, database_na begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { - client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'RecommendedActionElementType', type: { @@ -162,8 +159,8 @@ def list_by_database_advisor_async(resource_group_name, server_name, database_na # # @return [RecommendedAction] operation results. # - def get(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, custom_headers).value! response.body unless response.nil? end @@ -183,8 +180,8 @@ def get(resource_group_name, server_name, database_name, advisor_name, recommend # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, custom_headers:nil) - get_async(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, custom_headers).value! end # @@ -203,7 +200,7 @@ def get_with_http_info(resource_group_name, server_name, database_name, advisor_ # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, custom_headers:nil) + def get_async(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -214,7 +211,6 @@ def get_async(resource_group_name, server_name, database_name, advisor_name, rec request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -277,8 +273,8 @@ def get_async(resource_group_name, server_name, database_name, advisor_name, rec # # @return [RecommendedAction] operation results. # - def update(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, parameters, custom_headers:nil) - response = update_async(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, parameters, custom_headers:custom_headers).value! + def update(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -300,8 +296,8 @@ def update(resource_group_name, server_name, database_name, advisor_name, recomm # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, parameters, custom_headers:nil) - update_async(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, parameters, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, parameters, custom_headers = nil) + update_async(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, parameters, custom_headers).value! end # @@ -322,7 +318,7 @@ def update_with_http_info(resource_group_name, server_name, database_name, advis # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, parameters, custom_headers:nil) + def update_async(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -334,12 +330,13 @@ def update_async(resource_group_name, server_name, database_name, advisor_name, 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::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedAction.mapper() request_content = @client.serialize(request_mapper, parameters) diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/encryption_protectors.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/encryption_protectors.rb index 2139a85324..dd001b6a0b 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/encryption_protectors.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/encryption_protectors.rb @@ -36,8 +36,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_server(resource_group_name, server_name, custom_headers:nil) - first_page = list_by_server_as_lazy(resource_group_name, server_name, custom_headers:custom_headers) + def list_by_server(resource_group_name, server_name, custom_headers = nil) + first_page = list_by_server_as_lazy(resource_group_name, server_name, custom_headers) first_page.get_all_items end @@ -53,8 +53,8 @@ def list_by_server(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil) - list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! end # @@ -69,7 +69,7 @@ def list_by_server_with_http_info(resource_group_name, server_name, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_async(resource_group_name, server_name, custom_headers:nil) + def list_by_server_async(resource_group_name, server_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -77,7 +77,6 @@ def list_by_server_async(resource_group_name, server_name, custom_headers: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 +133,8 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) # # @return [EncryptionProtector] operation results. # - def get(resource_group_name, server_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -151,8 +150,8 @@ def get(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, custom_headers:nil) - get_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, custom_headers = nil) + get_async(resource_group_name, server_name, custom_headers).value! end # @@ -167,7 +166,7 @@ def get_with_http_info(resource_group_name, server_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, custom_headers:nil) + def get_async(resource_group_name, server_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? encryption_protector_name = 'current' @@ -176,7 +175,6 @@ def get_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -235,8 +233,8 @@ def get_async(resource_group_name, server_name, custom_headers:nil) # # @return [EncryptionProtector] operation results. # - def create_or_update(resource_group_name, server_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -253,9 +251,9 @@ def create_or_update(resource_group_name, server_name, parameters, custom_header # @return [Concurrent::Promise] promise which provides async access to http # response. # - def create_or_update_async(resource_group_name, server_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil) # Send request - promise = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers) + promise = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -285,8 +283,8 @@ def create_or_update_async(resource_group_name, server_name, parameters, custom_ # # @return [EncryptionProtector] operation results. # - def begin_create_or_update(resource_group_name, server_name, parameters, custom_headers:nil) - response = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update(resource_group_name, server_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -304,8 +302,8 @@ def begin_create_or_update(resource_group_name, server_name, parameters, custom_ # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers:nil) - begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! end # @@ -322,7 +320,7 @@ def begin_create_or_update_with_http_info(resource_group_name, server_name, para # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers:nil) + def begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? encryption_protector_name = 'current' @@ -332,12 +330,13 @@ def begin_create_or_update_async(resource_group_name, server_name, parameters, c 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::SQL::Mgmt::V2015_05_01_preview::Models::EncryptionProtector.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -394,8 +393,8 @@ def begin_create_or_update_async(resource_group_name, server_name, parameters, c # # @return [EncryptionProtectorListResult] operation results. # - def list_by_server_next(next_page_link, custom_headers:nil) - response = list_by_server_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_server_next(next_page_link, custom_headers = nil) + response = list_by_server_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -409,8 +408,8 @@ def list_by_server_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_next_with_http_info(next_page_link, custom_headers:nil) - list_by_server_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_server_next_with_http_info(next_page_link, custom_headers = nil) + list_by_server_next_async(next_page_link, custom_headers).value! end # @@ -423,12 +422,11 @@ def list_by_server_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_next_async(next_page_link, custom_headers:nil) + def list_by_server_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 @@ -485,12 +483,12 @@ def list_by_server_next_async(next_page_link, custom_headers:nil) # @return [EncryptionProtectorListResult] which provide lazy access to pages of # the response. # - def list_by_server_as_lazy(resource_group_name, server_name, custom_headers:nil) - response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_as_lazy(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_server_next_async(next_page_link, custom_headers:custom_headers) + list_by_server_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/failover_groups.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/failover_groups.rb index 19f9d0e63e..915d0e7399 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/failover_groups.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/failover_groups.rb @@ -38,8 +38,8 @@ def initialize(client) # # @return [FailoverGroup] operation results. # - def get(resource_group_name, server_name, failover_group_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, failover_group_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, failover_group_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, failover_group_name, custom_headers).value! response.body unless response.nil? end @@ -57,8 +57,8 @@ def get(resource_group_name, server_name, failover_group_name, custom_headers:ni # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, failover_group_name, custom_headers:nil) - get_async(resource_group_name, server_name, failover_group_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, failover_group_name, custom_headers = nil) + get_async(resource_group_name, server_name, failover_group_name, custom_headers).value! end # @@ -75,7 +75,7 @@ def get_with_http_info(resource_group_name, server_name, failover_group_name, cu # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, failover_group_name, custom_headers:nil) + def get_async(resource_group_name, server_name, failover_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'failover_group_name is nil' if failover_group_name.nil? @@ -84,7 +84,6 @@ def get_async(resource_group_name, server_name, failover_group_name, custom_head request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -144,8 +143,8 @@ def get_async(resource_group_name, server_name, failover_group_name, custom_head # # @return [FailoverGroup] operation results. # - def create_or_update(resource_group_name, server_name, failover_group_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, failover_group_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -163,9 +162,9 @@ def create_or_update(resource_group_name, server_name, failover_group_name, para # @return [Concurrent::Promise] promise which provides async access to http # response. # - def create_or_update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers = nil) # Send request - promise = begin_create_or_update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers:custom_headers) + promise = begin_create_or_update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -193,8 +192,8 @@ def create_or_update_async(resource_group_name, server_name, failover_group_name # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - def delete(resource_group_name, server_name, failover_group_name, custom_headers:nil) - response = delete_async(resource_group_name, server_name, failover_group_name, custom_headers:custom_headers).value! + def delete(resource_group_name, server_name, failover_group_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, failover_group_name, custom_headers).value! nil end @@ -211,9 +210,9 @@ def delete(resource_group_name, server_name, failover_group_name, custom_headers # @return [Concurrent::Promise] promise which provides async access to http # response. # - def delete_async(resource_group_name, server_name, failover_group_name, custom_headers:nil) + def delete_async(resource_group_name, server_name, failover_group_name, custom_headers = nil) # Send request - promise = begin_delete_async(resource_group_name, server_name, failover_group_name, custom_headers:custom_headers) + promise = begin_delete_async(resource_group_name, server_name, failover_group_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -242,8 +241,8 @@ def delete_async(resource_group_name, server_name, failover_group_name, custom_h # # @return [FailoverGroup] operation results. # - def update(resource_group_name, server_name, failover_group_name, parameters, custom_headers:nil) - response = update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers:custom_headers).value! + def update(resource_group_name, server_name, failover_group_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -261,9 +260,9 @@ def update(resource_group_name, server_name, failover_group_name, parameters, cu # @return [Concurrent::Promise] promise which provides async access to http # response. # - def update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers:nil) + def update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers = nil) # Send request - promise = begin_update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers:custom_headers) + promise = begin_update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -292,8 +291,8 @@ def update_async(resource_group_name, server_name, failover_group_name, paramete # # @return [Array] operation results. # - def list_by_server(resource_group_name, server_name, custom_headers:nil) - first_page = list_by_server_as_lazy(resource_group_name, server_name, custom_headers:custom_headers) + def list_by_server(resource_group_name, server_name, custom_headers = nil) + first_page = list_by_server_as_lazy(resource_group_name, server_name, custom_headers) first_page.get_all_items end @@ -310,8 +309,8 @@ def list_by_server(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil) - list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! end # @@ -327,7 +326,7 @@ def list_by_server_with_http_info(resource_group_name, server_name, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_async(resource_group_name, server_name, custom_headers:nil) + def list_by_server_async(resource_group_name, server_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -335,7 +334,6 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -394,8 +392,8 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) # # @return [FailoverGroup] operation results. # - def failover(resource_group_name, server_name, failover_group_name, custom_headers:nil) - response = failover_async(resource_group_name, server_name, failover_group_name, custom_headers:custom_headers).value! + def failover(resource_group_name, server_name, failover_group_name, custom_headers = nil) + response = failover_async(resource_group_name, server_name, failover_group_name, custom_headers).value! response.body unless response.nil? end @@ -412,9 +410,9 @@ def failover(resource_group_name, server_name, failover_group_name, custom_heade # @return [Concurrent::Promise] promise which provides async access to http # response. # - def failover_async(resource_group_name, server_name, failover_group_name, custom_headers:nil) + def failover_async(resource_group_name, server_name, failover_group_name, custom_headers = nil) # Send request - promise = begin_failover_async(resource_group_name, server_name, failover_group_name, custom_headers:custom_headers) + promise = begin_failover_async(resource_group_name, server_name, failover_group_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -445,8 +443,8 @@ def failover_async(resource_group_name, server_name, failover_group_name, custom # # @return [FailoverGroup] operation results. # - def force_failover_allow_data_loss(resource_group_name, server_name, failover_group_name, custom_headers:nil) - response = force_failover_allow_data_loss_async(resource_group_name, server_name, failover_group_name, custom_headers:custom_headers).value! + def force_failover_allow_data_loss(resource_group_name, server_name, failover_group_name, custom_headers = nil) + response = force_failover_allow_data_loss_async(resource_group_name, server_name, failover_group_name, custom_headers).value! response.body unless response.nil? end @@ -463,9 +461,9 @@ def force_failover_allow_data_loss(resource_group_name, server_name, failover_gr # @return [Concurrent::Promise] promise which provides async access to http # response. # - def force_failover_allow_data_loss_async(resource_group_name, server_name, failover_group_name, custom_headers:nil) + def force_failover_allow_data_loss_async(resource_group_name, server_name, failover_group_name, custom_headers = nil) # Send request - promise = begin_force_failover_allow_data_loss_async(resource_group_name, server_name, failover_group_name, custom_headers:custom_headers) + promise = begin_force_failover_allow_data_loss_async(resource_group_name, server_name, failover_group_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -496,8 +494,8 @@ def force_failover_allow_data_loss_async(resource_group_name, server_name, failo # # @return [FailoverGroup] operation results. # - def begin_create_or_update(resource_group_name, server_name, failover_group_name, parameters, custom_headers:nil) - response = begin_create_or_update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update(resource_group_name, server_name, failover_group_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -516,8 +514,8 @@ def begin_create_or_update(resource_group_name, server_name, failover_group_name # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_create_or_update_with_http_info(resource_group_name, server_name, failover_group_name, parameters, custom_headers:nil) - begin_create_or_update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update_with_http_info(resource_group_name, server_name, failover_group_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers).value! end # @@ -535,7 +533,7 @@ def begin_create_or_update_with_http_info(resource_group_name, server_name, fail # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_create_or_update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers:nil) + def begin_create_or_update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'failover_group_name is nil' if failover_group_name.nil? @@ -545,12 +543,13 @@ def begin_create_or_update_async(resource_group_name, server_name, failover_grou 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::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroup.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -620,8 +619,8 @@ def begin_create_or_update_async(resource_group_name, server_name, failover_grou # will be added to the HTTP request. # # - def begin_delete(resource_group_name, server_name, failover_group_name, custom_headers:nil) - response = begin_delete_async(resource_group_name, server_name, failover_group_name, custom_headers:custom_headers).value! + def begin_delete(resource_group_name, server_name, failover_group_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, server_name, failover_group_name, custom_headers).value! nil end @@ -639,8 +638,8 @@ def begin_delete(resource_group_name, server_name, failover_group_name, custom_h # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_delete_with_http_info(resource_group_name, server_name, failover_group_name, custom_headers:nil) - begin_delete_async(resource_group_name, server_name, failover_group_name, custom_headers:custom_headers).value! + def begin_delete_with_http_info(resource_group_name, server_name, failover_group_name, custom_headers = nil) + begin_delete_async(resource_group_name, server_name, failover_group_name, custom_headers).value! end # @@ -657,7 +656,7 @@ def begin_delete_with_http_info(resource_group_name, server_name, failover_group # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_delete_async(resource_group_name, server_name, failover_group_name, custom_headers:nil) + def begin_delete_async(resource_group_name, server_name, failover_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'failover_group_name is nil' if failover_group_name.nil? @@ -666,7 +665,6 @@ def begin_delete_async(resource_group_name, server_name, failover_group_name, cu request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -716,8 +714,8 @@ def begin_delete_async(resource_group_name, server_name, failover_group_name, cu # # @return [FailoverGroup] operation results. # - def begin_update(resource_group_name, server_name, failover_group_name, parameters, custom_headers:nil) - response = begin_update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers:custom_headers).value! + def begin_update(resource_group_name, server_name, failover_group_name, parameters, custom_headers = nil) + response = begin_update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -736,8 +734,8 @@ def begin_update(resource_group_name, server_name, failover_group_name, paramete # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_update_with_http_info(resource_group_name, server_name, failover_group_name, parameters, custom_headers:nil) - begin_update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers:custom_headers).value! + def begin_update_with_http_info(resource_group_name, server_name, failover_group_name, parameters, custom_headers = nil) + begin_update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers).value! end # @@ -755,7 +753,7 @@ def begin_update_with_http_info(resource_group_name, server_name, failover_group # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers:nil) + def begin_update_async(resource_group_name, server_name, failover_group_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'failover_group_name is nil' if failover_group_name.nil? @@ -765,12 +763,13 @@ def begin_update_async(resource_group_name, server_name, failover_group_name, pa 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::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupUpdate.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -831,8 +830,8 @@ def begin_update_async(resource_group_name, server_name, failover_group_name, pa # # @return [FailoverGroup] operation results. # - def begin_failover(resource_group_name, server_name, failover_group_name, custom_headers:nil) - response = begin_failover_async(resource_group_name, server_name, failover_group_name, custom_headers:custom_headers).value! + def begin_failover(resource_group_name, server_name, failover_group_name, custom_headers = nil) + response = begin_failover_async(resource_group_name, server_name, failover_group_name, custom_headers).value! response.body unless response.nil? end @@ -850,8 +849,8 @@ def begin_failover(resource_group_name, server_name, failover_group_name, custom # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_failover_with_http_info(resource_group_name, server_name, failover_group_name, custom_headers:nil) - begin_failover_async(resource_group_name, server_name, failover_group_name, custom_headers:custom_headers).value! + def begin_failover_with_http_info(resource_group_name, server_name, failover_group_name, custom_headers = nil) + begin_failover_async(resource_group_name, server_name, failover_group_name, custom_headers).value! end # @@ -868,7 +867,7 @@ def begin_failover_with_http_info(resource_group_name, server_name, failover_gro # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_failover_async(resource_group_name, server_name, failover_group_name, custom_headers:nil) + def begin_failover_async(resource_group_name, server_name, failover_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'failover_group_name is nil' if failover_group_name.nil? @@ -877,7 +876,6 @@ def begin_failover_async(resource_group_name, server_name, failover_group_name, request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -937,8 +935,8 @@ def begin_failover_async(resource_group_name, server_name, failover_group_name, # # @return [FailoverGroup] operation results. # - def begin_force_failover_allow_data_loss(resource_group_name, server_name, failover_group_name, custom_headers:nil) - response = begin_force_failover_allow_data_loss_async(resource_group_name, server_name, failover_group_name, custom_headers:custom_headers).value! + def begin_force_failover_allow_data_loss(resource_group_name, server_name, failover_group_name, custom_headers = nil) + response = begin_force_failover_allow_data_loss_async(resource_group_name, server_name, failover_group_name, custom_headers).value! response.body unless response.nil? end @@ -957,8 +955,8 @@ def begin_force_failover_allow_data_loss(resource_group_name, server_name, failo # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_force_failover_allow_data_loss_with_http_info(resource_group_name, server_name, failover_group_name, custom_headers:nil) - begin_force_failover_allow_data_loss_async(resource_group_name, server_name, failover_group_name, custom_headers:custom_headers).value! + def begin_force_failover_allow_data_loss_with_http_info(resource_group_name, server_name, failover_group_name, custom_headers = nil) + begin_force_failover_allow_data_loss_async(resource_group_name, server_name, failover_group_name, custom_headers).value! end # @@ -976,7 +974,7 @@ def begin_force_failover_allow_data_loss_with_http_info(resource_group_name, ser # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_force_failover_allow_data_loss_async(resource_group_name, server_name, failover_group_name, custom_headers:nil) + def begin_force_failover_allow_data_loss_async(resource_group_name, server_name, failover_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'failover_group_name is nil' if failover_group_name.nil? @@ -985,7 +983,6 @@ def begin_force_failover_allow_data_loss_async(resource_group_name, server_name, request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1040,8 +1037,8 @@ def begin_force_failover_allow_data_loss_async(resource_group_name, server_name, # # @return [FailoverGroupListResult] operation results. # - def list_by_server_next(next_page_link, custom_headers:nil) - response = list_by_server_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_server_next(next_page_link, custom_headers = nil) + response = list_by_server_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -1055,8 +1052,8 @@ def list_by_server_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_next_with_http_info(next_page_link, custom_headers:nil) - list_by_server_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_server_next_with_http_info(next_page_link, custom_headers = nil) + list_by_server_next_async(next_page_link, custom_headers).value! end # @@ -1069,12 +1066,11 @@ def list_by_server_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_next_async(next_page_link, custom_headers:nil) + def list_by_server_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 @@ -1132,12 +1128,12 @@ def list_by_server_next_async(next_page_link, custom_headers:nil) # @return [FailoverGroupListResult] which provide lazy access to pages of the # response. # - def list_by_server_as_lazy(resource_group_name, server_name, custom_headers:nil) - response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_as_lazy(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_server_next_async(next_page_link, custom_headers:custom_headers) + list_by_server_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/firewall_rules.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/firewall_rules.rb new file mode 100644 index 0000000000..1e594f820f --- /dev/null +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/firewall_rules.rb @@ -0,0 +1,664 @@ +# 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::SQL::Mgmt::V2015_05_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class FirewallRules + include MsRestAzure + + # + # Creates and initializes a new instance of the FirewallRules class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets a firewall rule. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param firewall_rule_name [String] The name of the firewall rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [FirewallRule] operation results. + # + def get(resource_group_name, server_name, firewall_rule_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, firewall_rule_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a firewall rule. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param firewall_rule_name [String] The name of the firewall rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, firewall_rule_name, custom_headers = nil) + get_async(resource_group_name, server_name, firewall_rule_name, custom_headers).value! + end + + # + # Gets a firewall rule. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param firewall_rule_name [String] The name of the firewall rule. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, firewall_rule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'firewall_rule_name is nil' if firewall_rule_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/firewallRules/{firewallRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'firewallRuleName' => firewall_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(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FirewallRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates or updates a firewall rule. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param firewall_rule_name [String] The name of the firewall rule. + # @param parameters [FirewallRule] The required parameters for creating or + # updating a firewall rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [FirewallRule] operation results. + # + def create_or_update(resource_group_name, server_name, firewall_rule_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, firewall_rule_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a firewall rule. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param firewall_rule_name [String] The name of the firewall rule. + # @param parameters [FirewallRule] The required parameters for creating or + # updating a firewall rule. + # @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 create_or_update_with_http_info(resource_group_name, server_name, firewall_rule_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, firewall_rule_name, parameters, custom_headers).value! + end + + # + # Creates or updates a firewall rule. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param firewall_rule_name [String] The name of the firewall rule. + # @param parameters [FirewallRule] The required parameters for creating or + # updating a firewall rule. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_async(resource_group_name, server_name, firewall_rule_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'firewall_rule_name is nil' if firewall_rule_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FirewallRule.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'firewallRuleName' => firewall_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail 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::SQL::Mgmt::V2015_05_01_preview::Models::FirewallRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FirewallRule.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 a firewall rule. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param firewall_rule_name [String] The name of the firewall rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, server_name, firewall_rule_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, firewall_rule_name, custom_headers).value! + nil + end + + # + # Deletes a firewall rule. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param firewall_rule_name [String] The name of the firewall rule. + # @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 delete_with_http_info(resource_group_name, server_name, firewall_rule_name, custom_headers = nil) + delete_async(resource_group_name, server_name, firewall_rule_name, custom_headers).value! + end + + # + # Deletes a firewall rule. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param firewall_rule_name [String] The name of the firewall rule. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, server_name, firewall_rule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'firewall_rule_name is nil' if firewall_rule_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/firewallRules/{firewallRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'firewallRuleName' => firewall_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(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets a list of firewall rules. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @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_server(resource_group_name, server_name, custom_headers = nil) + first_page = list_by_server_as_lazy(resource_group_name, server_name, custom_headers) + first_page.get_all_items + end + + # + # Gets a list of firewall rules. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @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_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! + end + + # + # Gets a list of firewall rules. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @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_server_async(resource_group_name, server_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/firewallRules' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FirewallRuleListResult.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 + + # + # Replaces all firewall rules on the server. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [FirewallRuleList] + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [FirewallRule] operation results. + # + def replace(resource_group_name, server_name, parameters, custom_headers = nil) + response = replace_async(resource_group_name, server_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Replaces all firewall rules on the server. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [FirewallRuleList] + # @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 replace_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil) + replace_async(resource_group_name, server_name, parameters, custom_headers).value! + end + + # + # Replaces all firewall rules on the server. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [FirewallRuleList] + # @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 replace_async(resource_group_name, server_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FirewallRuleList.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FirewallRule.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 firewall rules. + # + # @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 [FirewallRuleListResult] operation results. + # + def list_by_server_next(next_page_link, custom_headers = nil) + response = list_by_server_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a list of firewall rules. + # + # @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_server_next_with_http_info(next_page_link, custom_headers = nil) + list_by_server_next_async(next_page_link, custom_headers).value! + end + + # + # Gets a list of firewall rules. + # + # @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_server_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FirewallRuleListResult.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 firewall rules. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [FirewallRuleListResult] which provide lazy access to pages of the + # response. + # + def list_by_server_as_lazy(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_server_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/managed_instances.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/managed_instances.rb new file mode 100644 index 0000000000..a509cafc55 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/managed_instances.rb @@ -0,0 +1,982 @@ +# 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::SQL::Mgmt::V2015_05_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class ManagedInstances + include MsRestAzure + + # + # Creates and initializes a new instance of the ManagedInstances class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets a list of all managed instances in the subscription. + # + # @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(custom_headers = nil) + first_page = list_as_lazy(custom_headers) + first_page.get_all_items + end + + # + # Gets a list of all managed instances in the subscription. + # + # @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_with_http_info(custom_headers = nil) + list_async(custom_headers).value! + end + + # + # Gets a list of all managed instances in the subscription. + # + # @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_async(custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/managedInstances' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstanceListResult.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 managed instances in a resource group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @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_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 + + # + # Gets a list of managed instances in a resource group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_resource_group_with_http_info(resource_group_name, custom_headers = nil) + list_by_resource_group_async(resource_group_name, custom_headers).value! + end + + # + # Gets a list of managed instances in a resource group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_resource_group_async(resource_group_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/managedInstances' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstanceListResult.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 managed instance. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ManagedInstance] operation results. + # + def get(resource_group_name, managed_instance_name, custom_headers = nil) + response = get_async(resource_group_name, managed_instance_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a managed instance. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, managed_instance_name, custom_headers = nil) + get_async(resource_group_name, managed_instance_name, custom_headers).value! + end + + # + # Gets a managed instance. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, managed_instance_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'managed_instance_name is nil' if managed_instance_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/managedInstances/{managedInstanceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'managedInstanceName' => managed_instance_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstance.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates or updates a managed instance. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param parameters [ManagedInstance] The requested managed instance resource + # state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ManagedInstance] operation results. + # + def create_or_update(resource_group_name, managed_instance_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, managed_instance_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param parameters [ManagedInstance] The requested managed instance resource + # state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(resource_group_name, managed_instance_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, managed_instance_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstance.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes a managed instance. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, managed_instance_name, custom_headers = nil) + response = delete_async(resource_group_name, managed_instance_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, managed_instance_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, managed_instance_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Updates a managed instance. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param parameters [ManagedInstanceUpdate] The requested managed instance + # resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ManagedInstance] operation results. + # + def update(resource_group_name, managed_instance_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, managed_instance_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param parameters [ManagedInstanceUpdate] The requested managed instance + # resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def update_async(resource_group_name, managed_instance_name, parameters, custom_headers = nil) + # Send request + promise = begin_update_async(resource_group_name, managed_instance_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstance.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Creates or updates a managed instance. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param parameters [ManagedInstance] The requested managed instance resource + # state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ManagedInstance] operation results. + # + def begin_create_or_update(resource_group_name, managed_instance_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, managed_instance_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a managed instance. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param parameters [ManagedInstance] The requested managed instance resource + # state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(resource_group_name, managed_instance_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, managed_instance_name, parameters, custom_headers).value! + end + + # + # Creates or updates a managed instance. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param parameters [ManagedInstance] The requested managed instance resource + # state. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(resource_group_name, managed_instance_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'managed_instance_name is nil' if managed_instance_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstance.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'managedInstanceName' => managed_instance_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstance.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstance.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 a managed instance. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(resource_group_name, managed_instance_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, managed_instance_name, custom_headers).value! + nil + end + + # + # Deletes a managed instance. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(resource_group_name, managed_instance_name, custom_headers = nil) + begin_delete_async(resource_group_name, managed_instance_name, custom_headers).value! + end + + # + # Deletes a managed instance. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(resource_group_name, managed_instance_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'managed_instance_name is nil' if managed_instance_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/managedInstances/{managedInstanceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'managedInstanceName' => managed_instance_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Updates a managed instance. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param parameters [ManagedInstanceUpdate] The requested managed instance + # resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ManagedInstance] operation results. + # + def begin_update(resource_group_name, managed_instance_name, parameters, custom_headers = nil) + response = begin_update_async(resource_group_name, managed_instance_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates a managed instance. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param parameters [ManagedInstanceUpdate] The requested managed instance + # resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_update_with_http_info(resource_group_name, managed_instance_name, parameters, custom_headers = nil) + begin_update_async(resource_group_name, managed_instance_name, parameters, custom_headers).value! + end + + # + # Updates a managed instance. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param parameters [ManagedInstanceUpdate] The requested managed instance + # resource state. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_update_async(resource_group_name, managed_instance_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'managed_instance_name is nil' if managed_instance_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstanceUpdate.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'managedInstanceName' => managed_instance_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstance.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 all managed instances in the subscription. + # + # @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 [ManagedInstanceListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a list of all managed instances in the subscription. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets a list of all managed instances in the subscription. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstanceListResult.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 managed instances in a resource group. + # + # @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 [ManagedInstanceListResult] operation results. + # + def list_by_resource_group_next(next_page_link, custom_headers = nil) + response = list_by_resource_group_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a list of managed instances in a resource group. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_resource_group_next_with_http_info(next_page_link, custom_headers = nil) + list_by_resource_group_next_async(next_page_link, custom_headers).value! + end + + # + # Gets a list of managed instances in a resource group. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_resource_group_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstanceListResult.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 all managed instances in the subscription. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ManagedInstanceListResult] which provide lazy access to pages of the + # response. + # + 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) + end + page + end + end + + # + # Gets a list of managed instances in a resource group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ManagedInstanceListResult] 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).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_resource_group_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/advisor.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/advisor.rb index bd665b5390..27727b195e 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/advisor.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/advisor.rb @@ -61,7 +61,6 @@ class Advisor < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Advisor', type: { @@ -69,7 +68,6 @@ def self.mapper() class_name: 'Advisor', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -78,7 +76,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -87,7 +84,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -96,7 +92,6 @@ def self.mapper() } }, kind: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'kind', @@ -105,7 +100,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'location', @@ -114,7 +108,6 @@ def self.mapper() } }, advisor_status: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.advisorStatus', @@ -124,7 +117,6 @@ def self.mapper() } }, auto_execute_status: { - client_side_validation: true, required: true, serialized_name: 'properties.autoExecuteStatus', type: { @@ -133,7 +125,6 @@ def self.mapper() } }, auto_execute_status_inherited_from: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.autoExecuteStatusInheritedFrom', @@ -143,7 +134,6 @@ def self.mapper() } }, recommendations_status: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.recommendationsStatus', @@ -152,7 +142,6 @@ def self.mapper() } }, last_checked: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.lastChecked', @@ -161,14 +150,12 @@ def self.mapper() } }, recommended_actions: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.recommendedActions', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'RecommendedActionElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_disabled_reason.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_disabled_reason.rb new file mode 100644 index 0000000000..1aa0b4b000 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_disabled_reason.rb @@ -0,0 +1,21 @@ +# 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::SQL::Mgmt::V2015_05_01_preview + module Models + # + # Defines values for AutomaticTuningDisabledReason + # + module AutomaticTuningDisabledReason + Default = "Default" + Disabled = "Disabled" + AutoConfigured = "AutoConfigured" + InheritedFromServer = "InheritedFromServer" + QueryStoreOff = "QueryStoreOff" + QueryStoreReadOnly = "QueryStoreReadOnly" + NotSupported = "NotSupported" + end + end +end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_mode.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_mode.rb new file mode 100644 index 0000000000..c53aaaa793 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_mode.rb @@ -0,0 +1,18 @@ +# 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::SQL::Mgmt::V2015_05_01_preview + module Models + # + # Defines values for AutomaticTuningMode + # + module AutomaticTuningMode + Inherit = "Inherit" + Custom = "Custom" + Auto = "Auto" + Unspecified = "Unspecified" + end + end +end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_option_mode_actual.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_option_mode_actual.rb new file mode 100644 index 0000000000..84c322a287 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_option_mode_actual.rb @@ -0,0 +1,16 @@ +# 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::SQL::Mgmt::V2015_05_01_preview + module Models + # + # Defines values for AutomaticTuningOptionModeActual + # + module AutomaticTuningOptionModeActual + Off = "Off" + On = "On" + end + end +end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_option_mode_desired.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_option_mode_desired.rb new file mode 100644 index 0000000000..06f6406b77 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_option_mode_desired.rb @@ -0,0 +1,17 @@ +# 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::SQL::Mgmt::V2015_05_01_preview + module Models + # + # Defines values for AutomaticTuningOptionModeDesired + # + module AutomaticTuningOptionModeDesired + Off = "Off" + On = "On" + Default = "Default" + end + end +end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_options.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_options.rb new file mode 100644 index 0000000000..936497e645 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_options.rb @@ -0,0 +1,86 @@ +# 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::SQL::Mgmt::V2015_05_01_preview + module Models + # + # Automatic tuning properties for individual advisors. + # + class AutomaticTuningOptions + + include MsRestAzure + + # @return [AutomaticTuningOptionModeDesired] Automatic tuning option + # desired state. Possible values include: 'Off', 'On', 'Default' + attr_accessor :desired_state + + # @return [AutomaticTuningOptionModeActual] Automatic tuning option + # actual state. Possible values include: 'Off', 'On' + attr_accessor :actual_state + + # @return [Integer] Reason code if desired and actual state are + # different. + attr_accessor :reason_code + + # @return [AutomaticTuningDisabledReason] Reason description if desired + # and actual state are different. Possible values include: 'Default', + # 'Disabled', 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', + # 'QueryStoreReadOnly', 'NotSupported' + attr_accessor :reason_desc + + + # + # Mapper for AutomaticTuningOptions class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AutomaticTuningOptions', + type: { + name: 'Composite', + class_name: 'AutomaticTuningOptions', + model_properties: { + desired_state: { + required: false, + serialized_name: 'desiredState', + type: { + name: 'Enum', + module: 'AutomaticTuningOptionModeDesired' + } + }, + actual_state: { + required: false, + read_only: true, + serialized_name: 'actualState', + type: { + name: 'Enum', + module: 'AutomaticTuningOptionModeActual' + } + }, + reason_code: { + required: false, + read_only: true, + serialized_name: 'reasonCode', + type: { + name: 'Number' + } + }, + reason_desc: { + required: false, + read_only: true, + serialized_name: 'reasonDesc', + type: { + name: 'Enum', + module: 'AutomaticTuningDisabledReason' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/database_automatic_tuning.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/database_automatic_tuning.rb new file mode 100644 index 0000000000..6371b2a6b6 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/database_automatic_tuning.rb @@ -0,0 +1,102 @@ +# 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::SQL::Mgmt::V2015_05_01_preview + module Models + # + # Database-level Automatic Tuning. + # + class DatabaseAutomaticTuning < ProxyResource + + include MsRestAzure + + # @return [AutomaticTuningMode] Automatic tuning desired state. Possible + # values include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + attr_accessor :desired_state + + # @return [AutomaticTuningMode] Automatic tuning actual state. Possible + # values include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + attr_accessor :actual_state + + # @return [Hash{String => AutomaticTuningOptions}] Automatic tuning + # options definition. + attr_accessor :options + + + # + # Mapper for DatabaseAutomaticTuning class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DatabaseAutomaticTuning', + type: { + name: 'Composite', + class_name: 'DatabaseAutomaticTuning', + 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' + } + }, + desired_state: { + required: false, + serialized_name: 'properties.desiredState', + type: { + name: 'Enum', + module: 'AutomaticTuningMode' + } + }, + actual_state: { + required: false, + read_only: true, + serialized_name: 'properties.actualState', + type: { + name: 'Enum', + module: 'AutomaticTuningMode' + } + }, + options: { + required: false, + serialized_name: 'properties.options', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'AutomaticTuningOptionsElementType', + type: { + name: 'Composite', + class_name: 'AutomaticTuningOptions' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb index e30b811d19..cd577ccd58 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb @@ -33,15 +33,85 @@ class DatabaseBlobAuditingPolicy < ProxyResource # logs. attr_accessor :retention_days - # @return [Array] Specifies the Actions and Actions-Groups to + # @return [Array] Specifies the Actions-Groups and Actions to # audit. + # + # The recommended set of action groups to use is the following + # combination - this will audit all the queries and stored procedures + # executed against the database, as well as successful and failed logins: + # + # BATCH_COMPLETED_GROUP, + # SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + # FAILED_DATABASE_AUTHENTICATION_GROUP. + # + # This above combination is also the set that is configured by default + # when enabling auditing from the Azure portal. + # + # The supported action groups to audit are (note: choose only specific + # groups that cover your auditing needs. Using unnecessary groups could + # lead to very large quantities of audit records): + # + # APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + # BACKUP_RESTORE_GROUP + # DATABASE_LOGOUT_GROUP + # DATABASE_OBJECT_CHANGE_GROUP + # DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + # DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + # DATABASE_OPERATION_GROUP + # DATABASE_PERMISSION_CHANGE_GROUP + # DATABASE_PRINCIPAL_CHANGE_GROUP + # DATABASE_PRINCIPAL_IMPERSONATION_GROUP + # DATABASE_ROLE_MEMBER_CHANGE_GROUP + # FAILED_DATABASE_AUTHENTICATION_GROUP + # SCHEMA_OBJECT_ACCESS_GROUP + # SCHEMA_OBJECT_CHANGE_GROUP + # SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + # SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + # SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + # USER_CHANGE_PASSWORD_GROUP + # BATCH_STARTED_GROUP + # BATCH_COMPLETED_GROUP + # + # These are groups that cover all sql statements and stored procedures + # executed against the database, and should not be used in combination + # with other groups as this will result in duplicate audit logs. + # + # For more information, see [Database-Level Audit Action + # Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + # + # For Database auditing policy, specific Actions can also be specified + # (note that Actions cannot be specified for Server auditing policy). The + # supported actions to audit are: + # SELECT + # UPDATE + # INSERT + # DELETE + # EXECUTE + # RECEIVE + # REFERENCES + # + # The general form for defining an action to be audited is: + # ON BY + # + # Note that in the above format can refer to an object like a + # table, view, or stored procedure, or an entire database or schema. For + # the latter cases, the forms DATABASE:: and + # SCHEMA:: are used, respectively. + # + # For example: + # SELECT on dbo.myTable by public + # SELECT on DATABASE::myDatabase by public + # SELECT on SCHEMA::mySchema by public + # + # For more information, see [Database-Level Audit + # Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) attr_accessor :audit_actions_and_groups # @return Specifies the blob storage subscription Id. attr_accessor :storage_account_subscription_id # @return [Boolean] Specifies whether storageAccountAccessKey value is - # the storage’s secondary key. + # the storage's secondary key. attr_accessor :is_storage_secondary_key_in_use @@ -51,7 +121,6 @@ class DatabaseBlobAuditingPolicy < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'DatabaseBlobAuditingPolicy', type: { @@ -59,7 +128,6 @@ def self.mapper() class_name: 'DatabaseBlobAuditingPolicy', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -68,7 +136,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -77,7 +144,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -86,7 +152,6 @@ def self.mapper() } }, kind: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'kind', @@ -95,7 +160,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: true, serialized_name: 'properties.state', type: { @@ -104,7 +168,6 @@ def self.mapper() } }, storage_endpoint: { - client_side_validation: true, required: false, serialized_name: 'properties.storageEndpoint', type: { @@ -112,7 +175,6 @@ def self.mapper() } }, storage_account_access_key: { - client_side_validation: true, required: false, serialized_name: 'properties.storageAccountAccessKey', type: { @@ -120,7 +182,6 @@ def self.mapper() } }, retention_days: { - client_side_validation: true, required: false, serialized_name: 'properties.retentionDays', type: { @@ -128,13 +189,11 @@ def self.mapper() } }, audit_actions_and_groups: { - client_side_validation: true, required: false, serialized_name: 'properties.auditActionsAndGroups', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -144,7 +203,6 @@ def self.mapper() } }, storage_account_subscription_id: { - client_side_validation: true, required: false, serialized_name: 'properties.storageAccountSubscriptionId', type: { @@ -152,7 +210,6 @@ def self.mapper() } }, is_storage_secondary_key_in_use: { - client_side_validation: true, required: false, serialized_name: 'properties.isStorageSecondaryKeyInUse', type: { diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/encryption_protector.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/encryption_protector.rb index 72b8688afc..10185615eb 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/encryption_protector.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/encryption_protector.rb @@ -43,7 +43,6 @@ class EncryptionProtector < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'EncryptionProtector', type: { @@ -51,7 +50,6 @@ def self.mapper() class_name: 'EncryptionProtector', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -60,7 +58,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -69,7 +66,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -78,7 +74,6 @@ def self.mapper() } }, kind: { - client_side_validation: true, required: false, serialized_name: 'kind', type: { @@ -86,7 +81,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'location', @@ -95,7 +89,6 @@ def self.mapper() } }, subregion: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.subregion', @@ -104,7 +97,6 @@ def self.mapper() } }, server_key_name: { - client_side_validation: true, required: false, serialized_name: 'properties.serverKeyName', type: { @@ -112,7 +104,6 @@ def self.mapper() } }, server_key_type: { - client_side_validation: true, required: true, serialized_name: 'properties.serverKeyType', type: { @@ -120,7 +111,6 @@ def self.mapper() } }, uri: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.uri', @@ -129,7 +119,6 @@ def self.mapper() } }, thumbprint: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.thumbprint', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/encryption_protector_list_result.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/encryption_protector_list_result.rb index 7553083967..e71e771216 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/encryption_protector_list_result.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/encryption_protector_list_result.rb @@ -57,7 +57,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'EncryptionProtectorListResult', type: { @@ -65,14 +64,12 @@ def self.mapper() class_name: 'EncryptionProtectorListResult', 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: 'EncryptionProtectorElementType', type: { @@ -83,7 +80,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'nextLink', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group.rb index 2acb4797c2..eefddaa916 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group.rb @@ -48,7 +48,6 @@ class FailoverGroup < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'FailoverGroup', type: { @@ -56,7 +55,6 @@ def self.mapper() class_name: 'FailoverGroup', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -65,7 +63,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -74,7 +71,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -83,7 +79,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'location', @@ -92,13 +87,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: { @@ -108,7 +101,6 @@ def self.mapper() } }, read_write_endpoint: { - client_side_validation: true, required: true, serialized_name: 'properties.readWriteEndpoint', type: { @@ -117,7 +109,6 @@ def self.mapper() } }, read_only_endpoint: { - client_side_validation: true, required: false, serialized_name: 'properties.readOnlyEndpoint', type: { @@ -126,7 +117,6 @@ def self.mapper() } }, replication_role: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.replicationRole', @@ -135,7 +125,6 @@ def self.mapper() } }, replication_state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.replicationState', @@ -144,13 +133,11 @@ def self.mapper() } }, partner_servers: { - client_side_validation: true, required: true, serialized_name: 'properties.partnerServers', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'PartnerInfoElementType', type: { @@ -161,13 +148,11 @@ def self.mapper() } }, databases: { - client_side_validation: true, required: false, serialized_name: 'properties.databases', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_list_result.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_list_result.rb index 063ac6edf0..dc51a92490 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_list_result.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_list_result.rb @@ -57,7 +57,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'FailoverGroupListResult', type: { @@ -65,14 +64,12 @@ def self.mapper() class_name: 'FailoverGroupListResult', 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: 'FailoverGroupElementType', type: { @@ -83,7 +80,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'nextLink', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_read_only_endpoint.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_read_only_endpoint.rb index 4d06517e70..0768b5750b 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_read_only_endpoint.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_read_only_endpoint.rb @@ -24,7 +24,6 @@ class FailoverGroupReadOnlyEndpoint # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'FailoverGroupReadOnlyEndpoint', type: { @@ -32,7 +31,6 @@ def self.mapper() class_name: 'FailoverGroupReadOnlyEndpoint', model_properties: { failover_policy: { - client_side_validation: true, required: false, serialized_name: 'failoverPolicy', type: { diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_read_write_endpoint.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_read_write_endpoint.rb index d542f7f6a5..b572e252cd 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_read_write_endpoint.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_read_write_endpoint.rb @@ -30,7 +30,6 @@ class FailoverGroupReadWriteEndpoint # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'FailoverGroupReadWriteEndpoint', type: { @@ -38,7 +37,6 @@ def self.mapper() class_name: 'FailoverGroupReadWriteEndpoint', model_properties: { failover_policy: { - client_side_validation: true, required: true, serialized_name: 'failoverPolicy', type: { @@ -46,7 +44,6 @@ def self.mapper() } }, failover_with_data_loss_grace_period_minutes: { - client_side_validation: true, required: false, serialized_name: 'failoverWithDataLossGracePeriodMinutes', type: { diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_update.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_update.rb index 8f78db4a5e..d0f03a5173 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_update.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/failover_group_update.rb @@ -33,7 +33,6 @@ class FailoverGroupUpdate # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'FailoverGroupUpdate', type: { @@ -41,7 +40,6 @@ def self.mapper() class_name: 'FailoverGroupUpdate', model_properties: { read_write_endpoint: { - client_side_validation: true, required: false, serialized_name: 'properties.readWriteEndpoint', type: { @@ -50,7 +48,6 @@ def self.mapper() } }, read_only_endpoint: { - client_side_validation: true, required: false, serialized_name: 'properties.readOnlyEndpoint', type: { @@ -59,13 +56,11 @@ def self.mapper() } }, databases: { - client_side_validation: true, required: false, serialized_name: 'properties.databases', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -75,13 +70,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_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule.rb new file mode 100644 index 0000000000..0eee4cbb81 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule.rb @@ -0,0 +1,80 @@ +# 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::SQL::Mgmt::V2015_05_01_preview + module Models + # + # A server firewall rule. + # + class FirewallRule < ProxyResourceWithWritableName + + include MsRestAzure + + # @return [String] The start IP address of the firewall rule. Must be + # IPv4 format. Use value '0.0.0.0' for all Azure-internal IP addresses. + attr_accessor :start_ip_address + + # @return [String] The end IP address of the firewall rule. Must be IPv4 + # format. Must be greater than or equal to startIpAddress. Use value + # '0.0.0.0' for all Azure-internal IP addresses. + attr_accessor :end_ip_address + + + # + # Mapper for FirewallRule class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FirewallRule', + type: { + name: 'Composite', + class_name: 'FirewallRule', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + start_ip_address: { + required: false, + serialized_name: 'properties.startIpAddress', + type: { + name: 'String' + } + }, + end_ip_address: { + required: false, + serialized_name: 'properties.endIpAddress', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule_list.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule_list.rb new file mode 100644 index 0000000000..bfbc216ba4 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule_list.rb @@ -0,0 +1,52 @@ +# 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::SQL::Mgmt::V2015_05_01_preview + module Models + # + # A list of server firewall rules. + # + class FirewallRuleList + + include MsRestAzure + + # @return [Array] + attr_accessor :values + + + # + # Mapper for FirewallRuleList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FirewallRuleList', + type: { + name: 'Composite', + class_name: 'FirewallRuleList', + model_properties: { + values: { + required: false, + serialized_name: 'values', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'FirewallRuleElementType', + type: { + name: 'Composite', + class_name: 'FirewallRule' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule_list_result.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule_list_result.rb new file mode 100644 index 0000000000..609acf8b4b --- /dev/null +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule_list_result.rb @@ -0,0 +1,96 @@ +# 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::SQL::Mgmt::V2015_05_01_preview + module Models + # + # The response to a list firewall rules request + # + class FirewallRuleListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Array of results. + attr_accessor :value + + # @return [String] Link to retrieve next page of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [FirewallRuleListResult] 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 FirewallRuleListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FirewallRuleListResult', + type: { + name: 'Composite', + class_name: 'FirewallRuleListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'FirewallRuleElementType', + type: { + name: 'Composite', + class_name: 'FirewallRule' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance.rb new file mode 100644 index 0000000000..ca4610a904 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance.rb @@ -0,0 +1,189 @@ +# 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::SQL::Mgmt::V2015_05_01_preview + module Models + # + # An Azure SQL managed instance. + # + class ManagedInstance < TrackedResource + + include MsRestAzure + + # @return [ResourceIdentity] The Azure Active Directory identity of the + # managed instance. + attr_accessor :identity + + # @return [Sku] Managed instance sku + attr_accessor :sku + + # @return [String] The fully qualified domain name of the managed + # instance. + attr_accessor :fully_qualified_domain_name + + # @return [String] Administrator username for the managed instance. Can + # only be specified when the managed instance is being created (and is + # required for creation). + attr_accessor :administrator_login + + # @return [String] The administrator login password (required for managed + # instance creation). + attr_accessor :administrator_login_password + + # @return [String] Subnet resource ID for the managed instance. + attr_accessor :subnet_id + + # @return [String] The state of the managed instance. + attr_accessor :state + + # @return [String] The license type. Possible values are + # 'LicenseIncluded' and 'BasePrice'. + attr_accessor :license_type + + # @return [Integer] The number of VCores. + attr_accessor :v_cores + + # @return [Integer] The maximum storage size in GB. + attr_accessor :storage_size_in_gb + + + # + # Mapper for ManagedInstance class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ManagedInstance', + type: { + name: 'Composite', + class_name: 'ManagedInstance', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + identity: { + required: false, + serialized_name: 'identity', + type: { + name: 'Composite', + class_name: 'ResourceIdentity' + } + }, + sku: { + required: false, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + }, + fully_qualified_domain_name: { + required: false, + read_only: true, + serialized_name: 'properties.fullyQualifiedDomainName', + type: { + name: 'String' + } + }, + administrator_login: { + required: false, + serialized_name: 'properties.administratorLogin', + type: { + name: 'String' + } + }, + administrator_login_password: { + required: false, + serialized_name: 'properties.administratorLoginPassword', + type: { + name: 'String' + } + }, + subnet_id: { + required: false, + serialized_name: 'properties.subnetId', + type: { + name: 'String' + } + }, + state: { + required: false, + read_only: true, + serialized_name: 'properties.state', + type: { + name: 'String' + } + }, + license_type: { + required: false, + serialized_name: 'properties.licenseType', + type: { + name: 'String' + } + }, + v_cores: { + required: false, + serialized_name: 'properties.vCores', + type: { + name: 'Number' + } + }, + storage_size_in_gb: { + required: false, + serialized_name: 'properties.storageSizeInGB', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance_list_result.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance_list_result.rb new file mode 100644 index 0000000000..36b6e4dde5 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance_list_result.rb @@ -0,0 +1,96 @@ +# 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::SQL::Mgmt::V2015_05_01_preview + module Models + # + # A list of managed instances. + # + class ManagedInstanceListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Array of results. + attr_accessor :value + + # @return [String] Link to retrieve next page of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [ManagedInstanceListResult] 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 ManagedInstanceListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ManagedInstanceListResult', + type: { + name: 'Composite', + class_name: 'ManagedInstanceListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ManagedInstanceElementType', + type: { + name: 'Composite', + class_name: 'ManagedInstance' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance_update.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance_update.rb new file mode 100644 index 0000000000..7ce6dcc015 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance_update.rb @@ -0,0 +1,149 @@ +# 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::SQL::Mgmt::V2015_05_01_preview + module Models + # + # An update request for an Azure SQL Database managed instance. + # + class ManagedInstanceUpdate + + include MsRestAzure + + # @return [Sku] Managed instance sku + attr_accessor :sku + + # @return [String] The fully qualified domain name of the managed + # instance. + attr_accessor :fully_qualified_domain_name + + # @return [String] Administrator username for the managed instance. Can + # only be specified when the managed instance is being created (and is + # required for creation). + attr_accessor :administrator_login + + # @return [String] The administrator login password (required for managed + # instance creation). + attr_accessor :administrator_login_password + + # @return [String] Subnet resource ID for the managed instance. + attr_accessor :subnet_id + + # @return [String] The state of the managed instance. + attr_accessor :state + + # @return [String] The license type. Possible values are + # 'LicenseIncluded' and 'BasePrice'. + attr_accessor :license_type + + # @return [Integer] The number of VCores. + attr_accessor :v_cores + + # @return [Integer] The maximum storage size in GB. + attr_accessor :storage_size_in_gb + + # @return [Hash{String => String}] Resource tags. + attr_accessor :tags + + + # + # Mapper for ManagedInstanceUpdate class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ManagedInstanceUpdate', + type: { + name: 'Composite', + class_name: 'ManagedInstanceUpdate', + model_properties: { + sku: { + required: false, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + }, + fully_qualified_domain_name: { + required: false, + read_only: true, + serialized_name: 'properties.fullyQualifiedDomainName', + type: { + name: 'String' + } + }, + administrator_login: { + required: false, + serialized_name: 'properties.administratorLogin', + type: { + name: 'String' + } + }, + administrator_login_password: { + required: false, + serialized_name: 'properties.administratorLoginPassword', + type: { + name: 'String' + } + }, + subnet_id: { + required: false, + serialized_name: 'properties.subnetId', + type: { + name: 'String' + } + }, + state: { + required: false, + read_only: true, + serialized_name: 'properties.state', + type: { + name: 'String' + } + }, + license_type: { + required: false, + serialized_name: 'properties.licenseType', + type: { + name: 'String' + } + }, + v_cores: { + required: false, + serialized_name: 'properties.vCores', + type: { + name: 'Number' + } + }, + storage_size_in_gb: { + required: false, + serialized_name: 'properties.storageSizeInGB', + type: { + name: 'Number' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/operation.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/operation.rb index d028b90144..c0f6fde3cc 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/operation.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/operation.rb @@ -34,7 +34,6 @@ class Operation # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Operation', type: { @@ -42,7 +41,6 @@ def self.mapper() class_name: 'Operation', model_properties: { name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -51,7 +49,6 @@ def self.mapper() } }, display: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'display', @@ -61,7 +58,6 @@ def self.mapper() } }, origin: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'origin', @@ -70,14 +66,12 @@ def self.mapper() } }, properties: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'ObjectElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/operation_display.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/operation_display.rb index 1ba4e6d073..99febef724 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/operation_display.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/operation_display.rb @@ -33,7 +33,6 @@ class OperationDisplay # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OperationDisplay', type: { @@ -41,7 +40,6 @@ def self.mapper() class_name: 'OperationDisplay', model_properties: { provider: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'provider', @@ -50,7 +48,6 @@ def self.mapper() } }, resource: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'resource', @@ -59,7 +56,6 @@ def self.mapper() } }, operation: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'operation', @@ -68,7 +64,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'description', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/operation_list_result.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/operation_list_result.rb index 924f7fdaf9..bb793e3f3e 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/operation_list_result.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/operation_list_result.rb @@ -57,7 +57,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OperationListResult', type: { @@ -65,14 +64,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: { @@ -83,7 +80,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'nextLink', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/partner_info.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/partner_info.rb index 0dd3b3452b..bd4c0ec78a 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/partner_info.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/partner_info.rb @@ -29,7 +29,6 @@ class PartnerInfo # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'PartnerInfo', type: { @@ -37,7 +36,6 @@ def self.mapper() class_name: 'PartnerInfo', model_properties: { id: { - client_side_validation: true, required: true, serialized_name: 'id', type: { @@ -45,7 +43,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'location', @@ -54,7 +51,6 @@ def self.mapper() } }, replication_role: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'replicationRole', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/proxy_resource.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/proxy_resource.rb index 1868f73915..2594184e80 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/proxy_resource.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/proxy_resource.rb @@ -19,7 +19,6 @@ class ProxyResource < Resource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ProxyResource', type: { @@ -27,7 +26,6 @@ def self.mapper() class_name: 'ProxyResource', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -36,7 +34,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -45,7 +42,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/proxy_resource_with_writable_name.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/proxy_resource_with_writable_name.rb new file mode 100644 index 0000000000..3240445ade --- /dev/null +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/proxy_resource_with_writable_name.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::SQL::Mgmt::V2015_05_01_preview + module Models + # + # ARM proxy resource. + # + class ProxyResourceWithWritableName < ResourceWithWritableName + + include MsRestAzure + + + # + # Mapper for ProxyResourceWithWritableName class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProxyResourceWithWritableName', + type: { + name: 'Composite', + class_name: 'ProxyResourceWithWritableName', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action.rb index f80037877c..cc1ec0d206 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action.rb @@ -123,7 +123,6 @@ class RecommendedAction < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RecommendedAction', type: { @@ -131,7 +130,6 @@ def self.mapper() class_name: 'RecommendedAction', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -140,7 +138,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -149,7 +146,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -158,7 +154,6 @@ def self.mapper() } }, kind: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'kind', @@ -167,7 +162,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'location', @@ -176,7 +170,6 @@ def self.mapper() } }, recommendation_reason: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.recommendationReason', @@ -185,7 +178,6 @@ def self.mapper() } }, valid_since: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.validSince', @@ -194,7 +186,6 @@ def self.mapper() } }, last_refresh: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.lastRefresh', @@ -203,7 +194,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: true, serialized_name: 'properties.state', type: { @@ -212,7 +202,6 @@ def self.mapper() } }, is_executable_action: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.isExecutableAction', @@ -221,7 +210,6 @@ def self.mapper() } }, is_revertable_action: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.isRevertableAction', @@ -230,7 +218,6 @@ def self.mapper() } }, is_archived_action: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.isArchivedAction', @@ -239,7 +226,6 @@ def self.mapper() } }, execute_action_start_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.executeActionStartTime', @@ -248,7 +234,6 @@ def self.mapper() } }, execute_action_duration: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.executeActionDuration', @@ -257,7 +242,6 @@ def self.mapper() } }, revert_action_start_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.revertActionStartTime', @@ -266,7 +250,6 @@ def self.mapper() } }, revert_action_duration: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.revertActionDuration', @@ -275,7 +258,6 @@ def self.mapper() } }, execute_action_initiated_by: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.executeActionInitiatedBy', @@ -285,7 +267,6 @@ def self.mapper() } }, execute_action_initiated_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.executeActionInitiatedTime', @@ -294,7 +275,6 @@ def self.mapper() } }, revert_action_initiated_by: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.revertActionInitiatedBy', @@ -304,7 +284,6 @@ def self.mapper() } }, revert_action_initiated_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.revertActionInitiatedTime', @@ -313,7 +292,6 @@ def self.mapper() } }, score: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.score', @@ -322,7 +300,6 @@ def self.mapper() } }, implementation_details: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.implementationDetails', @@ -332,7 +309,6 @@ def self.mapper() } }, error_details: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.errorDetails', @@ -342,14 +318,12 @@ def self.mapper() } }, estimated_impact: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.estimatedImpact', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'RecommendedActionImpactRecordElementType', type: { @@ -360,14 +334,12 @@ def self.mapper() } }, observed_impact: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.observedImpact', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'RecommendedActionImpactRecordElementType', type: { @@ -378,14 +350,12 @@ def self.mapper() } }, time_series: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.timeSeries', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'RecommendedActionMetricInfoElementType', type: { @@ -396,14 +366,12 @@ def self.mapper() } }, linked_objects: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.linkedObjects', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -413,14 +381,12 @@ def self.mapper() } }, details: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.details', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'ObjectElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_error_info.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_error_info.rb index bc4b39cf7d..5b6a2335eb 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_error_info.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_error_info.rb @@ -29,7 +29,6 @@ class RecommendedActionErrorInfo # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RecommendedActionErrorInfo', type: { @@ -37,7 +36,6 @@ def self.mapper() class_name: 'RecommendedActionErrorInfo', model_properties: { error_code: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'errorCode', @@ -46,7 +44,6 @@ def self.mapper() } }, is_retryable: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'isRetryable', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_impact_record.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_impact_record.rb index 8278a4e169..b8393f89c4 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_impact_record.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_impact_record.rb @@ -40,7 +40,6 @@ class RecommendedActionImpactRecord # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RecommendedActionImpactRecord', type: { @@ -48,7 +47,6 @@ def self.mapper() class_name: 'RecommendedActionImpactRecord', model_properties: { dimension_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'dimensionName', @@ -57,7 +55,6 @@ def self.mapper() } }, unit: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'unit', @@ -66,7 +63,6 @@ def self.mapper() } }, absolute_value: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'absoluteValue', @@ -75,7 +71,6 @@ def self.mapper() } }, change_value_absolute: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'changeValueAbsolute', @@ -84,7 +79,6 @@ def self.mapper() } }, change_value_relative: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'changeValueRelative', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_implementation_info.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_implementation_info.rb index 6509a996f3..89920382ac 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_implementation_info.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_implementation_info.rb @@ -29,7 +29,6 @@ class RecommendedActionImplementationInfo # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RecommendedActionImplementationInfo', type: { @@ -37,7 +36,6 @@ def self.mapper() class_name: 'RecommendedActionImplementationInfo', model_properties: { method: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'method', @@ -47,7 +45,6 @@ def self.mapper() } }, script: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'script', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_metric_info.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_metric_info.rb index d5f2242eb4..68747908ee 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_metric_info.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_metric_info.rb @@ -40,7 +40,6 @@ class RecommendedActionMetricInfo # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RecommendedActionMetricInfo', type: { @@ -48,7 +47,6 @@ def self.mapper() class_name: 'RecommendedActionMetricInfo', model_properties: { metric_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'metricName', @@ -57,7 +55,6 @@ def self.mapper() } }, unit: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'unit', @@ -66,7 +63,6 @@ def self.mapper() } }, time_grain: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'timeGrain', @@ -75,7 +71,6 @@ def self.mapper() } }, start_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'startTime', @@ -84,7 +79,6 @@ def self.mapper() } }, value: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'value', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_state_info.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_state_info.rb index 98eb56bae3..9e6609c8bb 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_state_info.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/recommended_action_state_info.rb @@ -49,7 +49,6 @@ class RecommendedActionStateInfo # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RecommendedActionStateInfo', type: { @@ -57,7 +56,6 @@ def self.mapper() class_name: 'RecommendedActionStateInfo', model_properties: { current_value: { - client_side_validation: true, required: true, serialized_name: 'currentValue', type: { @@ -65,7 +63,6 @@ def self.mapper() } }, action_initiated_by: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'actionInitiatedBy', @@ -75,7 +72,6 @@ def self.mapper() } }, last_modified: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'lastModified', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/resource.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/resource.rb index 9998dcc33e..ee6f19db95 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/resource.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/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_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/resource_identity.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/resource_identity.rb index 0de045b20f..c1b621aaea 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/resource_identity.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/resource_identity.rb @@ -30,7 +30,6 @@ class ResourceIdentity # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ResourceIdentity', type: { @@ -38,7 +37,6 @@ def self.mapper() class_name: 'ResourceIdentity', model_properties: { principal_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'principalId', @@ -47,7 +45,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, serialized_name: 'type', type: { @@ -55,7 +52,6 @@ def self.mapper() } }, tenant_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'tenantId', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/resource_with_writable_name.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/resource_with_writable_name.rb new file mode 100644 index 0000000000..8c91a06ad0 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/resource_with_writable_name.rb @@ -0,0 +1,66 @@ +# 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::SQL::Mgmt::V2015_05_01_preview + module Models + # + # ARM resource. + # + class ResourceWithWritableName + + include MsRestAzure + + # @return [String] Resource ID. + attr_accessor :id + + # @return [String] Resource name. + attr_accessor :name + + # @return [String] Resource type. + attr_accessor :type + + + # + # Mapper for ResourceWithWritableName class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ResourceWithWritableName', + type: { + name: 'Composite', + class_name: 'ResourceWithWritableName', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/server.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/server.rb index 0a8de91f5c..997154cbae 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/server.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/server.rb @@ -44,7 +44,6 @@ class Server < TrackedResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Server', type: { @@ -52,7 +51,6 @@ def self.mapper() class_name: 'Server', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -61,7 +59,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -70,7 +67,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -79,7 +75,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: true, serialized_name: 'location', type: { @@ -87,13 +82,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: { @@ -103,7 +96,6 @@ def self.mapper() } }, identity: { - client_side_validation: true, required: false, serialized_name: 'identity', type: { @@ -112,7 +104,6 @@ def self.mapper() } }, kind: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'kind', @@ -121,7 +112,6 @@ def self.mapper() } }, administrator_login: { - client_side_validation: true, required: false, serialized_name: 'properties.administratorLogin', type: { @@ -129,7 +119,6 @@ def self.mapper() } }, administrator_login_password: { - client_side_validation: true, required: false, serialized_name: 'properties.administratorLoginPassword', type: { @@ -137,7 +126,6 @@ def self.mapper() } }, version: { - client_side_validation: true, required: false, serialized_name: 'properties.version', type: { @@ -145,7 +133,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.state', @@ -154,7 +141,6 @@ def self.mapper() } }, fully_qualified_domain_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.fullyQualifiedDomainName', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/server_key.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/server_key.rb index 9424babbd7..fa37bc05df 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/server_key.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/server_key.rb @@ -43,7 +43,6 @@ class ServerKey < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServerKey', type: { @@ -51,7 +50,6 @@ def self.mapper() class_name: 'ServerKey', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -60,7 +58,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -69,7 +66,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -78,7 +74,6 @@ def self.mapper() } }, kind: { - client_side_validation: true, required: false, serialized_name: 'kind', type: { @@ -86,7 +81,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'location', @@ -95,7 +89,6 @@ def self.mapper() } }, subregion: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.subregion', @@ -104,7 +97,6 @@ def self.mapper() } }, server_key_type: { - client_side_validation: true, required: true, serialized_name: 'properties.serverKeyType', type: { @@ -112,7 +104,6 @@ def self.mapper() } }, uri: { - client_side_validation: true, required: false, serialized_name: 'properties.uri', type: { @@ -120,7 +111,6 @@ def self.mapper() } }, thumbprint: { - client_side_validation: true, required: false, serialized_name: 'properties.thumbprint', type: { @@ -128,7 +118,6 @@ def self.mapper() } }, creation_date: { - client_side_validation: true, required: false, serialized_name: 'properties.creationDate', type: { diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/server_key_list_result.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/server_key_list_result.rb index 0edd01c926..ea140f1f71 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/server_key_list_result.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/server_key_list_result.rb @@ -57,7 +57,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServerKeyListResult', type: { @@ -65,14 +64,12 @@ def self.mapper() class_name: 'ServerKeyListResult', 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: 'ServerKeyElementType', type: { @@ -83,7 +80,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'nextLink', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/server_list_result.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/server_list_result.rb index cf91dd87ef..f4eac34dae 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/server_list_result.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/server_list_result.rb @@ -57,7 +57,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServerListResult', type: { @@ -65,14 +64,12 @@ def self.mapper() class_name: 'ServerListResult', 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: 'ServerElementType', type: { @@ -83,7 +80,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'nextLink', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/server_update.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/server_update.rb index 34b0950c63..09e3fe402e 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/server_update.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/server_update.rb @@ -39,7 +39,6 @@ class ServerUpdate # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServerUpdate', type: { @@ -47,7 +46,6 @@ def self.mapper() class_name: 'ServerUpdate', model_properties: { administrator_login: { - client_side_validation: true, required: false, serialized_name: 'properties.administratorLogin', type: { @@ -55,7 +53,6 @@ def self.mapper() } }, administrator_login_password: { - client_side_validation: true, required: false, serialized_name: 'properties.administratorLoginPassword', type: { @@ -63,7 +60,6 @@ def self.mapper() } }, version: { - client_side_validation: true, required: false, serialized_name: 'properties.version', type: { @@ -71,7 +67,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.state', @@ -80,7 +75,6 @@ def self.mapper() } }, fully_qualified_domain_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.fullyQualifiedDomainName', @@ -89,13 +83,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_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sku.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sku.rb new file mode 100644 index 0000000000..e6fd170bac --- /dev/null +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sku.rb @@ -0,0 +1,91 @@ +# 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::SQL::Mgmt::V2015_05_01_preview + module Models + # + # The resource model definition representing SKU + # + class Sku + + include MsRestAzure + + # @return [String] The name of the SKU. Ex - P3. It is typically a + # letter+number code + attr_accessor :name + + # @return [String] This field is required to be implemented by the + # Resource Provider if the service has more than one tier, but is not + # required on a PUT. + attr_accessor :tier + + # @return [String] The SKU size. When the name field is the combination + # of tier and some other value, this would be the standalone code. + attr_accessor :size + + # @return [String] If the service has different generations of hardware, + # for the same SKU, then that can be captured here. + attr_accessor :family + + # @return [Integer] If the SKU supports scale out/in then the capacity + # integer should be included. If scale out/in is not possible for the + # resource this may be omitted. + attr_accessor :capacity + + + # + # Mapper for Sku class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Sku', + type: { + name: 'Composite', + class_name: 'Sku', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + tier: { + required: false, + serialized_name: 'tier', + type: { + name: 'String' + } + }, + size: { + required: false, + serialized_name: 'size', + type: { + name: 'String' + } + }, + family: { + required: false, + serialized_name: 'family', + type: { + name: 'String' + } + }, + capacity: { + required: false, + serialized_name: 'capacity', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/subscription_usage.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/subscription_usage.rb index 34630857f2..7a2b791a34 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/subscription_usage.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/subscription_usage.rb @@ -31,7 +31,6 @@ class SubscriptionUsage < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SubscriptionUsage', type: { @@ -39,7 +38,6 @@ def self.mapper() class_name: 'SubscriptionUsage', 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() } }, display_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.displayName', @@ -75,7 +70,6 @@ def self.mapper() } }, current_value: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.currentValue', @@ -84,7 +78,6 @@ def self.mapper() } }, limit: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.limit', @@ -93,7 +86,6 @@ def self.mapper() } }, unit: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.unit', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/subscription_usage_list_result.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/subscription_usage_list_result.rb index 6ad643d3d0..5f02318266 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/subscription_usage_list_result.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/subscription_usage_list_result.rb @@ -57,7 +57,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SubscriptionUsageListResult', type: { @@ -65,14 +64,12 @@ def self.mapper() class_name: 'SubscriptionUsageListResult', 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: 'SubscriptionUsageElementType', type: { @@ -83,7 +80,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'nextLink', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent.rb index 713b9f7747..ed6bf3c7be 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent.rb @@ -42,7 +42,6 @@ class SyncAgent < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SyncAgent', type: { @@ -50,7 +49,6 @@ def self.mapper() class_name: 'SyncAgent', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -59,7 +57,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -68,7 +65,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -77,7 +73,6 @@ def self.mapper() } }, sync_agent_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.name', @@ -86,7 +81,6 @@ def self.mapper() } }, sync_database_id: { - client_side_validation: true, required: false, serialized_name: 'properties.syncDatabaseId', type: { @@ -94,7 +88,6 @@ def self.mapper() } }, last_alive_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.lastAliveTime', @@ -103,7 +96,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.state', @@ -112,7 +104,6 @@ def self.mapper() } }, is_up_to_date: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.isUpToDate', @@ -121,7 +112,6 @@ def self.mapper() } }, expiry_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.expiryTime', @@ -130,7 +120,6 @@ def self.mapper() } }, version: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.version', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent_key_properties.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent_key_properties.rb index 77bebd68b9..0bbb58bcc4 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent_key_properties.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent_key_properties.rb @@ -22,7 +22,6 @@ class SyncAgentKeyProperties # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SyncAgentKeyProperties', type: { @@ -30,7 +29,6 @@ def self.mapper() class_name: 'SyncAgentKeyProperties', model_properties: { sync_agent_key: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'syncAgentKey', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent_linked_database.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent_linked_database.rb index ebf42a31d6..f5d12283eb 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent_linked_database.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent_linked_database.rb @@ -38,7 +38,6 @@ class SyncAgentLinkedDatabase < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SyncAgentLinkedDatabase', type: { @@ -46,7 +45,6 @@ def self.mapper() class_name: 'SyncAgentLinkedDatabase', 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() } }, database_type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.databaseType', @@ -82,7 +77,6 @@ def self.mapper() } }, database_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.databaseId', @@ -91,7 +85,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.description', @@ -100,7 +93,6 @@ def self.mapper() } }, server_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.serverName', @@ -109,7 +101,6 @@ def self.mapper() } }, database_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.databaseName', @@ -118,7 +109,6 @@ def self.mapper() } }, user_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.userName', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent_linked_database_list_result.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent_linked_database_list_result.rb index 853f0e8fe6..862cb3bc9d 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent_linked_database_list_result.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent_linked_database_list_result.rb @@ -57,7 +57,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SyncAgentLinkedDatabaseListResult', type: { @@ -65,14 +64,12 @@ def self.mapper() class_name: 'SyncAgentLinkedDatabaseListResult', 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: 'SyncAgentLinkedDatabaseElementType', type: { @@ -83,7 +80,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'nextLink', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent_list_result.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent_list_result.rb index 1f15b7c461..628f8ca3b7 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent_list_result.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_agent_list_result.rb @@ -57,7 +57,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SyncAgentListResult', type: { @@ -65,14 +64,12 @@ def self.mapper() class_name: 'SyncAgentListResult', 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: 'SyncAgentElementType', type: { @@ -83,7 +80,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'nextLink', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_database_id_list_result.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_database_id_list_result.rb index 69131812f3..37f1ca7232 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_database_id_list_result.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_database_id_list_result.rb @@ -57,7 +57,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SyncDatabaseIdListResult', type: { @@ -65,14 +64,12 @@ def self.mapper() class_name: 'SyncDatabaseIdListResult', 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: 'SyncDatabaseIdPropertiesElementType', type: { @@ -83,7 +80,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'nextLink', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_database_id_properties.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_database_id_properties.rb index b824d4a2db..bcf48ad6d2 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_database_id_properties.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_database_id_properties.rb @@ -22,7 +22,6 @@ class SyncDatabaseIdProperties # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SyncDatabaseIdProperties', type: { @@ -30,7 +29,6 @@ def self.mapper() class_name: 'SyncDatabaseIdProperties', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_properties.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_properties.rb index 39170ecd81..87d1b47968 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_properties.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_properties.rb @@ -26,7 +26,6 @@ class SyncFullSchemaProperties # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SyncFullSchemaProperties', type: { @@ -34,14 +33,12 @@ def self.mapper() class_name: 'SyncFullSchemaProperties', model_properties: { tables: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'tables', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'SyncFullSchemaTableElementType', type: { @@ -52,7 +49,6 @@ def self.mapper() } }, last_update_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'lastUpdateTime', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_properties_list_result.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_properties_list_result.rb index 39a58795b4..b50f886a4f 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_properties_list_result.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_properties_list_result.rb @@ -57,7 +57,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SyncFullSchemaPropertiesListResult', type: { @@ -65,14 +64,12 @@ def self.mapper() class_name: 'SyncFullSchemaPropertiesListResult', 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: 'SyncFullSchemaPropertiesElementType', type: { @@ -83,7 +80,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'nextLink', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_table.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_table.rb index c88075dfda..68e3cf96c5 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_table.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_table.rb @@ -35,7 +35,6 @@ class SyncFullSchemaTable # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SyncFullSchemaTable', type: { @@ -43,14 +42,12 @@ def self.mapper() class_name: 'SyncFullSchemaTable', model_properties: { columns: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'columns', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'SyncFullSchemaTableColumnElementType', type: { @@ -61,7 +58,6 @@ def self.mapper() } }, error_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'errorId', @@ -70,7 +66,6 @@ def self.mapper() } }, has_error: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'hasError', @@ -79,7 +74,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -88,7 +82,6 @@ def self.mapper() } }, quoted_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'quotedName', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_table_column.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_table_column.rb index a072d422e1..a90575f0b7 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_table_column.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_full_schema_table_column.rb @@ -40,7 +40,6 @@ class SyncFullSchemaTableColumn # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SyncFullSchemaTableColumn', type: { @@ -48,7 +47,6 @@ def self.mapper() class_name: 'SyncFullSchemaTableColumn', model_properties: { data_size: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'dataSize', @@ -57,7 +55,6 @@ def self.mapper() } }, data_type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'dataType', @@ -66,7 +63,6 @@ def self.mapper() } }, error_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'errorId', @@ -75,7 +71,6 @@ def self.mapper() } }, has_error: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'hasError', @@ -84,7 +79,6 @@ def self.mapper() } }, is_primary_key: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'isPrimaryKey', @@ -93,7 +87,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -102,7 +95,6 @@ def self.mapper() } }, quoted_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'quotedName', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group.rb index cb10ed6446..34b5cf31c8 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group.rb @@ -46,7 +46,6 @@ class SyncGroup < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SyncGroup', type: { @@ -54,7 +53,6 @@ def self.mapper() class_name: 'SyncGroup', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -63,7 +61,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -72,7 +69,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -81,7 +77,6 @@ def self.mapper() } }, interval: { - client_side_validation: true, required: false, serialized_name: 'properties.interval', type: { @@ -89,7 +84,6 @@ def self.mapper() } }, last_sync_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.lastSyncTime', @@ -98,7 +92,6 @@ def self.mapper() } }, conflict_resolution_policy: { - client_side_validation: true, required: false, serialized_name: 'properties.conflictResolutionPolicy', type: { @@ -106,7 +99,6 @@ def self.mapper() } }, sync_database_id: { - client_side_validation: true, required: false, serialized_name: 'properties.syncDatabaseId', type: { @@ -114,7 +106,6 @@ def self.mapper() } }, hub_database_user_name: { - client_side_validation: true, required: false, serialized_name: 'properties.hubDatabaseUserName', type: { @@ -122,7 +113,6 @@ def self.mapper() } }, hub_database_password: { - client_side_validation: true, required: false, serialized_name: 'properties.hubDatabasePassword', type: { @@ -130,7 +120,6 @@ def self.mapper() } }, sync_state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.syncState', @@ -139,7 +128,6 @@ def self.mapper() } }, schema: { - client_side_validation: true, required: false, serialized_name: 'properties.schema', type: { diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_list_result.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_list_result.rb index d73413aa4d..96741de6d6 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_list_result.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_list_result.rb @@ -57,7 +57,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SyncGroupListResult', type: { @@ -65,14 +64,12 @@ def self.mapper() class_name: 'SyncGroupListResult', 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: 'SyncGroupElementType', type: { @@ -83,7 +80,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'nextLink', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_log_list_result.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_log_list_result.rb index c1e67336b8..2eb410870d 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_log_list_result.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_log_list_result.rb @@ -57,7 +57,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SyncGroupLogListResult', type: { @@ -65,14 +64,12 @@ def self.mapper() class_name: 'SyncGroupLogListResult', 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: 'SyncGroupLogPropertiesElementType', type: { @@ -83,7 +80,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'nextLink', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_log_properties.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_log_properties.rb index df689b0dee..ff52b2bab1 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_log_properties.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_log_properties.rb @@ -38,7 +38,6 @@ class SyncGroupLogProperties # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SyncGroupLogProperties', type: { @@ -46,7 +45,6 @@ def self.mapper() class_name: 'SyncGroupLogProperties', model_properties: { timestamp: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'timestamp', @@ -55,7 +53,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -64,7 +61,6 @@ def self.mapper() } }, source: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'source', @@ -73,7 +69,6 @@ def self.mapper() } }, details: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'details', @@ -82,7 +77,6 @@ def self.mapper() } }, tracing_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'tracingId', @@ -91,7 +85,6 @@ def self.mapper() } }, operation_status: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'operationStatus', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_schema.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_schema.rb index 3caa180f5f..0fe019a698 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_schema.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_schema.rb @@ -26,7 +26,6 @@ class SyncGroupSchema # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SyncGroupSchema', type: { @@ -34,13 +33,11 @@ def self.mapper() class_name: 'SyncGroupSchema', model_properties: { tables: { - client_side_validation: true, required: false, serialized_name: 'tables', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'SyncGroupSchemaTableElementType', type: { @@ -51,7 +48,6 @@ def self.mapper() } }, master_sync_member_name: { - client_side_validation: true, required: false, serialized_name: 'masterSyncMemberName', type: { diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_schema_table.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_schema_table.rb index bc70c867a6..18b44d41f0 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_schema_table.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_schema_table.rb @@ -26,7 +26,6 @@ class SyncGroupSchemaTable # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SyncGroupSchemaTable', type: { @@ -34,13 +33,11 @@ def self.mapper() class_name: 'SyncGroupSchemaTable', model_properties: { columns: { - client_side_validation: true, required: false, serialized_name: 'columns', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'SyncGroupSchemaTableColumnElementType', type: { @@ -51,7 +48,6 @@ def self.mapper() } }, quoted_name: { - client_side_validation: true, required: false, serialized_name: 'quotedName', type: { diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_schema_table_column.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_schema_table_column.rb index b19900e3ff..ede0b49265 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_schema_table_column.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_group_schema_table_column.rb @@ -28,7 +28,6 @@ class SyncGroupSchemaTableColumn # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SyncGroupSchemaTableColumn', type: { @@ -36,7 +35,6 @@ def self.mapper() class_name: 'SyncGroupSchemaTableColumn', model_properties: { quoted_name: { - client_side_validation: true, required: false, serialized_name: 'quotedName', type: { @@ -44,7 +42,6 @@ def self.mapper() } }, data_size: { - client_side_validation: true, required: false, serialized_name: 'dataSize', type: { @@ -52,7 +49,6 @@ def self.mapper() } }, data_type: { - client_side_validation: true, required: false, serialized_name: 'dataType', type: { diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_member.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_member.rb index edeb6cc79f..9268d97a6b 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_member.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_member.rb @@ -56,7 +56,6 @@ class SyncMember < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SyncMember', type: { @@ -64,7 +63,6 @@ def self.mapper() class_name: 'SyncMember', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -73,7 +71,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -82,7 +79,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -91,7 +87,6 @@ def self.mapper() } }, database_type: { - client_side_validation: true, required: false, serialized_name: 'properties.databaseType', type: { @@ -99,7 +94,6 @@ def self.mapper() } }, sync_agent_id: { - client_side_validation: true, required: false, serialized_name: 'properties.syncAgentId', type: { @@ -107,7 +101,6 @@ def self.mapper() } }, sql_server_database_id: { - client_side_validation: true, required: false, serialized_name: 'properties.sqlServerDatabaseId', type: { @@ -115,7 +108,6 @@ def self.mapper() } }, server_name: { - client_side_validation: true, required: false, serialized_name: 'properties.serverName', type: { @@ -123,7 +115,6 @@ def self.mapper() } }, database_name: { - client_side_validation: true, required: false, serialized_name: 'properties.databaseName', type: { @@ -131,7 +122,6 @@ def self.mapper() } }, user_name: { - client_side_validation: true, required: false, serialized_name: 'properties.userName', type: { @@ -139,7 +129,6 @@ def self.mapper() } }, password: { - client_side_validation: true, required: false, serialized_name: 'properties.password', type: { @@ -147,7 +136,6 @@ def self.mapper() } }, sync_direction: { - client_side_validation: true, required: false, serialized_name: 'properties.syncDirection', type: { @@ -155,7 +143,6 @@ def self.mapper() } }, sync_state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.syncState', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_member_list_result.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_member_list_result.rb index 9a9c841ebe..2d4a16ab84 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_member_list_result.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sync_member_list_result.rb @@ -57,7 +57,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SyncMemberListResult', type: { @@ -65,14 +64,12 @@ def self.mapper() class_name: 'SyncMemberListResult', 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: 'SyncMemberElementType', type: { @@ -83,7 +80,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'nextLink', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/tracked_resource.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/tracked_resource.rb index b61cad534a..fd83eb143b 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/tracked_resource.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/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: true, 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_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/virtual_network_rule.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/virtual_network_rule.rb index ee0ce94d43..51d00abb28 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/virtual_network_rule.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/virtual_network_rule.rb @@ -31,7 +31,6 @@ class VirtualNetworkRule < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'VirtualNetworkRule', type: { @@ -39,7 +38,6 @@ def self.mapper() class_name: 'VirtualNetworkRule', 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() } }, virtual_network_subnet_id: { - client_side_validation: true, required: true, serialized_name: 'properties.virtualNetworkSubnetId', type: { @@ -74,7 +69,6 @@ def self.mapper() } }, ignore_missing_vnet_service_endpoint: { - client_side_validation: true, required: false, serialized_name: 'properties.ignoreMissingVnetServiceEndpoint', type: { @@ -82,7 +76,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.state', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/virtual_network_rule_list_result.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/virtual_network_rule_list_result.rb index 31440f598e..cbe6576043 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/virtual_network_rule_list_result.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/virtual_network_rule_list_result.rb @@ -57,7 +57,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'VirtualNetworkRuleListResult', type: { @@ -65,14 +64,12 @@ def self.mapper() class_name: 'VirtualNetworkRuleListResult', 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: 'VirtualNetworkRuleElementType', type: { @@ -83,7 +80,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'nextLink', diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/operations.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/operations.rb index e8d1d6bc9b..c1bdecd2e6 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/operations.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/operations.rb @@ -32,8 +32,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 @@ -45,8 +45,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 # @@ -57,12 +57,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 @@ -116,8 +115,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 @@ -131,8 +130,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 # @@ -145,12 +144,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 @@ -203,12 +201,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_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/server_advisors.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/server_advisors.rb index eaea6bc73b..68f8329284 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/server_advisors.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/server_advisors.rb @@ -36,8 +36,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_server(resource_group_name, server_name, custom_headers:nil) - response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -53,8 +53,8 @@ def list_by_server(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil) - list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! end # @@ -69,7 +69,7 @@ def list_by_server_with_http_info(resource_group_name, server_name, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_async(resource_group_name, server_name, custom_headers:nil) + def list_by_server_async(resource_group_name, server_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -77,7 +77,6 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -110,13 +109,11 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { - client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'AdvisorElementType', type: { @@ -151,8 +148,8 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) # # @return [Advisor] operation results. # - def get(resource_group_name, server_name, advisor_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, advisor_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, advisor_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, advisor_name, custom_headers).value! response.body unless response.nil? end @@ -169,8 +166,8 @@ def get(resource_group_name, server_name, advisor_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, advisor_name, custom_headers:nil) - get_async(resource_group_name, server_name, advisor_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, advisor_name, custom_headers = nil) + get_async(resource_group_name, server_name, advisor_name, custom_headers).value! end # @@ -186,7 +183,7 @@ def get_with_http_info(resource_group_name, server_name, advisor_name, custom_he # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, advisor_name, custom_headers:nil) + def get_async(resource_group_name, server_name, advisor_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'advisor_name is nil' if advisor_name.nil? @@ -195,7 +192,6 @@ def get_async(resource_group_name, server_name, advisor_name, custom_headers:nil request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -254,8 +250,8 @@ def get_async(resource_group_name, server_name, advisor_name, custom_headers:nil # # @return [Advisor] operation results. # - def update(resource_group_name, server_name, advisor_name, parameters, custom_headers:nil) - response = update_async(resource_group_name, server_name, advisor_name, parameters, custom_headers:custom_headers).value! + def update(resource_group_name, server_name, advisor_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, server_name, advisor_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -273,8 +269,8 @@ def update(resource_group_name, server_name, advisor_name, parameters, custom_he # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, server_name, advisor_name, parameters, custom_headers:nil) - update_async(resource_group_name, server_name, advisor_name, parameters, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, server_name, advisor_name, parameters, custom_headers = nil) + update_async(resource_group_name, server_name, advisor_name, parameters, custom_headers).value! end # @@ -291,7 +287,7 @@ def update_with_http_info(resource_group_name, server_name, advisor_name, parame # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, server_name, advisor_name, parameters, custom_headers:nil) + def update_async(resource_group_name, server_name, advisor_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'advisor_name is nil' if advisor_name.nil? @@ -301,12 +297,13 @@ def update_async(resource_group_name, server_name, advisor_name, parameters, cus 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::SQL::Mgmt::V2015_05_01_preview::Models::Advisor.mapper() request_content = @client.serialize(request_mapper, parameters) diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/server_keys.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/server_keys.rb index 8299b2d2ae..4022949d4a 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/server_keys.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/server_keys.rb @@ -36,8 +36,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_server(resource_group_name, server_name, custom_headers:nil) - first_page = list_by_server_as_lazy(resource_group_name, server_name, custom_headers:custom_headers) + def list_by_server(resource_group_name, server_name, custom_headers = nil) + first_page = list_by_server_as_lazy(resource_group_name, server_name, custom_headers) first_page.get_all_items end @@ -53,8 +53,8 @@ def list_by_server(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil) - list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! end # @@ -69,7 +69,7 @@ def list_by_server_with_http_info(resource_group_name, server_name, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_async(resource_group_name, server_name, custom_headers:nil) + def list_by_server_async(resource_group_name, server_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -77,7 +77,6 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -135,8 +134,8 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) # # @return [ServerKey] operation results. # - def get(resource_group_name, server_name, key_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, key_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, key_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, key_name, custom_headers).value! response.body unless response.nil? end @@ -153,8 +152,8 @@ def get(resource_group_name, server_name, key_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, key_name, custom_headers:nil) - get_async(resource_group_name, server_name, key_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, key_name, custom_headers = nil) + get_async(resource_group_name, server_name, key_name, custom_headers).value! end # @@ -170,7 +169,7 @@ def get_with_http_info(resource_group_name, server_name, key_name, custom_header # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, key_name, custom_headers:nil) + def get_async(resource_group_name, server_name, key_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'key_name is nil' if key_name.nil? @@ -179,7 +178,6 @@ def get_async(resource_group_name, server_name, key_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -243,8 +241,8 @@ def get_async(resource_group_name, server_name, key_name, custom_headers:nil) # # @return [ServerKey] operation results. # - def create_or_update(resource_group_name, server_name, key_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, key_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, key_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, key_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -266,9 +264,9 @@ def create_or_update(resource_group_name, server_name, key_name, parameters, cus # @return [Concurrent::Promise] promise which provides async access to http # response. # - def create_or_update_async(resource_group_name, server_name, key_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, key_name, parameters, custom_headers = nil) # Send request - promise = begin_create_or_update_async(resource_group_name, server_name, key_name, parameters, custom_headers:custom_headers) + promise = begin_create_or_update_async(resource_group_name, server_name, key_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -295,8 +293,8 @@ def create_or_update_async(resource_group_name, server_name, key_name, parameter # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - def delete(resource_group_name, server_name, key_name, custom_headers:nil) - response = delete_async(resource_group_name, server_name, key_name, custom_headers:custom_headers).value! + def delete(resource_group_name, server_name, key_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, key_name, custom_headers).value! nil end @@ -312,9 +310,9 @@ def delete(resource_group_name, server_name, key_name, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def delete_async(resource_group_name, server_name, key_name, custom_headers:nil) + def delete_async(resource_group_name, server_name, key_name, custom_headers = nil) # Send request - promise = begin_delete_async(resource_group_name, server_name, key_name, custom_headers:custom_headers) + promise = begin_delete_async(resource_group_name, server_name, key_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -347,8 +345,8 @@ def delete_async(resource_group_name, server_name, key_name, custom_headers:nil) # # @return [ServerKey] operation results. # - def begin_create_or_update(resource_group_name, server_name, key_name, parameters, custom_headers:nil) - response = begin_create_or_update_async(resource_group_name, server_name, key_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update(resource_group_name, server_name, key_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, key_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -371,8 +369,8 @@ def begin_create_or_update(resource_group_name, server_name, key_name, parameter # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_create_or_update_with_http_info(resource_group_name, server_name, key_name, parameters, custom_headers:nil) - begin_create_or_update_async(resource_group_name, server_name, key_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update_with_http_info(resource_group_name, server_name, key_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, key_name, parameters, custom_headers).value! end # @@ -394,7 +392,7 @@ def begin_create_or_update_with_http_info(resource_group_name, server_name, key_ # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_create_or_update_async(resource_group_name, server_name, key_name, parameters, custom_headers:nil) + def begin_create_or_update_async(resource_group_name, server_name, key_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'key_name is nil' if key_name.nil? @@ -404,12 +402,13 @@ def begin_create_or_update_async(resource_group_name, server_name, key_name, par 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::SQL::Mgmt::V2015_05_01_preview::Models::ServerKey.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -478,8 +477,8 @@ def begin_create_or_update_async(resource_group_name, server_name, key_name, par # will be added to the HTTP request. # # - def begin_delete(resource_group_name, server_name, key_name, custom_headers:nil) - response = begin_delete_async(resource_group_name, server_name, key_name, custom_headers:custom_headers).value! + def begin_delete(resource_group_name, server_name, key_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, server_name, key_name, custom_headers).value! nil end @@ -496,8 +495,8 @@ def begin_delete(resource_group_name, server_name, key_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_delete_with_http_info(resource_group_name, server_name, key_name, custom_headers:nil) - begin_delete_async(resource_group_name, server_name, key_name, custom_headers:custom_headers).value! + def begin_delete_with_http_info(resource_group_name, server_name, key_name, custom_headers = nil) + begin_delete_async(resource_group_name, server_name, key_name, custom_headers).value! end # @@ -513,7 +512,7 @@ def begin_delete_with_http_info(resource_group_name, server_name, key_name, cust # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_delete_async(resource_group_name, server_name, key_name, custom_headers:nil) + def begin_delete_async(resource_group_name, server_name, key_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'key_name is nil' if key_name.nil? @@ -522,7 +521,6 @@ def begin_delete_async(resource_group_name, server_name, key_name, custom_header request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -567,8 +565,8 @@ def begin_delete_async(resource_group_name, server_name, key_name, custom_header # # @return [ServerKeyListResult] operation results. # - def list_by_server_next(next_page_link, custom_headers:nil) - response = list_by_server_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_server_next(next_page_link, custom_headers = nil) + response = list_by_server_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -582,8 +580,8 @@ def list_by_server_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_next_with_http_info(next_page_link, custom_headers:nil) - list_by_server_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_server_next_with_http_info(next_page_link, custom_headers = nil) + list_by_server_next_async(next_page_link, custom_headers).value! end # @@ -596,12 +594,11 @@ def list_by_server_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_next_async(next_page_link, custom_headers:nil) + def list_by_server_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 @@ -658,12 +655,12 @@ def list_by_server_next_async(next_page_link, custom_headers:nil) # @return [ServerKeyListResult] which provide lazy access to pages of the # response. # - def list_by_server_as_lazy(resource_group_name, server_name, custom_headers:nil) - response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_as_lazy(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_server_next_async(next_page_link, custom_headers:custom_headers) + list_by_server_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/servers.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/servers.rb index 1bbed109b2..6bb34ea8b5 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/servers.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/servers.rb @@ -32,8 +32,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 @@ -45,8 +45,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 # @@ -57,13 +57,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.subscription_id is nil' if @client.subscription_id.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 @@ -119,8 +118,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 @@ -135,8 +134,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 # @@ -150,14 +149,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, '@client.subscription_id is nil' if @client.subscription_id.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 @@ -214,8 +212,8 @@ def list_by_resource_group_async(resource_group_name, custom_headers:nil) # # @return [Server] operation results. # - def get(resource_group_name, server_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -231,8 +229,8 @@ def get(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, custom_headers:nil) - get_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, custom_headers = nil) + get_async(resource_group_name, server_name, custom_headers).value! end # @@ -247,7 +245,7 @@ def get_with_http_info(resource_group_name, server_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, custom_headers:nil) + def get_async(resource_group_name, server_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -255,7 +253,6 @@ def get_async(resource_group_name, server_name, custom_headers: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 get_async(resource_group_name, server_name, custom_headers:nil) # # @return [Server] operation results. # - def create_or_update(resource_group_name, server_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -330,9 +327,9 @@ def create_or_update(resource_group_name, server_name, parameters, custom_header # @return [Concurrent::Promise] promise which provides async access to http # response. # - def create_or_update_async(resource_group_name, server_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil) # Send request - promise = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers) + promise = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -358,8 +355,8 @@ def create_or_update_async(resource_group_name, server_name, parameters, custom_ # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - def delete(resource_group_name, server_name, custom_headers:nil) - response = delete_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def delete(resource_group_name, server_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, custom_headers).value! nil end @@ -374,9 +371,9 @@ def delete(resource_group_name, server_name, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def delete_async(resource_group_name, server_name, custom_headers:nil) + def delete_async(resource_group_name, server_name, custom_headers = nil) # Send request - promise = begin_delete_async(resource_group_name, server_name, custom_headers:custom_headers) + promise = begin_delete_async(resource_group_name, server_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -403,8 +400,8 @@ def delete_async(resource_group_name, server_name, custom_headers:nil) # # @return [Server] operation results. # - def update(resource_group_name, server_name, parameters, custom_headers:nil) - response = update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def update(resource_group_name, server_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, server_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -420,9 +417,9 @@ def update(resource_group_name, server_name, parameters, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def update_async(resource_group_name, server_name, parameters, custom_headers:nil) + def update_async(resource_group_name, server_name, parameters, custom_headers = nil) # Send request - promise = begin_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers) + promise = begin_update_async(resource_group_name, server_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -451,8 +448,8 @@ def update_async(resource_group_name, server_name, parameters, custom_headers:ni # # @return [Server] operation results. # - def begin_create_or_update(resource_group_name, server_name, parameters, custom_headers:nil) - response = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update(resource_group_name, server_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -469,8 +466,8 @@ def begin_create_or_update(resource_group_name, server_name, parameters, custom_ # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers:nil) - begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! end # @@ -486,7 +483,7 @@ def begin_create_or_update_with_http_info(resource_group_name, server_name, para # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers:nil) + def begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? @@ -495,12 +492,13 @@ def begin_create_or_update_async(resource_group_name, server_name, parameters, c 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::SQL::Mgmt::V2015_05_01_preview::Models::Server.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -568,8 +566,8 @@ def begin_create_or_update_async(resource_group_name, server_name, parameters, c # will be added to the HTTP request. # # - def begin_delete(resource_group_name, server_name, custom_headers:nil) - response = begin_delete_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def begin_delete(resource_group_name, server_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, server_name, custom_headers).value! nil end @@ -585,8 +583,8 @@ def begin_delete(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_delete_with_http_info(resource_group_name, server_name, custom_headers:nil) - begin_delete_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def begin_delete_with_http_info(resource_group_name, server_name, custom_headers = nil) + begin_delete_async(resource_group_name, server_name, custom_headers).value! end # @@ -601,7 +599,7 @@ def begin_delete_with_http_info(resource_group_name, server_name, custom_headers # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_delete_async(resource_group_name, server_name, custom_headers:nil) + def begin_delete_async(resource_group_name, server_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -609,7 +607,6 @@ def begin_delete_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -657,8 +654,8 @@ def begin_delete_async(resource_group_name, server_name, custom_headers:nil) # # @return [Server] operation results. # - def begin_update(resource_group_name, server_name, parameters, custom_headers:nil) - response = begin_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def begin_update(resource_group_name, server_name, parameters, custom_headers = nil) + response = begin_update_async(resource_group_name, server_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -675,8 +672,8 @@ def begin_update(resource_group_name, server_name, parameters, custom_headers:ni # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_update_with_http_info(resource_group_name, server_name, parameters, custom_headers:nil) - begin_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def begin_update_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil) + begin_update_async(resource_group_name, server_name, parameters, custom_headers).value! end # @@ -692,7 +689,7 @@ def begin_update_with_http_info(resource_group_name, server_name, parameters, cu # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_update_async(resource_group_name, server_name, parameters, custom_headers:nil) + def begin_update_async(resource_group_name, server_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? @@ -701,12 +698,13 @@ def begin_update_async(resource_group_name, server_name, parameters, custom_head 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::SQL::Mgmt::V2015_05_01_preview::Models::ServerUpdate.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -763,8 +761,8 @@ def begin_update_async(resource_group_name, server_name, parameters, custom_head # # @return [ServerListResult] 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 @@ -778,8 +776,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 # @@ -792,12 +790,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 @@ -851,8 +848,8 @@ def list_next_async(next_page_link, custom_headers:nil) # # @return [ServerListResult] 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 @@ -866,8 +863,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 # @@ -880,12 +877,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 @@ -938,12 +934,12 @@ def list_by_resource_group_next_async(next_page_link, custom_headers:nil) # @return [ServerListResult] 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 @@ -961,12 +957,12 @@ def list_as_lazy(custom_headers:nil) # @return [ServerListResult] 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 diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sql_management_client.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sql_management_client.rb index e41edd09fb..cf54f7d783 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sql_management_client.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sql_management_client.rb @@ -47,12 +47,22 @@ class SqlManagementClient < MsRestAzure::AzureServiceClient # @return [DatabaseBlobAuditingPolicies] database_blob_auditing_policies attr_reader :database_blob_auditing_policies + # @return [DatabaseAutomaticTuningOperations] + # database_automatic_tuning_operations + attr_reader :database_automatic_tuning_operations + # @return [EncryptionProtectors] encryption_protectors attr_reader :encryption_protectors # @return [FailoverGroups] failover_groups attr_reader :failover_groups + # @return [FirewallRules] firewall_rules + attr_reader :firewall_rules + + # @return [ManagedInstances] managed_instances + attr_reader :managed_instances + # @return [Operations] operations attr_reader :operations @@ -94,8 +104,11 @@ def initialize(credentials = nil, base_url = nil, options = nil) @database_recommended_actions = DatabaseRecommendedActions.new(self) @server_advisors = ServerAdvisors.new(self) @database_blob_auditing_policies = DatabaseBlobAuditingPolicies.new(self) + @database_automatic_tuning_operations = DatabaseAutomaticTuningOperations.new(self) @encryption_protectors = EncryptionProtectors.new(self) @failover_groups = FailoverGroups.new(self) + @firewall_rules = FirewallRules.new(self) + @managed_instances = ManagedInstances.new(self) @operations = Operations.new(self) @server_keys = ServerKeys.new(self) @servers = Servers.new(self) @@ -157,9 +170,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? @@ -176,7 +186,9 @@ def make_request_async(method, path, options = {}) # def add_telemetry sdk_information = 'azure_mgmt_sql' - sdk_information = "#{sdk_information}/0.16.0" + if defined? Azure::SQL::Mgmt::V2015_05_01_preview::VERSION + sdk_information = "#{sdk_information}/#{Azure::SQL::Mgmt::V2015_05_01_preview::VERSION}" + end add_user_agent_information(sdk_information) end end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/subscription_usages.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/subscription_usages.rb index 720583f4e6..28f39f6839 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/subscription_usages.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/subscription_usages.rb @@ -34,8 +34,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_location(location_name, custom_headers:nil) - first_page = list_by_location_as_lazy(location_name, custom_headers:custom_headers) + def list_by_location(location_name, custom_headers = nil) + first_page = list_by_location_as_lazy(location_name, custom_headers) first_page.get_all_items end @@ -49,8 +49,8 @@ def list_by_location(location_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_location_with_http_info(location_name, custom_headers:nil) - list_by_location_async(location_name, custom_headers:custom_headers).value! + def list_by_location_with_http_info(location_name, custom_headers = nil) + list_by_location_async(location_name, custom_headers).value! end # @@ -63,14 +63,13 @@ def list_by_location_with_http_info(location_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_location_async(location_name, custom_headers:nil) + def list_by_location_async(location_name, custom_headers = nil) fail ArgumentError, 'location_name is nil' if location_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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 @@ -126,8 +125,8 @@ def list_by_location_async(location_name, custom_headers:nil) # # @return [SubscriptionUsage] operation results. # - def get(location_name, usage_name, custom_headers:nil) - response = get_async(location_name, usage_name, custom_headers:custom_headers).value! + def get(location_name, usage_name, custom_headers = nil) + response = get_async(location_name, usage_name, custom_headers).value! response.body unless response.nil? end @@ -142,8 +141,8 @@ def get(location_name, usage_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(location_name, usage_name, custom_headers:nil) - get_async(location_name, usage_name, custom_headers:custom_headers).value! + def get_with_http_info(location_name, usage_name, custom_headers = nil) + get_async(location_name, usage_name, custom_headers).value! end # @@ -157,7 +156,7 @@ def get_with_http_info(location_name, usage_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(location_name, usage_name, custom_headers:nil) + def get_async(location_name, usage_name, custom_headers = nil) fail ArgumentError, 'location_name is nil' if location_name.nil? fail ArgumentError, 'usage_name is nil' if usage_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -165,7 +164,6 @@ def get_async(location_name, usage_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -220,8 +218,8 @@ def get_async(location_name, usage_name, custom_headers:nil) # # @return [SubscriptionUsageListResult] operation results. # - def list_by_location_next(next_page_link, custom_headers:nil) - response = list_by_location_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_location_next(next_page_link, custom_headers = nil) + response = list_by_location_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -235,8 +233,8 @@ def list_by_location_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_location_next_with_http_info(next_page_link, custom_headers:nil) - list_by_location_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_location_next_with_http_info(next_page_link, custom_headers = nil) + list_by_location_next_async(next_page_link, custom_headers).value! end # @@ -249,12 +247,11 @@ def list_by_location_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_location_next_async(next_page_link, custom_headers:nil) + def list_by_location_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 @@ -309,12 +306,12 @@ def list_by_location_next_async(next_page_link, custom_headers:nil) # @return [SubscriptionUsageListResult] which provide lazy access to pages of # the response. # - def list_by_location_as_lazy(location_name, custom_headers:nil) - response = list_by_location_async(location_name, custom_headers:custom_headers).value! + def list_by_location_as_lazy(location_name, custom_headers = nil) + response = list_by_location_async(location_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_location_next_async(next_page_link, custom_headers:custom_headers) + list_by_location_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_agents.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_agents.rb index 502b07e62b..a289e28977 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_agents.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_agents.rb @@ -38,8 +38,8 @@ def initialize(client) # # @return [SyncAgent] operation results. # - def get(resource_group_name, server_name, sync_agent_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, sync_agent_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, sync_agent_name, custom_headers).value! response.body unless response.nil? end @@ -57,8 +57,8 @@ def get(resource_group_name, server_name, sync_agent_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, sync_agent_name, custom_headers:nil) - get_async(resource_group_name, server_name, sync_agent_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + get_async(resource_group_name, server_name, sync_agent_name, custom_headers).value! end # @@ -75,7 +75,7 @@ def get_with_http_info(resource_group_name, server_name, sync_agent_name, custom # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, sync_agent_name, custom_headers:nil) + def get_async(resource_group_name, server_name, sync_agent_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'sync_agent_name is nil' if sync_agent_name.nil? @@ -84,7 +84,6 @@ def get_async(resource_group_name, server_name, sync_agent_name, custom_headers: request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -144,8 +143,8 @@ def get_async(resource_group_name, server_name, sync_agent_name, custom_headers: # # @return [SyncAgent] operation results. # - def create_or_update(resource_group_name, server_name, sync_agent_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, sync_agent_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, sync_agent_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, sync_agent_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -163,9 +162,9 @@ def create_or_update(resource_group_name, server_name, sync_agent_name, paramete # @return [Concurrent::Promise] promise which provides async access to http # response. # - def create_or_update_async(resource_group_name, server_name, sync_agent_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, sync_agent_name, parameters, custom_headers = nil) # Send request - promise = begin_create_or_update_async(resource_group_name, server_name, sync_agent_name, parameters, custom_headers:custom_headers) + promise = begin_create_or_update_async(resource_group_name, server_name, sync_agent_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -193,8 +192,8 @@ def create_or_update_async(resource_group_name, server_name, sync_agent_name, pa # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - def delete(resource_group_name, server_name, sync_agent_name, custom_headers:nil) - response = delete_async(resource_group_name, server_name, sync_agent_name, custom_headers:custom_headers).value! + def delete(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, sync_agent_name, custom_headers).value! nil end @@ -211,9 +210,9 @@ def delete(resource_group_name, server_name, sync_agent_name, custom_headers:nil # @return [Concurrent::Promise] promise which provides async access to http # response. # - def delete_async(resource_group_name, server_name, sync_agent_name, custom_headers:nil) + def delete_async(resource_group_name, server_name, sync_agent_name, custom_headers = nil) # Send request - promise = begin_delete_async(resource_group_name, server_name, sync_agent_name, custom_headers:custom_headers) + promise = begin_delete_async(resource_group_name, server_name, sync_agent_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -240,8 +239,8 @@ def delete_async(resource_group_name, server_name, sync_agent_name, custom_heade # # @return [Array] operation results. # - def list_by_server(resource_group_name, server_name, custom_headers:nil) - first_page = list_by_server_as_lazy(resource_group_name, server_name, custom_headers:custom_headers) + def list_by_server(resource_group_name, server_name, custom_headers = nil) + first_page = list_by_server_as_lazy(resource_group_name, server_name, custom_headers) first_page.get_all_items end @@ -258,8 +257,8 @@ def list_by_server(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil) - list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! end # @@ -275,7 +274,7 @@ def list_by_server_with_http_info(resource_group_name, server_name, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_async(resource_group_name, server_name, custom_headers:nil) + def list_by_server_async(resource_group_name, server_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -283,7 +282,6 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -342,8 +340,8 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) # # @return [SyncAgentKeyProperties] operation results. # - def generate_key(resource_group_name, server_name, sync_agent_name, custom_headers:nil) - response = generate_key_async(resource_group_name, server_name, sync_agent_name, custom_headers:custom_headers).value! + def generate_key(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + response = generate_key_async(resource_group_name, server_name, sync_agent_name, custom_headers).value! response.body unless response.nil? end @@ -361,8 +359,8 @@ def generate_key(resource_group_name, server_name, sync_agent_name, custom_heade # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def generate_key_with_http_info(resource_group_name, server_name, sync_agent_name, custom_headers:nil) - generate_key_async(resource_group_name, server_name, sync_agent_name, custom_headers:custom_headers).value! + def generate_key_with_http_info(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + generate_key_async(resource_group_name, server_name, sync_agent_name, custom_headers).value! end # @@ -379,7 +377,7 @@ def generate_key_with_http_info(resource_group_name, server_name, sync_agent_nam # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def generate_key_async(resource_group_name, server_name, sync_agent_name, custom_headers:nil) + def generate_key_async(resource_group_name, server_name, sync_agent_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'sync_agent_name is nil' if sync_agent_name.nil? @@ -388,7 +386,6 @@ def generate_key_async(resource_group_name, server_name, sync_agent_name, custom 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 generate_key_async(resource_group_name, server_name, sync_agent_name, custom # # @return [Array] operation results. # - def list_linked_databases(resource_group_name, server_name, sync_agent_name, custom_headers:nil) - first_page = list_linked_databases_as_lazy(resource_group_name, server_name, sync_agent_name, custom_headers:custom_headers) + def list_linked_databases(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + first_page = list_linked_databases_as_lazy(resource_group_name, server_name, sync_agent_name, custom_headers) first_page.get_all_items end @@ -466,8 +463,8 @@ def list_linked_databases(resource_group_name, server_name, sync_agent_name, cus # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_linked_databases_with_http_info(resource_group_name, server_name, sync_agent_name, custom_headers:nil) - list_linked_databases_async(resource_group_name, server_name, sync_agent_name, custom_headers:custom_headers).value! + def list_linked_databases_with_http_info(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + list_linked_databases_async(resource_group_name, server_name, sync_agent_name, custom_headers).value! end # @@ -484,7 +481,7 @@ def list_linked_databases_with_http_info(resource_group_name, server_name, sync_ # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_linked_databases_async(resource_group_name, server_name, sync_agent_name, custom_headers:nil) + def list_linked_databases_async(resource_group_name, server_name, sync_agent_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'sync_agent_name is nil' if sync_agent_name.nil? @@ -493,7 +490,6 @@ def list_linked_databases_async(resource_group_name, server_name, sync_agent_nam request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -553,8 +549,8 @@ def list_linked_databases_async(resource_group_name, server_name, sync_agent_nam # # @return [SyncAgent] operation results. # - def begin_create_or_update(resource_group_name, server_name, sync_agent_name, parameters, custom_headers:nil) - response = begin_create_or_update_async(resource_group_name, server_name, sync_agent_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update(resource_group_name, server_name, sync_agent_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, sync_agent_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -573,8 +569,8 @@ def begin_create_or_update(resource_group_name, server_name, sync_agent_name, pa # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_create_or_update_with_http_info(resource_group_name, server_name, sync_agent_name, parameters, custom_headers:nil) - begin_create_or_update_async(resource_group_name, server_name, sync_agent_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update_with_http_info(resource_group_name, server_name, sync_agent_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, sync_agent_name, parameters, custom_headers).value! end # @@ -592,7 +588,7 @@ def begin_create_or_update_with_http_info(resource_group_name, server_name, sync # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_create_or_update_async(resource_group_name, server_name, sync_agent_name, parameters, custom_headers:nil) + def begin_create_or_update_async(resource_group_name, server_name, sync_agent_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'sync_agent_name is nil' if sync_agent_name.nil? @@ -602,12 +598,13 @@ def begin_create_or_update_async(resource_group_name, server_name, sync_agent_na 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::SQL::Mgmt::V2015_05_01_preview::Models::SyncAgent.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -677,8 +674,8 @@ def begin_create_or_update_async(resource_group_name, server_name, sync_agent_na # will be added to the HTTP request. # # - def begin_delete(resource_group_name, server_name, sync_agent_name, custom_headers:nil) - response = begin_delete_async(resource_group_name, server_name, sync_agent_name, custom_headers:custom_headers).value! + def begin_delete(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, server_name, sync_agent_name, custom_headers).value! nil end @@ -696,8 +693,8 @@ def begin_delete(resource_group_name, server_name, sync_agent_name, custom_heade # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_delete_with_http_info(resource_group_name, server_name, sync_agent_name, custom_headers:nil) - begin_delete_async(resource_group_name, server_name, sync_agent_name, custom_headers:custom_headers).value! + def begin_delete_with_http_info(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + begin_delete_async(resource_group_name, server_name, sync_agent_name, custom_headers).value! end # @@ -714,7 +711,7 @@ def begin_delete_with_http_info(resource_group_name, server_name, sync_agent_nam # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_delete_async(resource_group_name, server_name, sync_agent_name, custom_headers:nil) + def begin_delete_async(resource_group_name, server_name, sync_agent_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'sync_agent_name is nil' if sync_agent_name.nil? @@ -723,7 +720,6 @@ def begin_delete_async(resource_group_name, server_name, sync_agent_name, custom request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -768,8 +764,8 @@ def begin_delete_async(resource_group_name, server_name, sync_agent_name, custom # # @return [SyncAgentListResult] operation results. # - def list_by_server_next(next_page_link, custom_headers:nil) - response = list_by_server_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_server_next(next_page_link, custom_headers = nil) + response = list_by_server_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -783,8 +779,8 @@ def list_by_server_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_next_with_http_info(next_page_link, custom_headers:nil) - list_by_server_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_server_next_with_http_info(next_page_link, custom_headers = nil) + list_by_server_next_async(next_page_link, custom_headers).value! end # @@ -797,12 +793,11 @@ def list_by_server_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_next_async(next_page_link, custom_headers:nil) + def list_by_server_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 @@ -856,8 +851,8 @@ def list_by_server_next_async(next_page_link, custom_headers:nil) # # @return [SyncAgentLinkedDatabaseListResult] operation results. # - def list_linked_databases_next(next_page_link, custom_headers:nil) - response = list_linked_databases_next_async(next_page_link, custom_headers:custom_headers).value! + def list_linked_databases_next(next_page_link, custom_headers = nil) + response = list_linked_databases_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -871,8 +866,8 @@ def list_linked_databases_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_linked_databases_next_with_http_info(next_page_link, custom_headers:nil) - list_linked_databases_next_async(next_page_link, custom_headers:custom_headers).value! + def list_linked_databases_next_with_http_info(next_page_link, custom_headers = nil) + list_linked_databases_next_async(next_page_link, custom_headers).value! end # @@ -885,12 +880,11 @@ def list_linked_databases_next_with_http_info(next_page_link, custom_headers:nil # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_linked_databases_next_async(next_page_link, custom_headers:nil) + def list_linked_databases_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 @@ -948,12 +942,12 @@ def list_linked_databases_next_async(next_page_link, custom_headers:nil) # @return [SyncAgentListResult] which provide lazy access to pages of the # response. # - def list_by_server_as_lazy(resource_group_name, server_name, custom_headers:nil) - response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_as_lazy(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_server_next_async(next_page_link, custom_headers:custom_headers) + list_by_server_next_async(next_page_link, custom_headers) end page end @@ -974,12 +968,12 @@ def list_by_server_as_lazy(resource_group_name, server_name, custom_headers:nil) # @return [SyncAgentLinkedDatabaseListResult] which provide lazy access to # pages of the response. # - def list_linked_databases_as_lazy(resource_group_name, server_name, sync_agent_name, custom_headers:nil) - response = list_linked_databases_async(resource_group_name, server_name, sync_agent_name, custom_headers:custom_headers).value! + def list_linked_databases_as_lazy(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + response = list_linked_databases_async(resource_group_name, server_name, sync_agent_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_linked_databases_next_async(next_page_link, custom_headers:custom_headers) + list_linked_databases_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb index 33e1558fec..2820fedbc4 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb @@ -34,8 +34,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_sync_database_ids(location_name, custom_headers:nil) - first_page = list_sync_database_ids_as_lazy(location_name, custom_headers:custom_headers) + def list_sync_database_ids(location_name, custom_headers = nil) + first_page = list_sync_database_ids_as_lazy(location_name, custom_headers) first_page.get_all_items end @@ -49,8 +49,8 @@ def list_sync_database_ids(location_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_sync_database_ids_with_http_info(location_name, custom_headers:nil) - list_sync_database_ids_async(location_name, custom_headers:custom_headers).value! + def list_sync_database_ids_with_http_info(location_name, custom_headers = nil) + list_sync_database_ids_async(location_name, custom_headers).value! end # @@ -63,14 +63,13 @@ def list_sync_database_ids_with_http_info(location_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_sync_database_ids_async(location_name, custom_headers:nil) + def list_sync_database_ids_async(location_name, custom_headers = nil) fail ArgumentError, 'location_name is nil' if location_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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 @@ -128,8 +127,8 @@ def list_sync_database_ids_async(location_name, custom_headers:nil) # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - def refresh_hub_schema(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) - response = refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! + def refresh_hub_schema(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + response = refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! nil end @@ -147,9 +146,9 @@ def refresh_hub_schema(resource_group_name, server_name, database_name, sync_gro # @return [Concurrent::Promise] promise which provides async access to http # response. # - def refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) + def refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) # Send request - promise = begin_refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers) + promise = begin_refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -178,8 +177,8 @@ def refresh_hub_schema_async(resource_group_name, server_name, database_name, sy # # @return [Array] operation results. # - def list_hub_schemas(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) - first_page = list_hub_schemas_as_lazy(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers) + def list_hub_schemas(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + first_page = list_hub_schemas_as_lazy(resource_group_name, server_name, database_name, sync_group_name, custom_headers) first_page.get_all_items end @@ -198,8 +197,8 @@ def list_hub_schemas(resource_group_name, server_name, database_name, sync_group # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_hub_schemas_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) - list_hub_schemas_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! + def list_hub_schemas_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + list_hub_schemas_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! end # @@ -217,7 +216,7 @@ def list_hub_schemas_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_hub_schemas_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) + def list_hub_schemas_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -227,7 +226,6 @@ def list_hub_schemas_async(resource_group_name, server_name, database_name, sync request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -292,8 +290,8 @@ def list_hub_schemas_async(resource_group_name, server_name, database_name, sync # # @return [Array] operation results. # - def list_logs(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token:nil, custom_headers:nil) - first_page = list_logs_as_lazy(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token:continuation_token, custom_headers:custom_headers) + def list_logs(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token = nil, custom_headers = nil) + first_page = list_logs_as_lazy(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token, custom_headers) first_page.get_all_items end @@ -317,8 +315,8 @@ def list_logs(resource_group_name, server_name, database_name, sync_group_name, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_logs_with_http_info(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token:nil, custom_headers:nil) - list_logs_async(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token:continuation_token, custom_headers:custom_headers).value! + def list_logs_with_http_info(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token = nil, custom_headers = nil) + list_logs_async(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token, custom_headers).value! end # @@ -341,7 +339,7 @@ def list_logs_with_http_info(resource_group_name, server_name, database_name, sy # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_logs_async(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token:nil, custom_headers:nil) + def list_logs_async(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -354,7 +352,6 @@ def list_logs_async(resource_group_name, server_name, database_name, sync_group_ request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -413,8 +410,8 @@ def list_logs_async(resource_group_name, server_name, database_name, sync_group_ # will be added to the HTTP request. # # - def cancel_sync(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) - response = cancel_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! + def cancel_sync(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + response = cancel_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! nil end @@ -433,8 +430,8 @@ def cancel_sync(resource_group_name, server_name, database_name, sync_group_name # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def cancel_sync_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) - cancel_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! + def cancel_sync_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + cancel_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! end # @@ -452,7 +449,7 @@ def cancel_sync_with_http_info(resource_group_name, server_name, database_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def cancel_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) + def cancel_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -462,7 +459,6 @@ def cancel_sync_async(resource_group_name, server_name, database_name, sync_grou request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -511,8 +507,8 @@ def cancel_sync_async(resource_group_name, server_name, database_name, sync_grou # will be added to the HTTP request. # # - def trigger_sync(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) - response = trigger_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! + def trigger_sync(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + response = trigger_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! nil end @@ -531,8 +527,8 @@ def trigger_sync(resource_group_name, server_name, database_name, sync_group_nam # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def trigger_sync_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) - trigger_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! + def trigger_sync_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + trigger_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! end # @@ -550,7 +546,7 @@ def trigger_sync_with_http_info(resource_group_name, server_name, database_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def trigger_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) + def trigger_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -560,7 +556,6 @@ def trigger_sync_async(resource_group_name, server_name, database_name, sync_gro request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -610,8 +605,8 @@ def trigger_sync_async(resource_group_name, server_name, database_name, sync_gro # # @return [SyncGroup] operation results. # - def get(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! response.body unless response.nil? end @@ -630,8 +625,8 @@ def get(resource_group_name, server_name, database_name, sync_group_name, custom # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) - get_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! end # @@ -649,7 +644,7 @@ def get_with_http_info(resource_group_name, server_name, database_name, sync_gro # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) + def get_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -659,7 +654,6 @@ def get_async(resource_group_name, server_name, database_name, sync_group_name, request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -720,8 +714,8 @@ def get_async(resource_group_name, server_name, database_name, sync_group_name, # # @return [SyncGroup] operation results. # - def create_or_update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -740,9 +734,9 @@ def create_or_update(resource_group_name, server_name, database_name, sync_group # @return [Concurrent::Promise] promise which provides async access to http # response. # - def create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers = nil) # Send request - promise = begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:custom_headers) + promise = begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -771,8 +765,8 @@ def create_or_update_async(resource_group_name, server_name, database_name, sync # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - def delete(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) - response = delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! + def delete(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! nil end @@ -790,9 +784,9 @@ def delete(resource_group_name, server_name, database_name, sync_group_name, cus # @return [Concurrent::Promise] promise which provides async access to http # response. # - def delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) + def delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) # Send request - promise = begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers) + promise = begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -822,8 +816,8 @@ def delete_async(resource_group_name, server_name, database_name, sync_group_nam # # @return [SyncGroup] operation results. # - def update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:nil) - response = update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:custom_headers).value! + def update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -842,9 +836,9 @@ def update(resource_group_name, server_name, database_name, sync_group_name, par # @return [Concurrent::Promise] promise which provides async access to http # response. # - def update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:nil) + def update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers = nil) # Send request - promise = begin_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:custom_headers) + promise = begin_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -874,8 +868,8 @@ def update_async(resource_group_name, server_name, database_name, sync_group_nam # # @return [Array] operation results. # - def list_by_database(resource_group_name, server_name, database_name, custom_headers:nil) - first_page = list_by_database_as_lazy(resource_group_name, server_name, database_name, custom_headers:custom_headers) + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + first_page = list_by_database_as_lazy(resource_group_name, server_name, database_name, custom_headers) first_page.get_all_items end @@ -893,8 +887,8 @@ def list_by_database(resource_group_name, server_name, database_name, custom_hea # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -911,7 +905,7 @@ def list_by_database_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_database_async(resource_group_name, server_name, database_name, custom_headers:nil) + def list_by_database_async(resource_group_name, server_name, database_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -920,7 +914,6 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -979,8 +972,8 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust # will be added to the HTTP request. # # - def begin_refresh_hub_schema(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) - response = begin_refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! + def begin_refresh_hub_schema(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + response = begin_refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! nil end @@ -999,8 +992,8 @@ def begin_refresh_hub_schema(resource_group_name, server_name, database_name, sy # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_refresh_hub_schema_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) - begin_refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! + def begin_refresh_hub_schema_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + begin_refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! end # @@ -1018,7 +1011,7 @@ def begin_refresh_hub_schema_with_http_info(resource_group_name, server_name, da # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) + def begin_refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -1028,7 +1021,6 @@ def begin_refresh_hub_schema_async(resource_group_name, server_name, database_na request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1079,8 +1071,8 @@ def begin_refresh_hub_schema_async(resource_group_name, server_name, database_na # # @return [SyncGroup] operation results. # - def begin_create_or_update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:nil) - response = begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1100,8 +1092,8 @@ def begin_create_or_update(resource_group_name, server_name, database_name, sync # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_create_or_update_with_http_info(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:nil) - begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update_with_http_info(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers).value! end # @@ -1120,7 +1112,7 @@ def begin_create_or_update_with_http_info(resource_group_name, server_name, data # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:nil) + def begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -1131,12 +1123,13 @@ def begin_create_or_update_async(resource_group_name, server_name, database_name 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::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroup.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1207,8 +1200,8 @@ def begin_create_or_update_async(resource_group_name, server_name, database_name # will be added to the HTTP request. # # - def begin_delete(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) - response = begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! + def begin_delete(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! nil end @@ -1227,8 +1220,8 @@ def begin_delete(resource_group_name, server_name, database_name, sync_group_nam # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_delete_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) - begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! + def begin_delete_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! end # @@ -1246,7 +1239,7 @@ def begin_delete_with_http_info(resource_group_name, server_name, database_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) + def begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -1256,7 +1249,6 @@ def begin_delete_async(resource_group_name, server_name, database_name, sync_gro request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1307,8 +1299,8 @@ def begin_delete_async(resource_group_name, server_name, database_name, sync_gro # # @return [SyncGroup] operation results. # - def begin_update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:nil) - response = begin_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:custom_headers).value! + def begin_update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers = nil) + response = begin_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1328,8 +1320,8 @@ def begin_update(resource_group_name, server_name, database_name, sync_group_nam # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_update_with_http_info(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:nil) - begin_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:custom_headers).value! + def begin_update_with_http_info(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers = nil) + begin_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers).value! end # @@ -1348,7 +1340,7 @@ def begin_update_with_http_info(resource_group_name, server_name, database_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:nil) + def begin_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -1359,12 +1351,13 @@ def begin_update_async(resource_group_name, server_name, database_name, sync_gro 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::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroup.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1421,8 +1414,8 @@ def begin_update_async(resource_group_name, server_name, database_name, sync_gro # # @return [SyncDatabaseIdListResult] operation results. # - def list_sync_database_ids_next(next_page_link, custom_headers:nil) - response = list_sync_database_ids_next_async(next_page_link, custom_headers:custom_headers).value! + def list_sync_database_ids_next(next_page_link, custom_headers = nil) + response = list_sync_database_ids_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -1436,8 +1429,8 @@ def list_sync_database_ids_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_sync_database_ids_next_with_http_info(next_page_link, custom_headers:nil) - list_sync_database_ids_next_async(next_page_link, custom_headers:custom_headers).value! + def list_sync_database_ids_next_with_http_info(next_page_link, custom_headers = nil) + list_sync_database_ids_next_async(next_page_link, custom_headers).value! end # @@ -1450,12 +1443,11 @@ def list_sync_database_ids_next_with_http_info(next_page_link, custom_headers:ni # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_sync_database_ids_next_async(next_page_link, custom_headers:nil) + def list_sync_database_ids_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 @@ -1509,8 +1501,8 @@ def list_sync_database_ids_next_async(next_page_link, custom_headers:nil) # # @return [SyncFullSchemaPropertiesListResult] operation results. # - def list_hub_schemas_next(next_page_link, custom_headers:nil) - response = list_hub_schemas_next_async(next_page_link, custom_headers:custom_headers).value! + def list_hub_schemas_next(next_page_link, custom_headers = nil) + response = list_hub_schemas_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -1524,8 +1516,8 @@ def list_hub_schemas_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_hub_schemas_next_with_http_info(next_page_link, custom_headers:nil) - list_hub_schemas_next_async(next_page_link, custom_headers:custom_headers).value! + def list_hub_schemas_next_with_http_info(next_page_link, custom_headers = nil) + list_hub_schemas_next_async(next_page_link, custom_headers).value! end # @@ -1538,12 +1530,11 @@ def list_hub_schemas_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_hub_schemas_next_async(next_page_link, custom_headers:nil) + def list_hub_schemas_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 @@ -1597,8 +1588,8 @@ def list_hub_schemas_next_async(next_page_link, custom_headers:nil) # # @return [SyncGroupLogListResult] operation results. # - def list_logs_next(next_page_link, custom_headers:nil) - response = list_logs_next_async(next_page_link, custom_headers:custom_headers).value! + def list_logs_next(next_page_link, custom_headers = nil) + response = list_logs_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -1612,8 +1603,8 @@ def list_logs_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_logs_next_with_http_info(next_page_link, custom_headers:nil) - list_logs_next_async(next_page_link, custom_headers:custom_headers).value! + def list_logs_next_with_http_info(next_page_link, custom_headers = nil) + list_logs_next_async(next_page_link, custom_headers).value! end # @@ -1626,12 +1617,11 @@ def list_logs_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_logs_next_async(next_page_link, custom_headers:nil) + def list_logs_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 @@ -1685,8 +1675,8 @@ def list_logs_next_async(next_page_link, custom_headers:nil) # # @return [SyncGroupListResult] operation results. # - def list_by_database_next(next_page_link, custom_headers:nil) - response = list_by_database_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_database_next(next_page_link, custom_headers = nil) + response = list_by_database_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -1700,8 +1690,8 @@ def list_by_database_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_database_next_with_http_info(next_page_link, custom_headers:nil) - list_by_database_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_database_next_with_http_info(next_page_link, custom_headers = nil) + list_by_database_next_async(next_page_link, custom_headers).value! end # @@ -1714,12 +1704,11 @@ def list_by_database_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_database_next_async(next_page_link, custom_headers:nil) + def list_by_database_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 @@ -1774,12 +1763,12 @@ def list_by_database_next_async(next_page_link, custom_headers:nil) # @return [SyncDatabaseIdListResult] which provide lazy access to pages of the # response. # - def list_sync_database_ids_as_lazy(location_name, custom_headers:nil) - response = list_sync_database_ids_async(location_name, custom_headers:custom_headers).value! + def list_sync_database_ids_as_lazy(location_name, custom_headers = nil) + response = list_sync_database_ids_async(location_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_sync_database_ids_next_async(next_page_link, custom_headers:custom_headers) + list_sync_database_ids_next_async(next_page_link, custom_headers) end page end @@ -1801,12 +1790,12 @@ def list_sync_database_ids_as_lazy(location_name, custom_headers:nil) # @return [SyncFullSchemaPropertiesListResult] which provide lazy access to # pages of the response. # - def list_hub_schemas_as_lazy(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) - response = list_hub_schemas_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! + def list_hub_schemas_as_lazy(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + response = list_hub_schemas_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_hub_schemas_next_async(next_page_link, custom_headers:custom_headers) + list_hub_schemas_next_async(next_page_link, custom_headers) end page end @@ -1833,12 +1822,12 @@ def list_hub_schemas_as_lazy(resource_group_name, server_name, database_name, sy # @return [SyncGroupLogListResult] which provide lazy access to pages of the # response. # - def list_logs_as_lazy(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token:nil, custom_headers:nil) - response = list_logs_async(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token:continuation_token, custom_headers:custom_headers).value! + def list_logs_as_lazy(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token = nil, custom_headers = nil) + response = list_logs_async(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_logs_next_async(next_page_link, custom_headers:custom_headers) + list_logs_next_async(next_page_link, custom_headers) end page end @@ -1859,12 +1848,12 @@ def list_logs_as_lazy(resource_group_name, server_name, database_name, sync_grou # @return [SyncGroupListResult] which provide lazy access to pages of the # response. # - def list_by_database_as_lazy(resource_group_name, server_name, database_name, custom_headers:nil) - response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database_as_lazy(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_database_next_async(next_page_link, custom_headers:custom_headers) + list_by_database_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_members.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_members.rb index 3a9f0d1162..e700842610 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_members.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_members.rb @@ -41,8 +41,8 @@ def initialize(client) # # @return [SyncMember] operation results. # - def get(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers).value! response.body unless response.nil? end @@ -63,8 +63,8 @@ def get(resource_group_name, server_name, database_name, sync_group_name, sync_m # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:nil) - get_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers).value! end # @@ -84,7 +84,7 @@ def get_with_http_info(resource_group_name, server_name, database_name, sync_gro # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:nil) + def get_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -95,7 +95,6 @@ def get_async(resource_group_name, server_name, database_name, sync_group_name, request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -158,8 +157,8 @@ def get_async(resource_group_name, server_name, database_name, sync_group_name, # # @return [SyncMember] operation results. # - def create_or_update(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -180,9 +179,9 @@ def create_or_update(resource_group_name, server_name, database_name, sync_group # @return [Concurrent::Promise] promise which provides async access to http # response. # - def create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers = nil) # Send request - promise = begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers:custom_headers) + promise = begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -213,8 +212,8 @@ def create_or_update_async(resource_group_name, server_name, database_name, sync # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - def delete(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:nil) - response = delete_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:custom_headers).value! + def delete(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers).value! nil end @@ -234,9 +233,9 @@ def delete(resource_group_name, server_name, database_name, sync_group_name, syn # @return [Concurrent::Promise] promise which provides async access to http # response. # - def delete_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:nil) + def delete_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) # Send request - promise = begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:custom_headers) + promise = begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -268,8 +267,8 @@ def delete_async(resource_group_name, server_name, database_name, sync_group_nam # # @return [SyncMember] operation results. # - def update(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers:nil) - response = update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers:custom_headers).value! + def update(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -290,9 +289,9 @@ def update(resource_group_name, server_name, database_name, sync_group_name, syn # @return [Concurrent::Promise] promise which provides async access to http # response. # - def update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers:nil) + def update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers = nil) # Send request - promise = begin_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers:custom_headers) + promise = begin_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -323,8 +322,8 @@ def update_async(resource_group_name, server_name, database_name, sync_group_nam # # @return [Array] operation results. # - def list_by_sync_group(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) - first_page = list_by_sync_group_as_lazy(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers) + def list_by_sync_group(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + first_page = list_by_sync_group_as_lazy(resource_group_name, server_name, database_name, sync_group_name, custom_headers) first_page.get_all_items end @@ -343,8 +342,8 @@ def list_by_sync_group(resource_group_name, server_name, database_name, sync_gro # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_sync_group_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) - list_by_sync_group_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! + def list_by_sync_group_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + list_by_sync_group_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! end # @@ -362,7 +361,7 @@ def list_by_sync_group_with_http_info(resource_group_name, server_name, database # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_sync_group_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) + def list_by_sync_group_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -372,7 +371,6 @@ def list_by_sync_group_async(resource_group_name, server_name, database_name, sy request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -434,8 +432,8 @@ def list_by_sync_group_async(resource_group_name, server_name, database_name, sy # # @return [Array] operation results. # - def list_member_schemas(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:nil) - first_page = list_member_schemas_as_lazy(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:custom_headers) + def list_member_schemas(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + first_page = list_member_schemas_as_lazy(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers) first_page.get_all_items end @@ -456,8 +454,8 @@ def list_member_schemas(resource_group_name, server_name, database_name, sync_gr # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_member_schemas_with_http_info(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:nil) - list_member_schemas_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:custom_headers).value! + def list_member_schemas_with_http_info(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + list_member_schemas_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers).value! end # @@ -477,7 +475,7 @@ def list_member_schemas_with_http_info(resource_group_name, server_name, databas # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_member_schemas_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:nil) + def list_member_schemas_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -488,7 +486,6 @@ def list_member_schemas_async(resource_group_name, server_name, database_name, s request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -548,8 +545,8 @@ def list_member_schemas_async(resource_group_name, server_name, database_name, s # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - def refresh_member_schema(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:nil) - response = refresh_member_schema_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:custom_headers).value! + def refresh_member_schema(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + response = refresh_member_schema_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers).value! nil end @@ -569,9 +566,9 @@ def refresh_member_schema(resource_group_name, server_name, database_name, sync_ # @return [Concurrent::Promise] promise which provides async access to http # response. # - def refresh_member_schema_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:nil) + def refresh_member_schema_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) # Send request - promise = begin_refresh_member_schema_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:custom_headers) + promise = begin_refresh_member_schema_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -603,8 +600,8 @@ def refresh_member_schema_async(resource_group_name, server_name, database_name, # # @return [SyncMember] operation results. # - def begin_create_or_update(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers:nil) - response = begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -626,8 +623,8 @@ def begin_create_or_update(resource_group_name, server_name, database_name, sync # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_create_or_update_with_http_info(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers:nil) - begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update_with_http_info(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers).value! end # @@ -648,7 +645,7 @@ def begin_create_or_update_with_http_info(resource_group_name, server_name, data # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers:nil) + def begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -660,12 +657,13 @@ def begin_create_or_update_async(resource_group_name, server_name, database_name 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::SQL::Mgmt::V2015_05_01_preview::Models::SyncMember.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -738,8 +736,8 @@ def begin_create_or_update_async(resource_group_name, server_name, database_name # will be added to the HTTP request. # # - def begin_delete(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:nil) - response = begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:custom_headers).value! + def begin_delete(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers).value! nil end @@ -760,8 +758,8 @@ def begin_delete(resource_group_name, server_name, database_name, sync_group_nam # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_delete_with_http_info(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:nil) - begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:custom_headers).value! + def begin_delete_with_http_info(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers).value! end # @@ -781,7 +779,7 @@ def begin_delete_with_http_info(resource_group_name, server_name, database_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:nil) + def begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -792,7 +790,6 @@ def begin_delete_async(resource_group_name, server_name, database_name, sync_gro request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -845,8 +842,8 @@ def begin_delete_async(resource_group_name, server_name, database_name, sync_gro # # @return [SyncMember] operation results. # - def begin_update(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers:nil) - response = begin_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers:custom_headers).value! + def begin_update(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers = nil) + response = begin_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -868,8 +865,8 @@ def begin_update(resource_group_name, server_name, database_name, sync_group_nam # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_update_with_http_info(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers:nil) - begin_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers:custom_headers).value! + def begin_update_with_http_info(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers = nil) + begin_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers).value! end # @@ -890,7 +887,7 @@ def begin_update_with_http_info(resource_group_name, server_name, database_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers:nil) + def begin_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -902,12 +899,13 @@ def begin_update_async(resource_group_name, server_name, database_name, sync_gro 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::SQL::Mgmt::V2015_05_01_preview::Models::SyncMember.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -970,8 +968,8 @@ def begin_update_async(resource_group_name, server_name, database_name, sync_gro # will be added to the HTTP request. # # - def begin_refresh_member_schema(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:nil) - response = begin_refresh_member_schema_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:custom_headers).value! + def begin_refresh_member_schema(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + response = begin_refresh_member_schema_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers).value! nil end @@ -992,8 +990,8 @@ def begin_refresh_member_schema(resource_group_name, server_name, database_name, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_refresh_member_schema_with_http_info(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:nil) - begin_refresh_member_schema_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:custom_headers).value! + def begin_refresh_member_schema_with_http_info(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + begin_refresh_member_schema_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers).value! end # @@ -1013,7 +1011,7 @@ def begin_refresh_member_schema_with_http_info(resource_group_name, server_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_refresh_member_schema_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:nil) + def begin_refresh_member_schema_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -1024,7 +1022,6 @@ def begin_refresh_member_schema_async(resource_group_name, server_name, database request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1069,8 +1066,8 @@ def begin_refresh_member_schema_async(resource_group_name, server_name, database # # @return [SyncMemberListResult] operation results. # - def list_by_sync_group_next(next_page_link, custom_headers:nil) - response = list_by_sync_group_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_sync_group_next(next_page_link, custom_headers = nil) + response = list_by_sync_group_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -1084,8 +1081,8 @@ def list_by_sync_group_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_sync_group_next_with_http_info(next_page_link, custom_headers:nil) - list_by_sync_group_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_sync_group_next_with_http_info(next_page_link, custom_headers = nil) + list_by_sync_group_next_async(next_page_link, custom_headers).value! end # @@ -1098,12 +1095,11 @@ def list_by_sync_group_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_sync_group_next_async(next_page_link, custom_headers:nil) + def list_by_sync_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 @@ -1157,8 +1153,8 @@ def list_by_sync_group_next_async(next_page_link, custom_headers:nil) # # @return [SyncFullSchemaPropertiesListResult] operation results. # - def list_member_schemas_next(next_page_link, custom_headers:nil) - response = list_member_schemas_next_async(next_page_link, custom_headers:custom_headers).value! + def list_member_schemas_next(next_page_link, custom_headers = nil) + response = list_member_schemas_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -1172,8 +1168,8 @@ def list_member_schemas_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_member_schemas_next_with_http_info(next_page_link, custom_headers:nil) - list_member_schemas_next_async(next_page_link, custom_headers:custom_headers).value! + def list_member_schemas_next_with_http_info(next_page_link, custom_headers = nil) + list_member_schemas_next_async(next_page_link, custom_headers).value! end # @@ -1186,12 +1182,11 @@ def list_member_schemas_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_member_schemas_next_async(next_page_link, custom_headers:nil) + def list_member_schemas_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 @@ -1251,12 +1246,12 @@ def list_member_schemas_next_async(next_page_link, custom_headers:nil) # @return [SyncMemberListResult] which provide lazy access to pages of the # response. # - def list_by_sync_group_as_lazy(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) - response = list_by_sync_group_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! + def list_by_sync_group_as_lazy(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + response = list_by_sync_group_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_sync_group_next_async(next_page_link, custom_headers:custom_headers) + list_by_sync_group_next_async(next_page_link, custom_headers) end page end @@ -1280,12 +1275,12 @@ def list_by_sync_group_as_lazy(resource_group_name, server_name, database_name, # @return [SyncFullSchemaPropertiesListResult] which provide lazy access to # pages of the response. # - def list_member_schemas_as_lazy(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:nil) - response = list_member_schemas_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers:custom_headers).value! + def list_member_schemas_as_lazy(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + response = list_member_schemas_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_member_schemas_next_async(next_page_link, custom_headers:custom_headers) + list_member_schemas_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/version.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/version.rb new file mode 100644 index 0000000000..dc66eff99e --- /dev/null +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/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::SQL::Mgmt::V2015_05_01_preview + VERSION = '0.16.0' +end diff --git a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/virtual_network_rules.rb b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/virtual_network_rules.rb index 1854126d49..60d9f9a2bc 100644 --- a/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/virtual_network_rules.rb +++ b/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/virtual_network_rules.rb @@ -38,8 +38,8 @@ def initialize(client) # # @return [VirtualNetworkRule] operation results. # - def get(resource_group_name, server_name, virtual_network_rule_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, virtual_network_rule_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, virtual_network_rule_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, virtual_network_rule_name, custom_headers).value! response.body unless response.nil? end @@ -57,8 +57,8 @@ def get(resource_group_name, server_name, virtual_network_rule_name, custom_head # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, virtual_network_rule_name, custom_headers:nil) - get_async(resource_group_name, server_name, virtual_network_rule_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, virtual_network_rule_name, custom_headers = nil) + get_async(resource_group_name, server_name, virtual_network_rule_name, custom_headers).value! end # @@ -75,7 +75,7 @@ def get_with_http_info(resource_group_name, server_name, virtual_network_rule_na # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, virtual_network_rule_name, custom_headers:nil) + def get_async(resource_group_name, server_name, virtual_network_rule_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'virtual_network_rule_name is nil' if virtual_network_rule_name.nil? @@ -84,7 +84,6 @@ def get_async(resource_group_name, server_name, virtual_network_rule_name, custo request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -145,8 +144,8 @@ def get_async(resource_group_name, server_name, virtual_network_rule_name, custo # # @return [VirtualNetworkRule] operation results. # - def create_or_update(resource_group_name, server_name, virtual_network_rule_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, virtual_network_rule_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, virtual_network_rule_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, virtual_network_rule_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -165,9 +164,9 @@ def create_or_update(resource_group_name, server_name, virtual_network_rule_name # @return [Concurrent::Promise] promise which provides async access to http # response. # - def create_or_update_async(resource_group_name, server_name, virtual_network_rule_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, virtual_network_rule_name, parameters, custom_headers = nil) # Send request - promise = begin_create_or_update_async(resource_group_name, server_name, virtual_network_rule_name, parameters, custom_headers:custom_headers) + promise = begin_create_or_update_async(resource_group_name, server_name, virtual_network_rule_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -195,8 +194,8 @@ def create_or_update_async(resource_group_name, server_name, virtual_network_rul # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - def delete(resource_group_name, server_name, virtual_network_rule_name, custom_headers:nil) - response = delete_async(resource_group_name, server_name, virtual_network_rule_name, custom_headers:custom_headers).value! + def delete(resource_group_name, server_name, virtual_network_rule_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, virtual_network_rule_name, custom_headers).value! nil end @@ -213,9 +212,9 @@ def delete(resource_group_name, server_name, virtual_network_rule_name, custom_h # @return [Concurrent::Promise] promise which provides async access to http # response. # - def delete_async(resource_group_name, server_name, virtual_network_rule_name, custom_headers:nil) + def delete_async(resource_group_name, server_name, virtual_network_rule_name, custom_headers = nil) # Send request - promise = begin_delete_async(resource_group_name, server_name, virtual_network_rule_name, custom_headers:custom_headers) + promise = begin_delete_async(resource_group_name, server_name, virtual_network_rule_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -241,8 +240,8 @@ def delete_async(resource_group_name, server_name, virtual_network_rule_name, cu # # @return [Array] operation results. # - def list_by_server(resource_group_name, server_name, custom_headers:nil) - first_page = list_by_server_as_lazy(resource_group_name, server_name, custom_headers:custom_headers) + def list_by_server(resource_group_name, server_name, custom_headers = nil) + first_page = list_by_server_as_lazy(resource_group_name, server_name, custom_headers) first_page.get_all_items end @@ -258,8 +257,8 @@ def list_by_server(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil) - list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! end # @@ -274,7 +273,7 @@ def list_by_server_with_http_info(resource_group_name, server_name, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_async(resource_group_name, server_name, custom_headers:nil) + def list_by_server_async(resource_group_name, server_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -282,7 +281,6 @@ def list_by_server_async(resource_group_name, server_name, custom_headers: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 +341,8 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) # # @return [VirtualNetworkRule] operation results. # - def begin_create_or_update(resource_group_name, server_name, virtual_network_rule_name, parameters, custom_headers:nil) - response = begin_create_or_update_async(resource_group_name, server_name, virtual_network_rule_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update(resource_group_name, server_name, virtual_network_rule_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, virtual_network_rule_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -364,8 +362,8 @@ def begin_create_or_update(resource_group_name, server_name, virtual_network_rul # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_create_or_update_with_http_info(resource_group_name, server_name, virtual_network_rule_name, parameters, custom_headers:nil) - begin_create_or_update_async(resource_group_name, server_name, virtual_network_rule_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update_with_http_info(resource_group_name, server_name, virtual_network_rule_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, virtual_network_rule_name, parameters, custom_headers).value! end # @@ -384,7 +382,7 @@ def begin_create_or_update_with_http_info(resource_group_name, server_name, virt # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_create_or_update_async(resource_group_name, server_name, virtual_network_rule_name, parameters, custom_headers:nil) + def begin_create_or_update_async(resource_group_name, server_name, virtual_network_rule_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'virtual_network_rule_name is nil' if virtual_network_rule_name.nil? @@ -394,12 +392,13 @@ def begin_create_or_update_async(resource_group_name, server_name, virtual_netwo 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::SQL::Mgmt::V2015_05_01_preview::Models::VirtualNetworkRule.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -469,8 +468,8 @@ def begin_create_or_update_async(resource_group_name, server_name, virtual_netwo # will be added to the HTTP request. # # - def begin_delete(resource_group_name, server_name, virtual_network_rule_name, custom_headers:nil) - response = begin_delete_async(resource_group_name, server_name, virtual_network_rule_name, custom_headers:custom_headers).value! + def begin_delete(resource_group_name, server_name, virtual_network_rule_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, server_name, virtual_network_rule_name, custom_headers).value! nil end @@ -488,8 +487,8 @@ def begin_delete(resource_group_name, server_name, virtual_network_rule_name, cu # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_delete_with_http_info(resource_group_name, server_name, virtual_network_rule_name, custom_headers:nil) - begin_delete_async(resource_group_name, server_name, virtual_network_rule_name, custom_headers:custom_headers).value! + def begin_delete_with_http_info(resource_group_name, server_name, virtual_network_rule_name, custom_headers = nil) + begin_delete_async(resource_group_name, server_name, virtual_network_rule_name, custom_headers).value! end # @@ -506,7 +505,7 @@ def begin_delete_with_http_info(resource_group_name, server_name, virtual_networ # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_delete_async(resource_group_name, server_name, virtual_network_rule_name, custom_headers:nil) + def begin_delete_async(resource_group_name, server_name, virtual_network_rule_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'virtual_network_rule_name is nil' if virtual_network_rule_name.nil? @@ -515,7 +514,6 @@ def begin_delete_async(resource_group_name, server_name, virtual_network_rule_na request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -560,8 +558,8 @@ def begin_delete_async(resource_group_name, server_name, virtual_network_rule_na # # @return [VirtualNetworkRuleListResult] operation results. # - def list_by_server_next(next_page_link, custom_headers:nil) - response = list_by_server_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_server_next(next_page_link, custom_headers = nil) + response = list_by_server_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -575,8 +573,8 @@ def list_by_server_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_next_with_http_info(next_page_link, custom_headers:nil) - list_by_server_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_server_next_with_http_info(next_page_link, custom_headers = nil) + list_by_server_next_async(next_page_link, custom_headers).value! end # @@ -589,12 +587,11 @@ def list_by_server_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_next_async(next_page_link, custom_headers:nil) + def list_by_server_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 @@ -651,12 +648,12 @@ def list_by_server_next_async(next_page_link, custom_headers:nil) # @return [VirtualNetworkRuleListResult] which provide lazy access to pages of # the response. # - def list_by_server_as_lazy(resource_group_name, server_name, custom_headers:nil) - response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_as_lazy(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_server_next_async(next_page_link, custom_headers:custom_headers) + list_by_server_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql.rb index c5559b9947..347a03c6bb 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql.rb @@ -20,43 +20,113 @@ require 'ms_rest_azure' module Azure::SQL::Mgmt::V2017_03_01_preview + autoload :ExtendedDatabaseBlobAuditingPolicies, '2017-03-01-preview/generated/azure_mgmt_sql/extended_database_blob_auditing_policies.rb' + autoload :ExtendedServerBlobAuditingPolicies, '2017-03-01-preview/generated/azure_mgmt_sql/extended_server_blob_auditing_policies.rb' + autoload :ServerBlobAuditingPolicies, '2017-03-01-preview/generated/azure_mgmt_sql/server_blob_auditing_policies.rb' + autoload :DatabaseBlobAuditingPolicies, '2017-03-01-preview/generated/azure_mgmt_sql/database_blob_auditing_policies.rb' autoload :DatabaseOperations, '2017-03-01-preview/generated/azure_mgmt_sql/database_operations.rb' autoload :Databases, '2017-03-01-preview/generated/azure_mgmt_sql/databases.rb' - autoload :DatabaseRestorePoints, '2017-03-01-preview/generated/azure_mgmt_sql/database_restore_points.rb' + autoload :DatabaseVulnerabilityAssessmentRuleBaselines, '2017-03-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessment_rule_baselines.rb' + autoload :DatabaseVulnerabilityAssessments, '2017-03-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessments.rb' + autoload :DataWarehouseUserActivitiesOperations, '2017-03-01-preview/generated/azure_mgmt_sql/data_warehouse_user_activities_operations.rb' + autoload :JobAgents, '2017-03-01-preview/generated/azure_mgmt_sql/job_agents.rb' + autoload :JobCredentials, '2017-03-01-preview/generated/azure_mgmt_sql/job_credentials.rb' + autoload :JobExecutions, '2017-03-01-preview/generated/azure_mgmt_sql/job_executions.rb' + autoload :Jobs, '2017-03-01-preview/generated/azure_mgmt_sql/jobs.rb' + autoload :JobStepExecutions, '2017-03-01-preview/generated/azure_mgmt_sql/job_step_executions.rb' + autoload :JobSteps, '2017-03-01-preview/generated/azure_mgmt_sql/job_steps.rb' + autoload :JobTargetExecutions, '2017-03-01-preview/generated/azure_mgmt_sql/job_target_executions.rb' + autoload :JobTargetGroups, '2017-03-01-preview/generated/azure_mgmt_sql/job_target_groups.rb' + autoload :JobVersions, '2017-03-01-preview/generated/azure_mgmt_sql/job_versions.rb' + autoload :LongTermRetentionBackups, '2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb' + autoload :BackupLongTermRetentionPolicies, '2017-03-01-preview/generated/azure_mgmt_sql/backup_long_term_retention_policies.rb' + autoload :ManagedDatabases, '2017-03-01-preview/generated/azure_mgmt_sql/managed_databases.rb' + autoload :RestorePoints, '2017-03-01-preview/generated/azure_mgmt_sql/restore_points.rb' autoload :ServerAutomaticTuningOperations, '2017-03-01-preview/generated/azure_mgmt_sql/server_automatic_tuning_operations.rb' autoload :ServerDnsAliases, '2017-03-01-preview/generated/azure_mgmt_sql/server_dns_aliases.rb' autoload :SqlManagementClient, '2017-03-01-preview/generated/azure_mgmt_sql/sql_management_client.rb' module Models + autoload :JobSchedule, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_schedule.rb' + autoload :JobCredentialListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_credential_list_result.rb' + autoload :VulnerabilityAssessmentRecurringScansProperties, '2017-03-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_recurring_scans_properties.rb' + autoload :ManagedDatabaseUpdate, '2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_update.rb' + autoload :JobTargetGroupListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group_list_result.rb' + autoload :ResourceMoveDefinition, '2017-03-01-preview/generated/azure_mgmt_sql/models/resource_move_definition.rb' + autoload :ServerDnsAliasListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias_list_result.rb' + autoload :RestorePointListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/restore_point_list_result.rb' + autoload :JobTarget, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_target.rb' + autoload :LongTermRetentionBackupListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_backup_list_result.rb' + autoload :JobAgentListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_list_result.rb' + autoload :CreateDatabaseRestorePointDefinition, '2017-03-01-preview/generated/azure_mgmt_sql/models/create_database_restore_point_definition.rb' + autoload :JobAgentUpdate, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_update.rb' autoload :DatabaseUpdate, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_update.rb' + autoload :JobStepListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_list_result.rb' + autoload :JobVersionListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_version_list_result.rb' + autoload :ServerDnsAliasAcquisition, '2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias_acquisition.rb' autoload :AutomaticTuningServerOptions, '2017-03-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_server_options.rb' - autoload :DatabaseOperationListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_operation_list_result.rb' - autoload :CreateDatabaseRestorePointDefinition, '2017-03-01-preview/generated/azure_mgmt_sql/models/create_database_restore_point_definition.rb' - autoload :DatabaseRestorePointListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_restore_point_list_result.rb' - autoload :ArmSku, '2017-03-01-preview/generated/azure_mgmt_sql/models/arm_sku.rb' + autoload :JobExecutionTarget, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_target.rb' + autoload :CompleteDatabaseRestoreDefinition, '2017-03-01-preview/generated/azure_mgmt_sql/models/complete_database_restore_definition.rb' + autoload :JobStepExecutionOptions, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_execution_options.rb' + autoload :Sku, '2017-03-01-preview/generated/azure_mgmt_sql/models/sku.rb' + autoload :JobExecutionListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_list_result.rb' autoload :ImportExportDatabaseDefinition, '2017-03-01-preview/generated/azure_mgmt_sql/models/import_export_database_definition.rb' - autoload :DatabaseListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_list_result.rb' - autoload :ServerDnsAliasListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias_list_result.rb' - autoload :ResourceMoveDefinition, '2017-03-01-preview/generated/azure_mgmt_sql/models/resource_move_definition.rb' autoload :Resource, '2017-03-01-preview/generated/azure_mgmt_sql/models/resource.rb' - autoload :ServerDnsAliasAcquisition, '2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias_acquisition.rb' + autoload :ManagedDatabaseListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_list_result.rb' + autoload :DatabaseListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_list_result.rb' + autoload :JobListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_list_result.rb' + autoload :DatabaseOperationListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_operation_list_result.rb' + autoload :JobStepAction, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action.rb' + autoload :DatabaseVulnerabilityAssessmentRuleBaselineItem, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_rule_baseline_item.rb' + autoload :JobStepOutput, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_output.rb' autoload :ProxyResource, '2017-03-01-preview/generated/azure_mgmt_sql/models/proxy_resource.rb' + autoload :ExtendedDatabaseBlobAuditingPolicy, '2017-03-01-preview/generated/azure_mgmt_sql/models/extended_database_blob_auditing_policy.rb' + autoload :ExtendedServerBlobAuditingPolicy, '2017-03-01-preview/generated/azure_mgmt_sql/models/extended_server_blob_auditing_policy.rb' + autoload :ServerBlobAuditingPolicy, '2017-03-01-preview/generated/azure_mgmt_sql/models/server_blob_auditing_policy.rb' + autoload :DatabaseBlobAuditingPolicy, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb' autoload :DatabaseOperation, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_operation.rb' autoload :TrackedResource, '2017-03-01-preview/generated/azure_mgmt_sql/models/tracked_resource.rb' autoload :Database, '2017-03-01-preview/generated/azure_mgmt_sql/models/database.rb' autoload :ImportExportOperationResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/import_export_operation_result.rb' - autoload :DatabaseRestorePoint, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_restore_point.rb' + autoload :DatabaseVulnerabilityAssessmentRuleBaseline, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_rule_baseline.rb' + autoload :DatabaseVulnerabilityAssessment, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment.rb' + autoload :DataWarehouseUserActivities, '2017-03-01-preview/generated/azure_mgmt_sql/models/data_warehouse_user_activities.rb' + autoload :JobAgent, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent.rb' + autoload :JobCredential, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_credential.rb' + autoload :JobExecution, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution.rb' + autoload :Job, '2017-03-01-preview/generated/azure_mgmt_sql/models/job.rb' + autoload :JobStep, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_step.rb' + autoload :JobTargetGroup, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group.rb' + autoload :JobVersion, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_version.rb' + autoload :LongTermRetentionBackup, '2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_backup.rb' + autoload :BackupLongTermRetentionPolicy, '2017-03-01-preview/generated/azure_mgmt_sql/models/backup_long_term_retention_policy.rb' + autoload :ManagedDatabase, '2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database.rb' + autoload :RestorePoint, '2017-03-01-preview/generated/azure_mgmt_sql/models/restore_point.rb' autoload :ServerAutomaticTuning, '2017-03-01-preview/generated/azure_mgmt_sql/models/server_automatic_tuning.rb' autoload :ServerDnsAlias, '2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias.rb' + autoload :BlobAuditingPolicyState, '2017-03-01-preview/generated/azure_mgmt_sql/models/blob_auditing_policy_state.rb' autoload :ManagementOperationState, '2017-03-01-preview/generated/azure_mgmt_sql/models/management_operation_state.rb' autoload :CreateMode, '2017-03-01-preview/generated/azure_mgmt_sql/models/create_mode.rb' autoload :SampleName, '2017-03-01-preview/generated/azure_mgmt_sql/models/sample_name.rb' - autoload :Status, '2017-03-01-preview/generated/azure_mgmt_sql/models/status.rb' + autoload :DatabaseStatus, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_status.rb' autoload :CatalogCollationType, '2017-03-01-preview/generated/azure_mgmt_sql/models/catalog_collation_type.rb' + autoload :JobAgentState, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_state.rb' + autoload :JobExecutionLifecycle, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_lifecycle.rb' + autoload :ProvisioningState, '2017-03-01-preview/generated/azure_mgmt_sql/models/provisioning_state.rb' + autoload :JobTargetType, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_type.rb' + autoload :JobScheduleType, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_schedule_type.rb' + autoload :JobStepActionType, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action_type.rb' + autoload :JobStepActionSource, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action_source.rb' + autoload :JobStepOutputType, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_output_type.rb' + autoload :JobTargetGroupMembershipType, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group_membership_type.rb' + autoload :ManagedDatabaseStatus, '2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_status.rb' + autoload :ManagedDatabaseCreateMode, '2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_create_mode.rb' autoload :RestorePointType, '2017-03-01-preview/generated/azure_mgmt_sql/models/restore_point_type.rb' autoload :AutomaticTuningServerMode, '2017-03-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_server_mode.rb' autoload :AutomaticTuningOptionModeDesired, '2017-03-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_option_mode_desired.rb' autoload :AutomaticTuningOptionModeActual, '2017-03-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_option_mode_actual.rb' autoload :AutomaticTuningServerReason, '2017-03-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_server_reason.rb' + autoload :LongTermRetentionDatabaseState, '2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_database_state.rb' + autoload :VulnerabilityAssessmentPolicyBaselineName, '2017-03-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_policy_baseline_name.rb' end end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/backup_long_term_retention_policies.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/backup_long_term_retention_policies.rb new file mode 100644 index 0000000000..019db8756a --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/backup_long_term_retention_policies.rb @@ -0,0 +1,401 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class BackupLongTermRetentionPolicies + include MsRestAzure + + # + # Creates and initializes a new instance of the BackupLongTermRetentionPolicies class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets a database's long term retention policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackupLongTermRetentionPolicy] operation results. + # + def get(resource_group_name, server_name, database_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a database's long term retention policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Gets a database's long term retention policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, database_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + policy_name = 'default' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'policyName' => policy_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::BackupLongTermRetentionPolicy.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 + + # + # Sets a database's long term retention policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [BackupLongTermRetentionPolicy] The long term retention + # policy info. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackupLongTermRetentionPolicy] operation results. + # + def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [BackupLongTermRetentionPolicy] The long term retention + # policy info. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::BackupLongTermRetentionPolicy.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets a database's long term retention policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackupLongTermRetentionPolicy] operation results. + # + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a database's long term retention policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @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_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Gets a database's long term retention policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @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_database_async(resource_group_name, server_name, database_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::BackupLongTermRetentionPolicy.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 + + # + # Sets a database's long term retention policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [BackupLongTermRetentionPolicy] The long term retention + # policy info. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackupLongTermRetentionPolicy] operation results. + # + def begin_create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Sets a database's long term retention policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [BackupLongTermRetentionPolicy] The long term retention + # policy info. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + end + + # + # Sets a database's long term retention policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [BackupLongTermRetentionPolicy] The long term retention + # policy info. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + policy_name = 'default' + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::BackupLongTermRetentionPolicy.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'policyName' => policy_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::BackupLongTermRetentionPolicy.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 + + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/data_warehouse_user_activities_operations.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/data_warehouse_user_activities_operations.rb new file mode 100644 index 0000000000..71c53e8602 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/data_warehouse_user_activities_operations.rb @@ -0,0 +1,133 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class DataWarehouseUserActivitiesOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the DataWarehouseUserActivitiesOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets the user activities of a data warehouse which includes running and + # suspended queries + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DataWarehouseUserActivities] operation results. + # + def get(resource_group_name, server_name, database_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the user activities of a data warehouse which includes running and + # suspended queries + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Gets the user activities of a data warehouse which includes running and + # suspended queries + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, database_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + data_warehouse_user_activity_name = 'current' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/databases/{databaseName}/dataWarehouseUserActivities/{dataWarehouseUserActivityName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'dataWarehouseUserActivityName' => data_warehouse_user_activity_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DataWarehouseUserActivities.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 + + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_blob_auditing_policies.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_blob_auditing_policies.rb new file mode 100644 index 0000000000..396167a21b --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_blob_auditing_policies.rb @@ -0,0 +1,258 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class DatabaseBlobAuditingPolicies + include MsRestAzure + + # + # Creates and initializes a new instance of the DatabaseBlobAuditingPolicies class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets a database's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DatabaseBlobAuditingPolicy] operation results. + # + def get(resource_group_name, server_name, database_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a database's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Gets a database's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, database_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + blob_auditing_policy_name = 'default' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'blobAuditingPolicyName' => blob_auditing_policy_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseBlobAuditingPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates or updates a database's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [DatabaseBlobAuditingPolicy] The database blob auditing + # policy. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DatabaseBlobAuditingPolicy] operation results. + # + def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a database's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [DatabaseBlobAuditingPolicy] The database blob auditing + # policy. + # @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 create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + end + + # + # Creates or updates a database's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [DatabaseBlobAuditingPolicy] The database blob auditing + # policy. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + blob_auditing_policy_name = 'default' + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseBlobAuditingPolicy.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'blobAuditingPolicyName' => blob_auditing_policy_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail 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::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseBlobAuditingPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseBlobAuditingPolicy.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 + + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_operations.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_operations.rb index 8656c52c7d..a7932b700e 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_operations.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_operations.rb @@ -5,10 +5,10 @@ module Azure::SQL::Mgmt::V2017_03_01_preview # - # The Azure SQL Database management API provides a RESTful set of web APIs - # that interact with Azure SQL Database services to manage your databases. - # The API enables users to create, retrieve, update, and delete databases, - # servers, and other entities. + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. # class DatabaseOperations include MsRestAzure @@ -37,8 +37,8 @@ def initialize(client) # will be added to the HTTP request. # # - def cancel(resource_group_name, server_name, database_name, operation_id, custom_headers:nil) - response = cancel_async(resource_group_name, server_name, database_name, operation_id, custom_headers:custom_headers).value! + def cancel(resource_group_name, server_name, database_name, operation_id, custom_headers = nil) + response = cancel_async(resource_group_name, server_name, database_name, operation_id, custom_headers).value! nil end @@ -56,8 +56,8 @@ def cancel(resource_group_name, server_name, database_name, operation_id, custom # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def cancel_with_http_info(resource_group_name, server_name, database_name, operation_id, custom_headers:nil) - cancel_async(resource_group_name, server_name, database_name, operation_id, custom_headers:custom_headers).value! + def cancel_with_http_info(resource_group_name, server_name, database_name, operation_id, custom_headers = nil) + cancel_async(resource_group_name, server_name, database_name, operation_id, custom_headers).value! end # @@ -74,7 +74,7 @@ def cancel_with_http_info(resource_group_name, server_name, database_name, opera # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def cancel_async(resource_group_name, server_name, database_name, operation_id, custom_headers:nil) + def cancel_async(resource_group_name, server_name, database_name, operation_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -84,7 +84,6 @@ def cancel_async(resource_group_name, server_name, database_name, operation_id, request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -132,8 +131,8 @@ def cancel_async(resource_group_name, server_name, database_name, operation_id, # # @return [Array] operation results. # - def list_by_database(resource_group_name, server_name, database_name, custom_headers:nil) - first_page = list_by_database_as_lazy(resource_group_name, server_name, database_name, custom_headers:custom_headers) + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + first_page = list_by_database_as_lazy(resource_group_name, server_name, database_name, custom_headers) first_page.get_all_items end @@ -150,8 +149,8 @@ def list_by_database(resource_group_name, server_name, database_name, custom_hea # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -167,7 +166,7 @@ def list_by_database_with_http_info(resource_group_name, server_name, database_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_database_async(resource_group_name, server_name, database_name, custom_headers:nil) + def list_by_database_async(resource_group_name, server_name, database_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -176,7 +175,6 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -231,8 +229,8 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust # # @return [DatabaseOperationListResult] operation results. # - def list_by_database_next(next_page_link, custom_headers:nil) - response = list_by_database_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_database_next(next_page_link, custom_headers = nil) + response = list_by_database_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -246,8 +244,8 @@ def list_by_database_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_database_next_with_http_info(next_page_link, custom_headers:nil) - list_by_database_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_database_next_with_http_info(next_page_link, custom_headers = nil) + list_by_database_next_async(next_page_link, custom_headers).value! end # @@ -260,12 +258,11 @@ def list_by_database_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_database_next_async(next_page_link, custom_headers:nil) + def list_by_database_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 @@ -323,12 +320,12 @@ def list_by_database_next_async(next_page_link, custom_headers:nil) # @return [DatabaseOperationListResult] which provide lazy access to pages of # the response. # - def list_by_database_as_lazy(resource_group_name, server_name, database_name, custom_headers:nil) - response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def list_by_database_as_lazy(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_database_next_async(next_page_link, custom_headers:custom_headers) + list_by_database_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessment_rule_baselines.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessment_rule_baselines.rb new file mode 100644 index 0000000000..ad4f12a92d --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessment_rule_baselines.rb @@ -0,0 +1,399 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class DatabaseVulnerabilityAssessmentRuleBaselines + include MsRestAzure + + # + # Creates and initializes a new instance of the DatabaseVulnerabilityAssessmentRuleBaselines class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets a database's vulnerability assessment rule baseline. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # vulnerability assessment rule baseline is defined. + # @param rule_id [String] The vulnerability assessment rule ID. + # @param baseline_name [VulnerabilityAssessmentPolicyBaselineName] The name of + # the vulnerability assessment rule baseline (default implies a baseline on a + # database level rule and master for server level rule). Possible values + # include: 'master', 'default' + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DatabaseVulnerabilityAssessmentRuleBaseline] operation results. + # + def get(resource_group_name, server_name, database_name, rule_id, baseline_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, rule_id, baseline_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a database's vulnerability assessment rule baseline. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # vulnerability assessment rule baseline is defined. + # @param rule_id [String] The vulnerability assessment rule ID. + # @param baseline_name [VulnerabilityAssessmentPolicyBaselineName] The name of + # the vulnerability assessment rule baseline (default implies a baseline on a + # database level rule and master for server level rule). Possible values + # include: 'master', 'default' + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, database_name, rule_id, baseline_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, rule_id, baseline_name, custom_headers).value! + end + + # + # Gets a database's vulnerability assessment rule baseline. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # vulnerability assessment rule baseline is defined. + # @param rule_id [String] The vulnerability assessment rule ID. + # @param baseline_name [VulnerabilityAssessmentPolicyBaselineName] The name of + # the vulnerability assessment rule baseline (default implies a baseline on a + # database level rule and master for server level rule). Possible values + # include: 'master', 'default' + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, database_name, rule_id, baseline_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + vulnerability_assessment_name = 'default' + fail ArgumentError, 'rule_id is nil' if rule_id.nil? + fail ArgumentError, 'baseline_name is nil' if baseline_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'vulnerabilityAssessmentName' => vulnerability_assessment_name,'ruleId' => rule_id,'baselineName' => baseline_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseVulnerabilityAssessmentRuleBaseline.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates or updates a database's vulnerability assessment rule baseline. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # vulnerability assessment rule baseline is defined. + # @param rule_id [String] The vulnerability assessment rule ID. + # @param baseline_name [VulnerabilityAssessmentPolicyBaselineName] The name of + # the vulnerability assessment rule baseline (default implies a baseline on a + # database level rule and master for server level rule). Possible values + # include: 'master', 'default' + # @param parameters [DatabaseVulnerabilityAssessmentRuleBaseline] The requested + # rule baseline resource. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DatabaseVulnerabilityAssessmentRuleBaseline] operation results. + # + def create_or_update(resource_group_name, server_name, database_name, rule_id, baseline_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, rule_id, baseline_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a database's vulnerability assessment rule baseline. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # vulnerability assessment rule baseline is defined. + # @param rule_id [String] The vulnerability assessment rule ID. + # @param baseline_name [VulnerabilityAssessmentPolicyBaselineName] The name of + # the vulnerability assessment rule baseline (default implies a baseline on a + # database level rule and master for server level rule). Possible values + # include: 'master', 'default' + # @param parameters [DatabaseVulnerabilityAssessmentRuleBaseline] The requested + # rule baseline resource. + # @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 create_or_update_with_http_info(resource_group_name, server_name, database_name, rule_id, baseline_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, database_name, rule_id, baseline_name, parameters, custom_headers).value! + end + + # + # Creates or updates a database's vulnerability assessment rule baseline. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # vulnerability assessment rule baseline is defined. + # @param rule_id [String] The vulnerability assessment rule ID. + # @param baseline_name [VulnerabilityAssessmentPolicyBaselineName] The name of + # the vulnerability assessment rule baseline (default implies a baseline on a + # database level rule and master for server level rule). Possible values + # include: 'master', 'default' + # @param parameters [DatabaseVulnerabilityAssessmentRuleBaseline] The requested + # rule baseline resource. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_async(resource_group_name, server_name, database_name, rule_id, baseline_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + vulnerability_assessment_name = 'default' + fail ArgumentError, 'rule_id is nil' if rule_id.nil? + fail ArgumentError, 'baseline_name is nil' if baseline_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseVulnerabilityAssessmentRuleBaseline.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'vulnerabilityAssessmentName' => vulnerability_assessment_name,'ruleId' => rule_id,'baselineName' => baseline_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + 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::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseVulnerabilityAssessmentRuleBaseline.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 + + # + # Removes the database's vulnerability assessment rule baseline. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # vulnerability assessment rule baseline is defined. + # @param rule_id [String] The vulnerability assessment rule ID. + # @param baseline_name [VulnerabilityAssessmentPolicyBaselineName] The name of + # the vulnerability assessment rule baseline (default implies a baseline on a + # database level rule and master for server level rule). Possible values + # include: 'master', 'default' + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, server_name, database_name, rule_id, baseline_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, database_name, rule_id, baseline_name, custom_headers).value! + nil + end + + # + # Removes the database's vulnerability assessment rule baseline. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # vulnerability assessment rule baseline is defined. + # @param rule_id [String] The vulnerability assessment rule ID. + # @param baseline_name [VulnerabilityAssessmentPolicyBaselineName] The name of + # the vulnerability assessment rule baseline (default implies a baseline on a + # database level rule and master for server level rule). Possible values + # include: 'master', 'default' + # @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 delete_with_http_info(resource_group_name, server_name, database_name, rule_id, baseline_name, custom_headers = nil) + delete_async(resource_group_name, server_name, database_name, rule_id, baseline_name, custom_headers).value! + end + + # + # Removes the database's vulnerability assessment rule baseline. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # vulnerability assessment rule baseline is defined. + # @param rule_id [String] The vulnerability assessment rule ID. + # @param baseline_name [VulnerabilityAssessmentPolicyBaselineName] The name of + # the vulnerability assessment rule baseline (default implies a baseline on a + # database level rule and master for server level rule). Possible values + # include: 'master', 'default' + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, server_name, database_name, rule_id, baseline_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + vulnerability_assessment_name = 'default' + fail ArgumentError, 'rule_id is nil' if rule_id.nil? + fail ArgumentError, 'baseline_name is nil' if baseline_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'vulnerabilityAssessmentName' => vulnerability_assessment_name,'ruleId' => rule_id,'baselineName' => baseline_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessments.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessments.rb new file mode 100644 index 0000000000..dd452de45a --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessments.rb @@ -0,0 +1,355 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class DatabaseVulnerabilityAssessments + include MsRestAzure + + # + # Creates and initializes a new instance of the DatabaseVulnerabilityAssessments class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets the database's vulnerability assessment. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # vulnerability assessment is defined. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DatabaseVulnerabilityAssessment] operation results. + # + def get(resource_group_name, server_name, database_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the database's vulnerability assessment. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # vulnerability assessment is defined. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Gets the database's vulnerability assessment. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # vulnerability assessment is defined. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, database_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + vulnerability_assessment_name = 'default' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'vulnerabilityAssessmentName' => vulnerability_assessment_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseVulnerabilityAssessment.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates or updates the database's vulnerability assessment. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # vulnerability assessment is defined. + # @param parameters [DatabaseVulnerabilityAssessment] The requested resource. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DatabaseVulnerabilityAssessment] operation results. + # + def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates the database's vulnerability assessment. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # vulnerability assessment is defined. + # @param parameters [DatabaseVulnerabilityAssessment] The requested resource. + # @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 create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + end + + # + # Creates or updates the database's vulnerability assessment. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # vulnerability assessment is defined. + # @param parameters [DatabaseVulnerabilityAssessment] The requested resource. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + vulnerability_assessment_name = 'default' + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseVulnerabilityAssessment.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'vulnerabilityAssessmentName' => vulnerability_assessment_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail 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::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseVulnerabilityAssessment.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseVulnerabilityAssessment.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 + + # + # Removes the database's vulnerability assessment. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # vulnerability assessment is defined. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, server_name, database_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, database_name, custom_headers).value! + nil + end + + # + # Removes the database's vulnerability assessment. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # vulnerability assessment is defined. + # @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 delete_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + delete_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Removes the database's vulnerability assessment. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # vulnerability assessment is defined. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, server_name, database_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + vulnerability_assessment_name = 'default' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'vulnerabilityAssessmentName' => vulnerability_assessment_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/databases.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/databases.rb index 03eeb893f7..57327f87dd 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/databases.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/databases.rb @@ -5,10 +5,10 @@ module Azure::SQL::Mgmt::V2017_03_01_preview # - # The Azure SQL Database management API provides a RESTful set of web APIs - # that interact with Azure SQL Database services to manage your databases. - # The API enables users to create, retrieve, update, and delete databases, - # servers, and other entities. + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. # class Databases include MsRestAzure @@ -36,8 +36,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_server(resource_group_name, server_name, custom_headers:nil) - first_page = list_by_server_as_lazy(resource_group_name, server_name, custom_headers:custom_headers) + def list_by_server(resource_group_name, server_name, custom_headers = nil) + first_page = list_by_server_as_lazy(resource_group_name, server_name, custom_headers) first_page.get_all_items end @@ -53,8 +53,8 @@ def list_by_server(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil) - list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! end # @@ -69,7 +69,7 @@ def list_by_server_with_http_info(resource_group_name, server_name, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_async(resource_group_name, server_name, custom_headers:nil) + def list_by_server_async(resource_group_name, server_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -77,7 +77,6 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -135,8 +134,8 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) # # @return [Database] operation results. # - def get(resource_group_name, server_name, database_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, database_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -153,8 +152,8 @@ def get(resource_group_name, server_name, database_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -170,7 +169,7 @@ def get_with_http_info(resource_group_name, server_name, database_name, custom_h # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, database_name, custom_headers:nil) + def get_async(resource_group_name, server_name, database_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -179,7 +178,6 @@ def get_async(resource_group_name, server_name, database_name, custom_headers:ni request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -238,8 +236,8 @@ def get_async(resource_group_name, server_name, database_name, custom_headers:ni # # @return [Database] operation results. # - def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -256,9 +254,9 @@ def create_or_update(resource_group_name, server_name, database_name, parameters # @return [Concurrent::Promise] promise which provides async access to http # response. # - def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) # Send request - promise = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers) + promise = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -285,8 +283,8 @@ def create_or_update_async(resource_group_name, server_name, database_name, para # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - def delete(resource_group_name, server_name, database_name, custom_headers:nil) - response = delete_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def delete(resource_group_name, server_name, database_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, database_name, custom_headers).value! nil end @@ -302,9 +300,9 @@ def delete(resource_group_name, server_name, database_name, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def delete_async(resource_group_name, server_name, database_name, custom_headers:nil) + def delete_async(resource_group_name, server_name, database_name, custom_headers = nil) # Send request - promise = begin_delete_async(resource_group_name, server_name, database_name, custom_headers:custom_headers) + promise = begin_delete_async(resource_group_name, server_name, database_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -332,8 +330,8 @@ def delete_async(resource_group_name, server_name, database_name, custom_headers # # @return [Database] operation results. # - def update(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -350,9 +348,9 @@ def update(resource_group_name, server_name, database_name, parameters, custom_h # @return [Concurrent::Promise] promise which provides async access to http # response. # - def update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) # Send request - promise = begin_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers) + promise = begin_update_async(resource_group_name, server_name, database_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -383,8 +381,8 @@ def update_async(resource_group_name, server_name, database_name, parameters, cu # # @return [ImportExportOperationResult] operation results. # - def export(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = export_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def export(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = export_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -402,9 +400,9 @@ def export(resource_group_name, server_name, database_name, parameters, custom_h # @return [Concurrent::Promise] promise which provides async access to http # response. # - def export_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def export_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) # Send request - promise = begin_export_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers) + promise = begin_export_async(resource_group_name, server_name, database_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -433,8 +431,8 @@ def export_async(resource_group_name, server_name, database_name, parameters, cu # # @return [Database] operation results. # - def pause(resource_group_name, server_name, database_name, custom_headers:nil) - response = pause_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def pause(resource_group_name, server_name, database_name, custom_headers = nil) + response = pause_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -450,9 +448,9 @@ def pause(resource_group_name, server_name, database_name, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def pause_async(resource_group_name, server_name, database_name, custom_headers:nil) + def pause_async(resource_group_name, server_name, database_name, custom_headers = nil) # Send request - promise = begin_pause_async(resource_group_name, server_name, database_name, custom_headers:custom_headers) + promise = begin_pause_async(resource_group_name, server_name, database_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -481,8 +479,8 @@ def pause_async(resource_group_name, server_name, database_name, custom_headers: # # @return [Array] operation results. # - def list_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, custom_headers:nil) - first_page = list_by_elastic_pool_as_lazy(resource_group_name, server_name, elastic_pool_name, custom_headers:custom_headers) + def list_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + first_page = list_by_elastic_pool_as_lazy(resource_group_name, server_name, elastic_pool_name, custom_headers) first_page.get_all_items end @@ -499,8 +497,8 @@ def list_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, cu # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_elastic_pool_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers:nil) - list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers:custom_headers).value! + def list_by_elastic_pool_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! end # @@ -516,7 +514,7 @@ def list_by_elastic_pool_with_http_info(resource_group_name, server_name, elasti # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers:nil) + def list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'elastic_pool_name is nil' if elastic_pool_name.nil? @@ -525,7 +523,6 @@ def list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_na request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -583,8 +580,8 @@ def list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_na # # @return [Database] operation results. # - def resume(resource_group_name, server_name, database_name, custom_headers:nil) - response = resume_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def resume(resource_group_name, server_name, database_name, custom_headers = nil) + response = resume_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -600,9 +597,9 @@ def resume(resource_group_name, server_name, database_name, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def resume_async(resource_group_name, server_name, database_name, custom_headers:nil) + def resume_async(resource_group_name, server_name, database_name, custom_headers = nil) # Send request - promise = begin_resume_async(resource_group_name, server_name, database_name, custom_headers:custom_headers) + promise = begin_resume_async(resource_group_name, server_name, database_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -632,8 +629,8 @@ def resume_async(resource_group_name, server_name, database_name, custom_headers # will be added to the HTTP request. # # - def rename(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = rename_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def rename(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = rename_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! nil end @@ -652,8 +649,8 @@ def rename(resource_group_name, server_name, database_name, parameters, custom_h # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def rename_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - rename_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def rename_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + rename_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! end # @@ -671,7 +668,7 @@ def rename_with_http_info(resource_group_name, server_name, database_name, param # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def rename_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def rename_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -681,12 +678,13 @@ def rename_async(resource_group_name, server_name, database_name, parameters, cu 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::SQL::Mgmt::V2017_03_01_preview::Models::ResourceMoveDefinition.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -737,8 +735,8 @@ def rename_async(resource_group_name, server_name, database_name, parameters, cu # # @return [Database] operation results. # - def begin_create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -756,8 +754,8 @@ def begin_create_or_update(resource_group_name, server_name, database_name, para # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def begin_create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! end # @@ -774,7 +772,7 @@ def begin_create_or_update_with_http_info(resource_group_name, server_name, data # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -784,12 +782,13 @@ def begin_create_or_update_async(resource_group_name, server_name, database_name 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::SQL::Mgmt::V2017_03_01_preview::Models::Database.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -858,8 +857,8 @@ def begin_create_or_update_async(resource_group_name, server_name, database_name # will be added to the HTTP request. # # - def begin_delete(resource_group_name, server_name, database_name, custom_headers:nil) - response = begin_delete_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def begin_delete(resource_group_name, server_name, database_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, server_name, database_name, custom_headers).value! nil end @@ -876,8 +875,8 @@ def begin_delete(resource_group_name, server_name, database_name, custom_headers # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_delete_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - begin_delete_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def begin_delete_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + begin_delete_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -893,7 +892,7 @@ def begin_delete_with_http_info(resource_group_name, server_name, database_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_delete_async(resource_group_name, server_name, database_name, custom_headers:nil) + def begin_delete_async(resource_group_name, server_name, database_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -902,7 +901,6 @@ def begin_delete_async(resource_group_name, server_name, database_name, custom_h request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -951,8 +949,8 @@ def begin_delete_async(resource_group_name, server_name, database_name, custom_h # # @return [Database] operation results. # - def begin_update(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = begin_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def begin_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = begin_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -970,8 +968,8 @@ def begin_update(resource_group_name, server_name, database_name, parameters, cu # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - begin_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def begin_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + begin_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! end # @@ -988,7 +986,7 @@ def begin_update_with_http_info(resource_group_name, server_name, database_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def begin_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -998,12 +996,13 @@ def begin_update_async(resource_group_name, server_name, database_name, paramete 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::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseUpdate.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1065,8 +1064,8 @@ def begin_update_async(resource_group_name, server_name, database_name, paramete # # @return [ImportExportOperationResult] operation results. # - def begin_export(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - response = begin_export_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def begin_export(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = begin_export_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1085,8 +1084,8 @@ def begin_export(resource_group_name, server_name, database_name, parameters, cu # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_export_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil) - begin_export_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value! + def begin_export_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + begin_export_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! end # @@ -1104,7 +1103,7 @@ def begin_export_with_http_info(resource_group_name, server_name, database_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_export_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil) + def begin_export_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -1114,12 +1113,13 @@ def begin_export_async(resource_group_name, server_name, database_name, paramete 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::SQL::Mgmt::V2017_03_01_preview::Models::ImportExportDatabaseDefinition.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1179,8 +1179,8 @@ def begin_export_async(resource_group_name, server_name, database_name, paramete # # @return [Database] operation results. # - def begin_pause(resource_group_name, server_name, database_name, custom_headers:nil) - response = begin_pause_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def begin_pause(resource_group_name, server_name, database_name, custom_headers = nil) + response = begin_pause_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -1197,8 +1197,8 @@ def begin_pause(resource_group_name, server_name, database_name, custom_headers: # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_pause_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - begin_pause_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def begin_pause_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + begin_pause_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -1214,7 +1214,7 @@ def begin_pause_with_http_info(resource_group_name, server_name, database_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_pause_async(resource_group_name, server_name, database_name, custom_headers:nil) + def begin_pause_async(resource_group_name, server_name, database_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -1223,7 +1223,6 @@ def begin_pause_async(resource_group_name, server_name, database_name, custom_he request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1281,8 +1280,8 @@ def begin_pause_async(resource_group_name, server_name, database_name, custom_he # # @return [Database] operation results. # - def begin_resume(resource_group_name, server_name, database_name, custom_headers:nil) - response = begin_resume_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def begin_resume(resource_group_name, server_name, database_name, custom_headers = nil) + response = begin_resume_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end @@ -1299,8 +1298,8 @@ def begin_resume(resource_group_name, server_name, database_name, custom_headers # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_resume_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) - begin_resume_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! + def begin_resume_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + begin_resume_async(resource_group_name, server_name, database_name, custom_headers).value! end # @@ -1316,7 +1315,7 @@ def begin_resume_with_http_info(resource_group_name, server_name, database_name, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_resume_async(resource_group_name, server_name, database_name, custom_headers:nil) + def begin_resume_async(resource_group_name, server_name, database_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -1325,7 +1324,6 @@ def begin_resume_async(resource_group_name, server_name, database_name, custom_h request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1380,8 +1378,8 @@ def begin_resume_async(resource_group_name, server_name, database_name, custom_h # # @return [DatabaseListResult] operation results. # - def list_by_server_next(next_page_link, custom_headers:nil) - response = list_by_server_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_server_next(next_page_link, custom_headers = nil) + response = list_by_server_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -1395,8 +1393,8 @@ def list_by_server_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_next_with_http_info(next_page_link, custom_headers:nil) - list_by_server_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_server_next_with_http_info(next_page_link, custom_headers = nil) + list_by_server_next_async(next_page_link, custom_headers).value! end # @@ -1409,12 +1407,11 @@ def list_by_server_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_next_async(next_page_link, custom_headers:nil) + def list_by_server_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 @@ -1468,8 +1465,8 @@ def list_by_server_next_async(next_page_link, custom_headers:nil) # # @return [DatabaseListResult] operation results. # - def list_by_elastic_pool_next(next_page_link, custom_headers:nil) - response = list_by_elastic_pool_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_elastic_pool_next(next_page_link, custom_headers = nil) + response = list_by_elastic_pool_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -1483,8 +1480,8 @@ def list_by_elastic_pool_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_elastic_pool_next_with_http_info(next_page_link, custom_headers:nil) - list_by_elastic_pool_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_elastic_pool_next_with_http_info(next_page_link, custom_headers = nil) + list_by_elastic_pool_next_async(next_page_link, custom_headers).value! end # @@ -1497,12 +1494,11 @@ def list_by_elastic_pool_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_elastic_pool_next_async(next_page_link, custom_headers:nil) + def list_by_elastic_pool_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 @@ -1559,12 +1555,12 @@ def list_by_elastic_pool_next_async(next_page_link, custom_headers:nil) # @return [DatabaseListResult] which provide lazy access to pages of the # response. # - def list_by_server_as_lazy(resource_group_name, server_name, custom_headers:nil) - response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_as_lazy(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_server_next_async(next_page_link, custom_headers:custom_headers) + list_by_server_next_async(next_page_link, custom_headers) end page end @@ -1584,12 +1580,12 @@ def list_by_server_as_lazy(resource_group_name, server_name, custom_headers:nil) # @return [DatabaseListResult] which provide lazy access to pages of the # response. # - def list_by_elastic_pool_as_lazy(resource_group_name, server_name, elastic_pool_name, custom_headers:nil) - response = list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers:custom_headers).value! + def list_by_elastic_pool_as_lazy(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + response = list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_elastic_pool_next_async(next_page_link, custom_headers:custom_headers) + list_by_elastic_pool_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/extended_database_blob_auditing_policies.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/extended_database_blob_auditing_policies.rb new file mode 100644 index 0000000000..5ca6932353 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/extended_database_blob_auditing_policies.rb @@ -0,0 +1,258 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class ExtendedDatabaseBlobAuditingPolicies + include MsRestAzure + + # + # Creates and initializes a new instance of the ExtendedDatabaseBlobAuditingPolicies class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets an extended database's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ExtendedDatabaseBlobAuditingPolicy] operation results. + # + def get(resource_group_name, server_name, database_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets an extended database's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Gets an extended database's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, database_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + blob_auditing_policy_name = 'default' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'blobAuditingPolicyName' => blob_auditing_policy_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ExtendedDatabaseBlobAuditingPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates or updates an extended database's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [ExtendedDatabaseBlobAuditingPolicy] The extended database + # blob auditing policy. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ExtendedDatabaseBlobAuditingPolicy] operation results. + # + def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates an extended database's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [ExtendedDatabaseBlobAuditingPolicy] The extended database + # blob auditing policy. + # @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 create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + end + + # + # Creates or updates an extended database's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [ExtendedDatabaseBlobAuditingPolicy] The extended database + # blob auditing policy. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + blob_auditing_policy_name = 'default' + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ExtendedDatabaseBlobAuditingPolicy.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'blobAuditingPolicyName' => blob_auditing_policy_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail 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::SQL::Mgmt::V2017_03_01_preview::Models::ExtendedDatabaseBlobAuditingPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ExtendedDatabaseBlobAuditingPolicy.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 + + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/extended_server_blob_auditing_policies.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/extended_server_blob_auditing_policies.rb new file mode 100644 index 0000000000..cc7b50afe3 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/extended_server_blob_auditing_policies.rb @@ -0,0 +1,290 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class ExtendedServerBlobAuditingPolicies + include MsRestAzure + + # + # Creates and initializes a new instance of the ExtendedServerBlobAuditingPolicies class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets an extended server's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ExtendedServerBlobAuditingPolicy] operation results. + # + def get(resource_group_name, server_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets an extended server's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, custom_headers = nil) + get_async(resource_group_name, server_name, custom_headers).value! + end + + # + # Gets an extended server's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + blob_auditing_policy_name = 'default' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'blobAuditingPolicyName' => blob_auditing_policy_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ExtendedServerBlobAuditingPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates or updates an extended server's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [ExtendedServerBlobAuditingPolicy] Properties of extended + # blob auditing policy + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ExtendedServerBlobAuditingPolicy] operation results. + # + def create_or_update(resource_group_name, server_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [ExtendedServerBlobAuditingPolicy] Properties of extended + # blob auditing policy + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ExtendedServerBlobAuditingPolicy.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Creates or updates an extended server's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [ExtendedServerBlobAuditingPolicy] Properties of extended + # blob auditing policy + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ExtendedServerBlobAuditingPolicy] operation results. + # + def begin_create_or_update(resource_group_name, server_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates an extended server's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [ExtendedServerBlobAuditingPolicy] Properties of extended + # blob auditing policy + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! + end + + # + # Creates or updates an extended server's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [ExtendedServerBlobAuditingPolicy] Properties of extended + # blob auditing policy + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + blob_auditing_policy_name = 'default' + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ExtendedServerBlobAuditingPolicy.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'blobAuditingPolicyName' => blob_auditing_policy_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ExtendedServerBlobAuditingPolicy.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 + + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_agents.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_agents.rb new file mode 100644 index 0000000000..1cb8eda742 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_agents.rb @@ -0,0 +1,814 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class JobAgents + include MsRestAzure + + # + # Creates and initializes a new instance of the JobAgents class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets a list of job agents in a server. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @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_server(resource_group_name, server_name, custom_headers = nil) + first_page = list_by_server_as_lazy(resource_group_name, server_name, custom_headers) + first_page.get_all_items + end + + # + # Gets a list of job agents in a server. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @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_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! + end + + # + # Gets a list of job agents in a server. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @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_server_async(resource_group_name, server_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgentListResult.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 job agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent to be retrieved. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobAgent] operation results. + # + def get(resource_group_name, server_name, job_agent_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, job_agent_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a job agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent to be retrieved. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, job_agent_name, custom_headers = nil) + get_async(resource_group_name, server_name, job_agent_name, custom_headers).value! + end + + # + # Gets a job agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent to be retrieved. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, job_agent_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgent.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates or updates a job agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent to be created or + # updated. + # @param parameters [JobAgent] The requested job agent resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobAgent] operation results. + # + def create_or_update(resource_group_name, server_name, job_agent_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, job_agent_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent to be created or + # updated. + # @param parameters [JobAgent] The requested job agent resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(resource_group_name, server_name, job_agent_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, server_name, job_agent_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgent.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes a job agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent to be deleted. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, server_name, job_agent_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, job_agent_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent to be deleted. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, server_name, job_agent_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, server_name, job_agent_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Updates a job agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent to be updated. + # @param parameters [JobAgentUpdate] The update to the job agent. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobAgent] operation results. + # + def update(resource_group_name, server_name, job_agent_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, server_name, job_agent_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent to be updated. + # @param parameters [JobAgentUpdate] The update to the job agent. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def update_async(resource_group_name, server_name, job_agent_name, parameters, custom_headers = nil) + # Send request + promise = begin_update_async(resource_group_name, server_name, job_agent_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgent.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Creates or updates a job agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent to be created or + # updated. + # @param parameters [JobAgent] The requested job agent resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobAgent] operation results. + # + def begin_create_or_update(resource_group_name, server_name, job_agent_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, job_agent_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a job agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent to be created or + # updated. + # @param parameters [JobAgent] The requested job agent resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(resource_group_name, server_name, job_agent_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, job_agent_name, parameters, custom_headers).value! + end + + # + # Creates or updates a job agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent to be created or + # updated. + # @param parameters [JobAgent] The requested job agent resource state. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(resource_group_name, server_name, job_agent_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgent.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgent.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgent.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 a job agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent to be deleted. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(resource_group_name, server_name, job_agent_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, server_name, job_agent_name, custom_headers).value! + nil + end + + # + # Deletes a job agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent to be deleted. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(resource_group_name, server_name, job_agent_name, custom_headers = nil) + begin_delete_async(resource_group_name, server_name, job_agent_name, custom_headers).value! + end + + # + # Deletes a job agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent to be deleted. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(resource_group_name, server_name, job_agent_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Updates a job agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent to be updated. + # @param parameters [JobAgentUpdate] The update to the job agent. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobAgent] operation results. + # + def begin_update(resource_group_name, server_name, job_agent_name, parameters, custom_headers = nil) + response = begin_update_async(resource_group_name, server_name, job_agent_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates a job agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent to be updated. + # @param parameters [JobAgentUpdate] The update to the job agent. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_update_with_http_info(resource_group_name, server_name, job_agent_name, parameters, custom_headers = nil) + begin_update_async(resource_group_name, server_name, job_agent_name, parameters, custom_headers).value! + end + + # + # Updates a job agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent to be updated. + # @param parameters [JobAgentUpdate] The update to the job agent. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_update_async(resource_group_name, server_name, job_agent_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgentUpdate.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgent.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 job agents in a server. + # + # @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 [JobAgentListResult] operation results. + # + def list_by_server_next(next_page_link, custom_headers = nil) + response = list_by_server_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a list of job agents in a server. + # + # @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_server_next_with_http_info(next_page_link, custom_headers = nil) + list_by_server_next_async(next_page_link, custom_headers).value! + end + + # + # Gets a list of job agents in a server. + # + # @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_server_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgentListResult.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 job agents in a server. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobAgentListResult] which provide lazy access to pages of the + # response. + # + def list_by_server_as_lazy(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_server_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_credentials.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_credentials.rb new file mode 100644 index 0000000000..2affe6e27e --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_credentials.rb @@ -0,0 +1,568 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class JobCredentials + include MsRestAzure + + # + # Creates and initializes a new instance of the JobCredentials class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets a list of jobs credentials. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @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_agent(resource_group_name, server_name, job_agent_name, custom_headers = nil) + first_page = list_by_agent_as_lazy(resource_group_name, server_name, job_agent_name, custom_headers) + first_page.get_all_items + end + + # + # Gets a list of jobs credentials. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @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_agent_with_http_info(resource_group_name, server_name, job_agent_name, custom_headers = nil) + list_by_agent_async(resource_group_name, server_name, job_agent_name, custom_headers).value! + end + + # + # Gets a list of jobs credentials. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @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_agent_async(resource_group_name, server_name, job_agent_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobCredentialListResult.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 jobs credential. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param credential_name [String] The name of the credential. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobCredential] operation results. + # + def get(resource_group_name, server_name, job_agent_name, credential_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, job_agent_name, credential_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a jobs credential. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param credential_name [String] The name of the credential. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, job_agent_name, credential_name, custom_headers = nil) + get_async(resource_group_name, server_name, job_agent_name, credential_name, custom_headers).value! + end + + # + # Gets a jobs credential. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param credential_name [String] The name of the credential. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, job_agent_name, credential_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'credential_name is nil' if credential_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'credentialName' => credential_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobCredential.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates or updates a job credential. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param credential_name [String] The name of the credential. + # @param parameters [JobCredential] The requested job credential state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobCredential] operation results. + # + def create_or_update(resource_group_name, server_name, job_agent_name, credential_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, job_agent_name, credential_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a job credential. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param credential_name [String] The name of the credential. + # @param parameters [JobCredential] The requested job credential state. + # @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 create_or_update_with_http_info(resource_group_name, server_name, job_agent_name, credential_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, job_agent_name, credential_name, parameters, custom_headers).value! + end + + # + # Creates or updates a job credential. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param credential_name [String] The name of the credential. + # @param parameters [JobCredential] The requested job credential state. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_async(resource_group_name, server_name, job_agent_name, credential_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'credential_name is nil' if credential_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobCredential.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'credentialName' => credential_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail 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::SQL::Mgmt::V2017_03_01_preview::Models::JobCredential.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobCredential.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 a job credential. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param credential_name [String] The name of the credential. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, server_name, job_agent_name, credential_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, job_agent_name, credential_name, custom_headers).value! + nil + end + + # + # Deletes a job credential. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param credential_name [String] The name of the credential. + # @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 delete_with_http_info(resource_group_name, server_name, job_agent_name, credential_name, custom_headers = nil) + delete_async(resource_group_name, server_name, job_agent_name, credential_name, custom_headers).value! + end + + # + # Deletes a job credential. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param credential_name [String] The name of the credential. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, server_name, job_agent_name, credential_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'credential_name is nil' if credential_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'credentialName' => credential_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets a list of jobs credentials. + # + # @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 [JobCredentialListResult] operation results. + # + def list_by_agent_next(next_page_link, custom_headers = nil) + response = list_by_agent_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a list of jobs credentials. + # + # @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_agent_next_with_http_info(next_page_link, custom_headers = nil) + list_by_agent_next_async(next_page_link, custom_headers).value! + end + + # + # Gets a list of jobs credentials. + # + # @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_agent_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobCredentialListResult.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 jobs credentials. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobCredentialListResult] which provide lazy access to pages of the + # response. + # + def list_by_agent_as_lazy(resource_group_name, server_name, job_agent_name, custom_headers = nil) + response = list_by_agent_async(resource_group_name, server_name, job_agent_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_agent_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_executions.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_executions.rb new file mode 100644 index 0000000000..4fe91af84f --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_executions.rb @@ -0,0 +1,1093 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class JobExecutions + include MsRestAzure + + # + # Creates and initializes a new instance of the JobExecutions class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Lists all executions in a job agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param create_time_min [DateTime] If specified, only job executions created + # at or after the specified time are included. + # @param create_time_max [DateTime] If specified, only job executions created + # before the specified time are included. + # @param end_time_min [DateTime] If specified, only job executions completed at + # or after the specified time are included. + # @param end_time_max [DateTime] If specified, only job executions completed + # before the specified time are included. + # @param is_active [Boolean] If specified, only active or only completed job + # executions are included. + # @param skip [Integer] The number of elements in the collection to skip. + # @param top [Integer] The number of elements to return from the collection. + # @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_agent(resource_group_name, server_name, job_agent_name, create_time_min = nil, create_time_max = nil, end_time_min = nil, end_time_max = nil, is_active = nil, skip = nil, top = nil, custom_headers = nil) + first_page = list_by_agent_as_lazy(resource_group_name, server_name, job_agent_name, create_time_min, create_time_max, end_time_min, end_time_max, is_active, skip, top, custom_headers) + first_page.get_all_items + end + + # + # Lists all executions in a job agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param create_time_min [DateTime] If specified, only job executions created + # at or after the specified time are included. + # @param create_time_max [DateTime] If specified, only job executions created + # before the specified time are included. + # @param end_time_min [DateTime] If specified, only job executions completed at + # or after the specified time are included. + # @param end_time_max [DateTime] If specified, only job executions completed + # before the specified time are included. + # @param is_active [Boolean] If specified, only active or only completed job + # executions are included. + # @param skip [Integer] The number of elements in the collection to skip. + # @param top [Integer] The number of elements to return from the collection. + # @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_agent_with_http_info(resource_group_name, server_name, job_agent_name, create_time_min = nil, create_time_max = nil, end_time_min = nil, end_time_max = nil, is_active = nil, skip = nil, top = nil, custom_headers = nil) + list_by_agent_async(resource_group_name, server_name, job_agent_name, create_time_min, create_time_max, end_time_min, end_time_max, is_active, skip, top, custom_headers).value! + end + + # + # Lists all executions in a job agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param create_time_min [DateTime] If specified, only job executions created + # at or after the specified time are included. + # @param create_time_max [DateTime] If specified, only job executions created + # before the specified time are included. + # @param end_time_min [DateTime] If specified, only job executions completed at + # or after the specified time are included. + # @param end_time_max [DateTime] If specified, only job executions completed + # before the specified time are included. + # @param is_active [Boolean] If specified, only active or only completed job + # executions are included. + # @param skip [Integer] The number of elements in the collection to skip. + # @param top [Integer] The number of elements to return from the collection. + # @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_agent_async(resource_group_name, server_name, job_agent_name, create_time_min = nil, create_time_max = nil, end_time_min = nil, end_time_max = nil, is_active = nil, skip = nil, top = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/executions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'subscriptionId' => @client.subscription_id}, + query_params: {'createTimeMin' => create_time_min,'createTimeMax' => create_time_max,'endTimeMin' => end_time_min,'endTimeMax' => end_time_max,'isActive' => is_active,'$skip' => skip,'$top' => top,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionListResult.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 + + # + # Requests cancellation of a job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job. + # @param job_execution_id The id of the job execution to cancel. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def cancel(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers = nil) + response = cancel_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers).value! + nil + end + + # + # Requests cancellation of a job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job. + # @param job_execution_id The id of the job execution to cancel. + # @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 cancel_with_http_info(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers = nil) + cancel_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers).value! + end + + # + # Requests cancellation of a job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job. + # @param job_execution_id The id of the job execution to cancel. + # @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 cancel_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, 'job_execution_id is nil' if job_execution_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/cancel' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'jobExecutionId' => job_execution_id,'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? + + result + end + + promise.execute + end + + # + # Starts an elastic job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobExecution] operation results. + # + def create(resource_group_name, server_name, job_agent_name, job_name, custom_headers = nil) + response = create_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers = nil) + # Send request + promise = begin_create_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecution.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Lists a job's executions. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param create_time_min [DateTime] If specified, only job executions created + # at or after the specified time are included. + # @param create_time_max [DateTime] If specified, only job executions created + # before the specified time are included. + # @param end_time_min [DateTime] If specified, only job executions completed at + # or after the specified time are included. + # @param end_time_max [DateTime] If specified, only job executions completed + # before the specified time are included. + # @param is_active [Boolean] If specified, only active or only completed job + # executions are included. + # @param skip [Integer] The number of elements in the collection to skip. + # @param top [Integer] The number of elements to return from the collection. + # @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_job(resource_group_name, server_name, job_agent_name, job_name, create_time_min = nil, create_time_max = nil, end_time_min = nil, end_time_max = nil, is_active = nil, skip = nil, top = nil, custom_headers = nil) + first_page = list_by_job_as_lazy(resource_group_name, server_name, job_agent_name, job_name, create_time_min, create_time_max, end_time_min, end_time_max, is_active, skip, top, custom_headers) + first_page.get_all_items + end + + # + # Lists a job's executions. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param create_time_min [DateTime] If specified, only job executions created + # at or after the specified time are included. + # @param create_time_max [DateTime] If specified, only job executions created + # before the specified time are included. + # @param end_time_min [DateTime] If specified, only job executions completed at + # or after the specified time are included. + # @param end_time_max [DateTime] If specified, only job executions completed + # before the specified time are included. + # @param is_active [Boolean] If specified, only active or only completed job + # executions are included. + # @param skip [Integer] The number of elements in the collection to skip. + # @param top [Integer] The number of elements to return from the collection. + # @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_job_with_http_info(resource_group_name, server_name, job_agent_name, job_name, create_time_min = nil, create_time_max = nil, end_time_min = nil, end_time_max = nil, is_active = nil, skip = nil, top = nil, custom_headers = nil) + list_by_job_async(resource_group_name, server_name, job_agent_name, job_name, create_time_min, create_time_max, end_time_min, end_time_max, is_active, skip, top, custom_headers).value! + end + + # + # Lists a job's executions. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param create_time_min [DateTime] If specified, only job executions created + # at or after the specified time are included. + # @param create_time_max [DateTime] If specified, only job executions created + # before the specified time are included. + # @param end_time_min [DateTime] If specified, only job executions completed at + # or after the specified time are included. + # @param end_time_max [DateTime] If specified, only job executions completed + # before the specified time are included. + # @param is_active [Boolean] If specified, only active or only completed job + # executions are included. + # @param skip [Integer] The number of elements in the collection to skip. + # @param top [Integer] The number of elements to return from the collection. + # @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_job_async(resource_group_name, server_name, job_agent_name, job_name, create_time_min = nil, create_time_max = nil, end_time_min = nil, end_time_max = nil, is_active = nil, skip = nil, top = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'createTimeMin' => create_time_min,'createTimeMax' => create_time_max,'endTimeMin' => end_time_min,'endTimeMax' => end_time_max,'isActive' => is_active,'$skip' => skip,'$top' => top,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionListResult.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 job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job. + # @param job_execution_id The id of the job execution + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobExecution] operation results. + # + def get(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers = nil) + response = get_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job. + # @param job_execution_id The id of the job execution + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers = nil) + get_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers).value! + end + + # + # Gets a job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job. + # @param job_execution_id The id of the job execution + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, 'job_execution_id is nil' if job_execution_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'jobExecutionId' => job_execution_id,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecution.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates or updatess a job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_execution_id The job execution id to create the job execution + # under. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobExecution] operation results. + # + def create_or_update(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_execution_id The job execution id to create the job execution + # under. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecution.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Starts an elastic job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobExecution] operation results. + # + def begin_create(resource_group_name, server_name, job_agent_name, job_name, custom_headers = nil) + response = begin_create_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Starts an elastic job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_with_http_info(resource_group_name, server_name, job_agent_name, job_name, custom_headers = nil) + begin_create_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers).value! + end + + # + # Starts an elastic job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/start' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_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 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecution.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates or updatess a job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_execution_id The job execution id to create the job execution + # under. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobExecution] operation results. + # + def begin_create_or_update(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updatess a job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_execution_id The job execution id to create the job execution + # under. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers).value! + end + + # + # Creates or updatess a job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_execution_id The job execution id to create the job execution + # under. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, 'job_execution_id is nil' if job_execution_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'jobExecutionId' => job_execution_id,'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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecution.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecution.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Lists all executions in a job agent. + # + # @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 [JobExecutionListResult] operation results. + # + def list_by_agent_next(next_page_link, custom_headers = nil) + response = list_by_agent_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all executions in a job agent. + # + # @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_agent_next_with_http_info(next_page_link, custom_headers = nil) + list_by_agent_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all executions in a job agent. + # + # @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_agent_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Lists a job's executions. + # + # @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 [JobExecutionListResult] operation results. + # + def list_by_job_next(next_page_link, custom_headers = nil) + response = list_by_job_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists a job's executions. + # + # @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_job_next_with_http_info(next_page_link, custom_headers = nil) + list_by_job_next_async(next_page_link, custom_headers).value! + end + + # + # Lists a job's executions. + # + # @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_job_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Lists all executions in a job agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param create_time_min [DateTime] If specified, only job executions created + # at or after the specified time are included. + # @param create_time_max [DateTime] If specified, only job executions created + # before the specified time are included. + # @param end_time_min [DateTime] If specified, only job executions completed at + # or after the specified time are included. + # @param end_time_max [DateTime] If specified, only job executions completed + # before the specified time are included. + # @param is_active [Boolean] If specified, only active or only completed job + # executions are included. + # @param skip [Integer] The number of elements in the collection to skip. + # @param top [Integer] The number of elements to return from the collection. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobExecutionListResult] which provide lazy access to pages of the + # response. + # + def list_by_agent_as_lazy(resource_group_name, server_name, job_agent_name, create_time_min = nil, create_time_max = nil, end_time_min = nil, end_time_max = nil, is_active = nil, skip = nil, top = nil, custom_headers = nil) + response = list_by_agent_async(resource_group_name, server_name, job_agent_name, create_time_min, create_time_max, end_time_min, end_time_max, is_active, skip, top, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_agent_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Lists a job's executions. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param create_time_min [DateTime] If specified, only job executions created + # at or after the specified time are included. + # @param create_time_max [DateTime] If specified, only job executions created + # before the specified time are included. + # @param end_time_min [DateTime] If specified, only job executions completed at + # or after the specified time are included. + # @param end_time_max [DateTime] If specified, only job executions completed + # before the specified time are included. + # @param is_active [Boolean] If specified, only active or only completed job + # executions are included. + # @param skip [Integer] The number of elements in the collection to skip. + # @param top [Integer] The number of elements to return from the collection. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobExecutionListResult] which provide lazy access to pages of the + # response. + # + def list_by_job_as_lazy(resource_group_name, server_name, job_agent_name, job_name, create_time_min = nil, create_time_max = nil, end_time_min = nil, end_time_max = nil, is_active = nil, skip = nil, top = nil, custom_headers = nil) + response = list_by_job_async(resource_group_name, server_name, job_agent_name, job_name, create_time_min, create_time_max, end_time_min, end_time_max, is_active, skip, top, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_job_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_step_executions.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_step_executions.rb new file mode 100644 index 0000000000..1ae0d0a369 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_step_executions.rb @@ -0,0 +1,412 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class JobStepExecutions + include MsRestAzure + + # + # Creates and initializes a new instance of the JobStepExecutions class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Lists the step executions of a job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_execution_id The id of the job execution + # @param create_time_min [DateTime] If specified, only job executions created + # at or after the specified time are included. + # @param create_time_max [DateTime] If specified, only job executions created + # before the specified time are included. + # @param end_time_min [DateTime] If specified, only job executions completed at + # or after the specified time are included. + # @param end_time_max [DateTime] If specified, only job executions completed + # before the specified time are included. + # @param is_active [Boolean] If specified, only active or only completed job + # executions are included. + # @param skip [Integer] The number of elements in the collection to skip. + # @param top [Integer] The number of elements to return from the collection. + # @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_job_execution(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min = nil, create_time_max = nil, end_time_min = nil, end_time_max = nil, is_active = nil, skip = nil, top = nil, custom_headers = nil) + first_page = list_by_job_execution_as_lazy(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min, create_time_max, end_time_min, end_time_max, is_active, skip, top, custom_headers) + first_page.get_all_items + end + + # + # Lists the step executions of a job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_execution_id The id of the job execution + # @param create_time_min [DateTime] If specified, only job executions created + # at or after the specified time are included. + # @param create_time_max [DateTime] If specified, only job executions created + # before the specified time are included. + # @param end_time_min [DateTime] If specified, only job executions completed at + # or after the specified time are included. + # @param end_time_max [DateTime] If specified, only job executions completed + # before the specified time are included. + # @param is_active [Boolean] If specified, only active or only completed job + # executions are included. + # @param skip [Integer] The number of elements in the collection to skip. + # @param top [Integer] The number of elements to return from the collection. + # @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_job_execution_with_http_info(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min = nil, create_time_max = nil, end_time_min = nil, end_time_max = nil, is_active = nil, skip = nil, top = nil, custom_headers = nil) + list_by_job_execution_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min, create_time_max, end_time_min, end_time_max, is_active, skip, top, custom_headers).value! + end + + # + # Lists the step executions of a job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_execution_id The id of the job execution + # @param create_time_min [DateTime] If specified, only job executions created + # at or after the specified time are included. + # @param create_time_max [DateTime] If specified, only job executions created + # before the specified time are included. + # @param end_time_min [DateTime] If specified, only job executions completed at + # or after the specified time are included. + # @param end_time_max [DateTime] If specified, only job executions completed + # before the specified time are included. + # @param is_active [Boolean] If specified, only active or only completed job + # executions are included. + # @param skip [Integer] The number of elements in the collection to skip. + # @param top [Integer] The number of elements to return from the collection. + # @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_job_execution_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min = nil, create_time_max = nil, end_time_min = nil, end_time_max = nil, is_active = nil, skip = nil, top = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, 'job_execution_id is nil' if job_execution_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'jobExecutionId' => job_execution_id,'subscriptionId' => @client.subscription_id}, + query_params: {'createTimeMin' => create_time_min,'createTimeMax' => create_time_max,'endTimeMin' => end_time_min,'endTimeMax' => end_time_max,'isActive' => is_active,'$skip' => skip,'$top' => top,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionListResult.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 step execution of a job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_execution_id The unique id of the job execution + # @param step_name [String] The name of the step. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobExecution] operation results. + # + def get(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a step execution of a job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_execution_id The unique id of the job execution + # @param step_name [String] The name of the step. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, custom_headers = nil) + get_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, custom_headers).value! + end + + # + # Gets a step execution of a job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_execution_id The unique id of the job execution + # @param step_name [String] The name of the step. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, 'job_execution_id is nil' if job_execution_id.nil? + fail ArgumentError, 'step_name is nil' if step_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'jobExecutionId' => job_execution_id,'stepName' => step_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecution.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Lists the step executions of a job execution. + # + # @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 [JobExecutionListResult] operation results. + # + def list_by_job_execution_next(next_page_link, custom_headers = nil) + response = list_by_job_execution_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists the step executions of a job execution. + # + # @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_job_execution_next_with_http_info(next_page_link, custom_headers = nil) + list_by_job_execution_next_async(next_page_link, custom_headers).value! + end + + # + # Lists the step executions of a job execution. + # + # @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_job_execution_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Lists the step executions of a job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_execution_id The id of the job execution + # @param create_time_min [DateTime] If specified, only job executions created + # at or after the specified time are included. + # @param create_time_max [DateTime] If specified, only job executions created + # before the specified time are included. + # @param end_time_min [DateTime] If specified, only job executions completed at + # or after the specified time are included. + # @param end_time_max [DateTime] If specified, only job executions completed + # before the specified time are included. + # @param is_active [Boolean] If specified, only active or only completed job + # executions are included. + # @param skip [Integer] The number of elements in the collection to skip. + # @param top [Integer] The number of elements to return from the collection. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobExecutionListResult] which provide lazy access to pages of the + # response. + # + def list_by_job_execution_as_lazy(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min = nil, create_time_max = nil, end_time_min = nil, end_time_max = nil, is_active = nil, skip = nil, top = nil, custom_headers = nil) + response = list_by_job_execution_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min, create_time_max, end_time_min, end_time_max, is_active, skip, top, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_job_execution_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_steps.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_steps.rb new file mode 100644 index 0000000000..5432b03358 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_steps.rb @@ -0,0 +1,921 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class JobSteps + include MsRestAzure + + # + # Creates and initializes a new instance of the JobSteps class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets all job steps in the specified job version. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_version [Integer] The version of the job to get. + # @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_version(resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers = nil) + first_page = list_by_version_as_lazy(resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers) + first_page.get_all_items + end + + # + # Gets all job steps in the specified job version. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_version [Integer] The version of the job to get. + # @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_version_with_http_info(resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers = nil) + list_by_version_async(resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers).value! + end + + # + # Gets all job steps in the specified job version. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_version [Integer] The version of the job to get. + # @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_version_async(resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, 'job_version is nil' if job_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'jobVersion' => job_version,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepListResult.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 specified version of a job step. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job. + # @param job_version [Integer] The version of the job to get. + # @param step_name [String] The name of the job step. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobStep] operation results. + # + def get_by_version(resource_group_name, server_name, job_agent_name, job_name, job_version, step_name, custom_headers = nil) + response = get_by_version_async(resource_group_name, server_name, job_agent_name, job_name, job_version, step_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the specified version of a job step. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job. + # @param job_version [Integer] The version of the job to get. + # @param step_name [String] The name of the job step. + # @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_by_version_with_http_info(resource_group_name, server_name, job_agent_name, job_name, job_version, step_name, custom_headers = nil) + get_by_version_async(resource_group_name, server_name, job_agent_name, job_name, job_version, step_name, custom_headers).value! + end + + # + # Gets the specified version of a job step. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job. + # @param job_version [Integer] The version of the job to get. + # @param step_name [String] The name of the job step. + # @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_by_version_async(resource_group_name, server_name, job_agent_name, job_name, job_version, step_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, 'job_version is nil' if job_version.nil? + fail ArgumentError, 'step_name is nil' if step_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps/{stepName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'jobVersion' => job_version,'stepName' => step_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStep.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 all job steps for a job's current version. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @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_job(resource_group_name, server_name, job_agent_name, job_name, custom_headers = nil) + first_page = list_by_job_as_lazy(resource_group_name, server_name, job_agent_name, job_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all job steps for a job's current version. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @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_job_with_http_info(resource_group_name, server_name, job_agent_name, job_name, custom_headers = nil) + list_by_job_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers).value! + end + + # + # Gets all job steps for a job's current version. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @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_job_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepListResult.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 job step in a job's current version. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job. + # @param step_name [String] The name of the job step. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobStep] operation results. + # + def get(resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a job step in a job's current version. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job. + # @param step_name [String] The name of the job step. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers = nil) + get_async(resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers).value! + end + + # + # Gets a job step in a job's current version. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job. + # @param step_name [String] The name of the job step. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, 'step_name is nil' if step_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'stepName' => step_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStep.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates or updates a job step. This will implicitly create a new job version. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job. + # @param step_name [String] The name of the job step. + # @param parameters [JobStep] The requested state of the job step. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobStep] operation results. + # + def create_or_update(resource_group_name, server_name, job_agent_name, job_name, step_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, job_agent_name, job_name, step_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a job step. This will implicitly create a new job version. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job. + # @param step_name [String] The name of the job step. + # @param parameters [JobStep] The requested state of the job step. + # @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 create_or_update_with_http_info(resource_group_name, server_name, job_agent_name, job_name, step_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, job_agent_name, job_name, step_name, parameters, custom_headers).value! + end + + # + # Creates or updates a job step. This will implicitly create a new job version. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job. + # @param step_name [String] The name of the job step. + # @param parameters [JobStep] The requested state of the job step. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_async(resource_group_name, server_name, job_agent_name, job_name, step_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, 'step_name is nil' if step_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStep.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'stepName' => step_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail 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::SQL::Mgmt::V2017_03_01_preview::Models::JobStep.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStep.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 a job step. This will implicitly create a new job version. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job. + # @param step_name [String] The name of the job step to delete. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers).value! + nil + end + + # + # Deletes a job step. This will implicitly create a new job version. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job. + # @param step_name [String] The name of the job step to delete. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers = nil) + delete_async(resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers).value! + end + + # + # Deletes a job step. This will implicitly create a new job version. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job. + # @param step_name [String] The name of the job step to delete. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, 'step_name is nil' if step_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'stepName' => step_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets all job steps in the specified job version. + # + # @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 [JobStepListResult] operation results. + # + def list_by_version_next(next_page_link, custom_headers = nil) + response = list_by_version_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all job steps in the specified job version. + # + # @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_version_next_with_http_info(next_page_link, custom_headers = nil) + list_by_version_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all job steps in the specified job version. + # + # @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_version_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepListResult.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 all job steps for a job's current version. + # + # @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 [JobStepListResult] operation results. + # + def list_by_job_next(next_page_link, custom_headers = nil) + response = list_by_job_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all job steps for a job's current version. + # + # @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_job_next_with_http_info(next_page_link, custom_headers = nil) + list_by_job_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all job steps for a job's current version. + # + # @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_job_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepListResult.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 all job steps in the specified job version. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_version [Integer] The version of the job to get. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobStepListResult] which provide lazy access to pages of the + # response. + # + def list_by_version_as_lazy(resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers = nil) + response = list_by_version_async(resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_version_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets all job steps for a job's current version. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobStepListResult] which provide lazy access to pages of the + # response. + # + def list_by_job_as_lazy(resource_group_name, server_name, job_agent_name, job_name, custom_headers = nil) + response = list_by_job_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_job_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_target_executions.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_target_executions.rb new file mode 100644 index 0000000000..e047c6ae26 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_target_executions.rb @@ -0,0 +1,692 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class JobTargetExecutions + include MsRestAzure + + # + # Creates and initializes a new instance of the JobTargetExecutions class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Lists target executions for all steps of a job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_execution_id The id of the job execution + # @param create_time_min [DateTime] If specified, only job executions created + # at or after the specified time are included. + # @param create_time_max [DateTime] If specified, only job executions created + # before the specified time are included. + # @param end_time_min [DateTime] If specified, only job executions completed at + # or after the specified time are included. + # @param end_time_max [DateTime] If specified, only job executions completed + # before the specified time are included. + # @param is_active [Boolean] If specified, only active or only completed job + # executions are included. + # @param skip [Integer] The number of elements in the collection to skip. + # @param top [Integer] The number of elements to return from the collection. + # @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_job_execution(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min = nil, create_time_max = nil, end_time_min = nil, end_time_max = nil, is_active = nil, skip = nil, top = nil, custom_headers = nil) + first_page = list_by_job_execution_as_lazy(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min, create_time_max, end_time_min, end_time_max, is_active, skip, top, custom_headers) + first_page.get_all_items + end + + # + # Lists target executions for all steps of a job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_execution_id The id of the job execution + # @param create_time_min [DateTime] If specified, only job executions created + # at or after the specified time are included. + # @param create_time_max [DateTime] If specified, only job executions created + # before the specified time are included. + # @param end_time_min [DateTime] If specified, only job executions completed at + # or after the specified time are included. + # @param end_time_max [DateTime] If specified, only job executions completed + # before the specified time are included. + # @param is_active [Boolean] If specified, only active or only completed job + # executions are included. + # @param skip [Integer] The number of elements in the collection to skip. + # @param top [Integer] The number of elements to return from the collection. + # @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_job_execution_with_http_info(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min = nil, create_time_max = nil, end_time_min = nil, end_time_max = nil, is_active = nil, skip = nil, top = nil, custom_headers = nil) + list_by_job_execution_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min, create_time_max, end_time_min, end_time_max, is_active, skip, top, custom_headers).value! + end + + # + # Lists target executions for all steps of a job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_execution_id The id of the job execution + # @param create_time_min [DateTime] If specified, only job executions created + # at or after the specified time are included. + # @param create_time_max [DateTime] If specified, only job executions created + # before the specified time are included. + # @param end_time_min [DateTime] If specified, only job executions completed at + # or after the specified time are included. + # @param end_time_max [DateTime] If specified, only job executions completed + # before the specified time are included. + # @param is_active [Boolean] If specified, only active or only completed job + # executions are included. + # @param skip [Integer] The number of elements in the collection to skip. + # @param top [Integer] The number of elements to return from the collection. + # @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_job_execution_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min = nil, create_time_max = nil, end_time_min = nil, end_time_max = nil, is_active = nil, skip = nil, top = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, 'job_execution_id is nil' if job_execution_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/targets' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'jobExecutionId' => job_execution_id,'subscriptionId' => @client.subscription_id}, + query_params: {'createTimeMin' => create_time_min,'createTimeMax' => create_time_max,'endTimeMin' => end_time_min,'endTimeMax' => end_time_max,'isActive' => is_active,'$skip' => skip,'$top' => top,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Lists the target executions of a job step execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_execution_id The id of the job execution + # @param step_name [String] The name of the step. + # @param create_time_min [DateTime] If specified, only job executions created + # at or after the specified time are included. + # @param create_time_max [DateTime] If specified, only job executions created + # before the specified time are included. + # @param end_time_min [DateTime] If specified, only job executions completed at + # or after the specified time are included. + # @param end_time_max [DateTime] If specified, only job executions completed + # before the specified time are included. + # @param is_active [Boolean] If specified, only active or only completed job + # executions are included. + # @param skip [Integer] The number of elements in the collection to skip. + # @param top [Integer] The number of elements to return from the collection. + # @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_step(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, create_time_min = nil, create_time_max = nil, end_time_min = nil, end_time_max = nil, is_active = nil, skip = nil, top = nil, custom_headers = nil) + first_page = list_by_step_as_lazy(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, create_time_min, create_time_max, end_time_min, end_time_max, is_active, skip, top, custom_headers) + first_page.get_all_items + end + + # + # Lists the target executions of a job step execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_execution_id The id of the job execution + # @param step_name [String] The name of the step. + # @param create_time_min [DateTime] If specified, only job executions created + # at or after the specified time are included. + # @param create_time_max [DateTime] If specified, only job executions created + # before the specified time are included. + # @param end_time_min [DateTime] If specified, only job executions completed at + # or after the specified time are included. + # @param end_time_max [DateTime] If specified, only job executions completed + # before the specified time are included. + # @param is_active [Boolean] If specified, only active or only completed job + # executions are included. + # @param skip [Integer] The number of elements in the collection to skip. + # @param top [Integer] The number of elements to return from the collection. + # @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_step_with_http_info(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, create_time_min = nil, create_time_max = nil, end_time_min = nil, end_time_max = nil, is_active = nil, skip = nil, top = nil, custom_headers = nil) + list_by_step_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, create_time_min, create_time_max, end_time_min, end_time_max, is_active, skip, top, custom_headers).value! + end + + # + # Lists the target executions of a job step execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_execution_id The id of the job execution + # @param step_name [String] The name of the step. + # @param create_time_min [DateTime] If specified, only job executions created + # at or after the specified time are included. + # @param create_time_max [DateTime] If specified, only job executions created + # before the specified time are included. + # @param end_time_min [DateTime] If specified, only job executions completed at + # or after the specified time are included. + # @param end_time_max [DateTime] If specified, only job executions completed + # before the specified time are included. + # @param is_active [Boolean] If specified, only active or only completed job + # executions are included. + # @param skip [Integer] The number of elements in the collection to skip. + # @param top [Integer] The number of elements to return from the collection. + # @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_step_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, create_time_min = nil, create_time_max = nil, end_time_min = nil, end_time_max = nil, is_active = nil, skip = nil, top = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, 'job_execution_id is nil' if job_execution_id.nil? + fail ArgumentError, 'step_name is nil' if step_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'jobExecutionId' => job_execution_id,'stepName' => step_name,'subscriptionId' => @client.subscription_id}, + query_params: {'createTimeMin' => create_time_min,'createTimeMax' => create_time_max,'endTimeMin' => end_time_min,'endTimeMax' => end_time_max,'isActive' => is_active,'$skip' => skip,'$top' => top,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionListResult.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 target execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_execution_id The unique id of the job execution + # @param step_name [String] The name of the step. + # @param target_id The target id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobExecution] operation results. + # + def get(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, target_id, custom_headers = nil) + response = get_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, target_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a target execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_execution_id The unique id of the job execution + # @param step_name [String] The name of the step. + # @param target_id The target id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, target_id, custom_headers = nil) + get_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, target_id, custom_headers).value! + end + + # + # Gets a target execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_execution_id The unique id of the job execution + # @param step_name [String] The name of the step. + # @param target_id The target id. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, target_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, 'job_execution_id is nil' if job_execution_id.nil? + fail ArgumentError, 'step_name is nil' if step_name.nil? + fail ArgumentError, 'target_id is nil' if target_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets/{targetId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'jobExecutionId' => job_execution_id,'stepName' => step_name,'targetId' => target_id,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecution.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Lists target executions for all steps of a job execution. + # + # @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 [JobExecutionListResult] operation results. + # + def list_by_job_execution_next(next_page_link, custom_headers = nil) + response = list_by_job_execution_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists target executions for all steps of a job execution. + # + # @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_job_execution_next_with_http_info(next_page_link, custom_headers = nil) + list_by_job_execution_next_async(next_page_link, custom_headers).value! + end + + # + # Lists target executions for all steps of a job execution. + # + # @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_job_execution_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Lists the target executions of a job step execution. + # + # @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 [JobExecutionListResult] operation results. + # + def list_by_step_next(next_page_link, custom_headers = nil) + response = list_by_step_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists the target executions of a job step execution. + # + # @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_step_next_with_http_info(next_page_link, custom_headers = nil) + list_by_step_next_async(next_page_link, custom_headers).value! + end + + # + # Lists the target executions of a job step execution. + # + # @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_step_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Lists target executions for all steps of a job execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_execution_id The id of the job execution + # @param create_time_min [DateTime] If specified, only job executions created + # at or after the specified time are included. + # @param create_time_max [DateTime] If specified, only job executions created + # before the specified time are included. + # @param end_time_min [DateTime] If specified, only job executions completed at + # or after the specified time are included. + # @param end_time_max [DateTime] If specified, only job executions completed + # before the specified time are included. + # @param is_active [Boolean] If specified, only active or only completed job + # executions are included. + # @param skip [Integer] The number of elements in the collection to skip. + # @param top [Integer] The number of elements to return from the collection. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobExecutionListResult] which provide lazy access to pages of the + # response. + # + def list_by_job_execution_as_lazy(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min = nil, create_time_max = nil, end_time_min = nil, end_time_max = nil, is_active = nil, skip = nil, top = nil, custom_headers = nil) + response = list_by_job_execution_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min, create_time_max, end_time_min, end_time_max, is_active, skip, top, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_job_execution_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Lists the target executions of a job step execution. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param job_execution_id The id of the job execution + # @param step_name [String] The name of the step. + # @param create_time_min [DateTime] If specified, only job executions created + # at or after the specified time are included. + # @param create_time_max [DateTime] If specified, only job executions created + # before the specified time are included. + # @param end_time_min [DateTime] If specified, only job executions completed at + # or after the specified time are included. + # @param end_time_max [DateTime] If specified, only job executions completed + # before the specified time are included. + # @param is_active [Boolean] If specified, only active or only completed job + # executions are included. + # @param skip [Integer] The number of elements in the collection to skip. + # @param top [Integer] The number of elements to return from the collection. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobExecutionListResult] which provide lazy access to pages of the + # response. + # + def list_by_step_as_lazy(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, create_time_min = nil, create_time_max = nil, end_time_min = nil, end_time_max = nil, is_active = nil, skip = nil, top = nil, custom_headers = nil) + response = list_by_step_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, create_time_min, create_time_max, end_time_min, end_time_max, is_active, skip, top, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_step_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_target_groups.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_target_groups.rb new file mode 100644 index 0000000000..6f4419d2e5 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_target_groups.rb @@ -0,0 +1,568 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class JobTargetGroups + include MsRestAzure + + # + # Creates and initializes a new instance of the JobTargetGroups class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets all target groups in an agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @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_agent(resource_group_name, server_name, job_agent_name, custom_headers = nil) + first_page = list_by_agent_as_lazy(resource_group_name, server_name, job_agent_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all target groups in an agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @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_agent_with_http_info(resource_group_name, server_name, job_agent_name, custom_headers = nil) + list_by_agent_async(resource_group_name, server_name, job_agent_name, custom_headers).value! + end + + # + # Gets all target groups in an agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @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_agent_async(resource_group_name, server_name, job_agent_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTargetGroupListResult.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 target group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param target_group_name [String] The name of the target group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobTargetGroup] operation results. + # + def get(resource_group_name, server_name, job_agent_name, target_group_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, job_agent_name, target_group_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a target group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param target_group_name [String] The name of the target group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, job_agent_name, target_group_name, custom_headers = nil) + get_async(resource_group_name, server_name, job_agent_name, target_group_name, custom_headers).value! + end + + # + # Gets a target group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param target_group_name [String] The name of the target group. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, job_agent_name, target_group_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'target_group_name is nil' if target_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'targetGroupName' => target_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTargetGroup.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates or updates a target group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param target_group_name [String] The name of the target group. + # @param parameters [JobTargetGroup] The requested state of the target group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobTargetGroup] operation results. + # + def create_or_update(resource_group_name, server_name, job_agent_name, target_group_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, job_agent_name, target_group_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a target group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param target_group_name [String] The name of the target group. + # @param parameters [JobTargetGroup] The requested state of the target group. + # @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 create_or_update_with_http_info(resource_group_name, server_name, job_agent_name, target_group_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, job_agent_name, target_group_name, parameters, custom_headers).value! + end + + # + # Creates or updates a target group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param target_group_name [String] The name of the target group. + # @param parameters [JobTargetGroup] The requested state of the target group. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_async(resource_group_name, server_name, job_agent_name, target_group_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'target_group_name is nil' if target_group_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTargetGroup.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'targetGroupName' => target_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail 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::SQL::Mgmt::V2017_03_01_preview::Models::JobTargetGroup.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTargetGroup.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 a target group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param target_group_name [String] The name of the target group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, server_name, job_agent_name, target_group_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, job_agent_name, target_group_name, custom_headers).value! + nil + end + + # + # Deletes a target group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param target_group_name [String] The name of the target group. + # @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 delete_with_http_info(resource_group_name, server_name, job_agent_name, target_group_name, custom_headers = nil) + delete_async(resource_group_name, server_name, job_agent_name, target_group_name, custom_headers).value! + end + + # + # Deletes a target group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param target_group_name [String] The name of the target group. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, server_name, job_agent_name, target_group_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'target_group_name is nil' if target_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'targetGroupName' => target_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets all target groups in an agent. + # + # @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 [JobTargetGroupListResult] operation results. + # + def list_by_agent_next(next_page_link, custom_headers = nil) + response = list_by_agent_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all target groups in an agent. + # + # @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_agent_next_with_http_info(next_page_link, custom_headers = nil) + list_by_agent_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all target groups in an agent. + # + # @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_agent_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTargetGroupListResult.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 all target groups in an agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobTargetGroupListResult] which provide lazy access to pages of the + # response. + # + def list_by_agent_as_lazy(resource_group_name, server_name, job_agent_name, custom_headers = nil) + response = list_by_agent_async(resource_group_name, server_name, job_agent_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_agent_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_versions.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_versions.rb new file mode 100644 index 0000000000..79921a11be --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_versions.rb @@ -0,0 +1,355 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class JobVersions + include MsRestAzure + + # + # Creates and initializes a new instance of the JobVersions class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets all versions of a job. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @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_job(resource_group_name, server_name, job_agent_name, job_name, custom_headers = nil) + first_page = list_by_job_as_lazy(resource_group_name, server_name, job_agent_name, job_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all versions of a job. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @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_job_with_http_info(resource_group_name, server_name, job_agent_name, job_name, custom_headers = nil) + list_by_job_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers).value! + end + + # + # Gets all versions of a job. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @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_job_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobVersionListResult.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 job version. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job. + # @param job_version [Integer] The version of the job to get. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobVersion] operation results. + # + def get(resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers = nil) + response = get_async(resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a job version. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job. + # @param job_version [Integer] The version of the job to get. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers = nil) + get_async(resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers).value! + end + + # + # Gets a job version. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job. + # @param job_version [Integer] The version of the job to get. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, 'job_version is nil' if job_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'jobVersion' => job_version,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobVersion.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 all versions of a job. + # + # @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 [JobVersionListResult] operation results. + # + def list_by_job_next(next_page_link, custom_headers = nil) + response = list_by_job_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all versions of a job. + # + # @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_job_next_with_http_info(next_page_link, custom_headers = nil) + list_by_job_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all versions of a job. + # + # @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_job_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobVersionListResult.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 all versions of a job. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobVersionListResult] which provide lazy access to pages of the + # response. + # + def list_by_job_as_lazy(resource_group_name, server_name, job_agent_name, job_name, custom_headers = nil) + response = list_by_job_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_job_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/jobs.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/jobs.rb new file mode 100644 index 0000000000..00d791e1b8 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/jobs.rb @@ -0,0 +1,567 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class Jobs + include MsRestAzure + + # + # Creates and initializes a new instance of the Jobs class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets a list of jobs. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @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_agent(resource_group_name, server_name, job_agent_name, custom_headers = nil) + first_page = list_by_agent_as_lazy(resource_group_name, server_name, job_agent_name, custom_headers) + first_page.get_all_items + end + + # + # Gets a list of jobs. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @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_agent_with_http_info(resource_group_name, server_name, job_agent_name, custom_headers = nil) + list_by_agent_async(resource_group_name, server_name, job_agent_name, custom_headers).value! + end + + # + # Gets a list of jobs. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @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_agent_async(resource_group_name, server_name, job_agent_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobListResult.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 job. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Job] operation results. + # + def get(resource_group_name, server_name, job_agent_name, job_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a job. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, job_agent_name, job_name, custom_headers = nil) + get_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers).value! + end + + # + # Gets a job. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::Job.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates or updates a job. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param parameters [Job] The requested job state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Job] operation results. + # + def create_or_update(resource_group_name, server_name, job_agent_name, job_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, job_agent_name, job_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a job. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param parameters [Job] The requested job state. + # @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 create_or_update_with_http_info(resource_group_name, server_name, job_agent_name, job_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, job_agent_name, job_name, parameters, custom_headers).value! + end + + # + # Creates or updates a job. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to get. + # @param parameters [Job] The requested job state. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_async(resource_group_name, server_name, job_agent_name, job_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::Job.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail 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::SQL::Mgmt::V2017_03_01_preview::Models::Job.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::Job.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 a job. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to delete. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, server_name, job_agent_name, job_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers).value! + nil + end + + # + # Deletes a job. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to delete. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, server_name, job_agent_name, job_name, custom_headers = nil) + delete_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers).value! + end + + # + # Deletes a job. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param job_name [String] The name of the job to delete. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets a list of jobs. + # + # @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 [JobListResult] operation results. + # + def list_by_agent_next(next_page_link, custom_headers = nil) + response = list_by_agent_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a list of jobs. + # + # @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_agent_next_with_http_info(next_page_link, custom_headers = nil) + list_by_agent_next_async(next_page_link, custom_headers).value! + end + + # + # Gets a list of jobs. + # + # @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_agent_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobListResult.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 jobs. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param job_agent_name [String] The name of the job agent. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobListResult] which provide lazy access to pages of the response. + # + def list_by_agent_as_lazy(resource_group_name, server_name, job_agent_name, custom_headers = nil) + response = list_by_agent_async(resource_group_name, server_name, job_agent_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_agent_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb new file mode 100644 index 0000000000..fda8000480 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb @@ -0,0 +1,917 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class LongTermRetentionBackups + include MsRestAzure + + # + # Creates and initializes a new instance of the LongTermRetentionBackups class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets a long term retention backup. + # + # @param location_name [String] The location of the database. + # @param long_term_retention_server_name [String] + # @param long_term_retention_database_name [String] + # @param backup_name [String] The backup name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LongTermRetentionBackup] operation results. + # + def get(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers = nil) + response = get_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a long term retention backup. + # + # @param location_name [String] The location of the database. + # @param long_term_retention_server_name [String] + # @param long_term_retention_database_name [String] + # @param backup_name [String] The backup 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_with_http_info(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers = nil) + get_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers).value! + end + + # + # Gets a long term retention backup. + # + # @param location_name [String] The location of the database. + # @param long_term_retention_server_name [String] + # @param long_term_retention_database_name [String] + # @param backup_name [String] The backup 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_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers = nil) + fail ArgumentError, 'location_name is nil' if location_name.nil? + fail ArgumentError, 'long_term_retention_server_name is nil' if long_term_retention_server_name.nil? + fail ArgumentError, 'long_term_retention_database_name is nil' if long_term_retention_database_name.nil? + fail ArgumentError, 'backup_name is nil' if backup_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'locationName' => location_name,'longTermRetentionServerName' => long_term_retention_server_name,'longTermRetentionDatabaseName' => long_term_retention_database_name,'backupName' => backup_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackup.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 a long term retention backup. + # + # @param location_name [String] The location of the database + # @param long_term_retention_server_name [String] + # @param long_term_retention_database_name [String] + # @param backup_name [String] The backup name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers = nil) + response = delete_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers).value! + nil + end + + # + # @param location_name [String] The location of the database + # @param long_term_retention_server_name [String] + # @param long_term_retention_database_name [String] + # @param backup_name [String] The backup name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers = nil) + # Send request + promise = begin_delete_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Lists all long term retention backups for a database. + # + # @param location_name [String] The location of the database + # @param long_term_retention_server_name [String] + # @param long_term_retention_database_name [String] + # @param only_latest_per_database [Boolean] Whether or not to only get the + # latest backup for each database. + # @param database_state [LongTermRetentionDatabaseState] Whether to query + # against just live databases, just deleted databases, or all databases. + # Possible values include: 'All', 'Live', 'Deleted' + # @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_database(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database = nil, database_state = nil, custom_headers = nil) + first_page = list_by_database_as_lazy(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database, database_state, custom_headers) + first_page.get_all_items + end + + # + # Lists all long term retention backups for a database. + # + # @param location_name [String] The location of the database + # @param long_term_retention_server_name [String] + # @param long_term_retention_database_name [String] + # @param only_latest_per_database [Boolean] Whether or not to only get the + # latest backup for each database. + # @param database_state [LongTermRetentionDatabaseState] Whether to query + # against just live databases, just deleted databases, or all databases. + # Possible values include: 'All', 'Live', 'Deleted' + # @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_database_with_http_info(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database = nil, database_state = nil, custom_headers = nil) + list_by_database_async(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database, database_state, custom_headers).value! + end + + # + # Lists all long term retention backups for a database. + # + # @param location_name [String] The location of the database + # @param long_term_retention_server_name [String] + # @param long_term_retention_database_name [String] + # @param only_latest_per_database [Boolean] Whether or not to only get the + # latest backup for each database. + # @param database_state [LongTermRetentionDatabaseState] Whether to query + # against just live databases, just deleted databases, or all databases. + # Possible values include: 'All', 'Live', 'Deleted' + # @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_database_async(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database = nil, database_state = nil, custom_headers = nil) + fail ArgumentError, 'location_name is nil' if location_name.nil? + fail ArgumentError, 'long_term_retention_server_name is nil' if long_term_retention_server_name.nil? + fail ArgumentError, 'long_term_retention_database_name is nil' if long_term_retention_database_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'locationName' => location_name,'longTermRetentionServerName' => long_term_retention_server_name,'longTermRetentionDatabaseName' => long_term_retention_database_name,'subscriptionId' => @client.subscription_id}, + query_params: {'onlyLatestPerDatabase' => only_latest_per_database,'databaseState' => database_state,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackupListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Lists the long term retention backups for a given location. + # + # @param location_name [String] The location of the database + # @param only_latest_per_database [Boolean] Whether or not to only get the + # latest backup for each database. + # @param database_state [LongTermRetentionDatabaseState] Whether to query + # against just live databases, just deleted databases, or all databases. + # Possible values include: 'All', 'Live', 'Deleted' + # @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_location(location_name, only_latest_per_database = nil, database_state = nil, custom_headers = nil) + first_page = list_by_location_as_lazy(location_name, only_latest_per_database, database_state, custom_headers) + first_page.get_all_items + end + + # + # Lists the long term retention backups for a given location. + # + # @param location_name [String] The location of the database + # @param only_latest_per_database [Boolean] Whether or not to only get the + # latest backup for each database. + # @param database_state [LongTermRetentionDatabaseState] Whether to query + # against just live databases, just deleted databases, or all databases. + # Possible values include: 'All', 'Live', 'Deleted' + # @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_location_with_http_info(location_name, only_latest_per_database = nil, database_state = nil, custom_headers = nil) + list_by_location_async(location_name, only_latest_per_database, database_state, custom_headers).value! + end + + # + # Lists the long term retention backups for a given location. + # + # @param location_name [String] The location of the database + # @param only_latest_per_database [Boolean] Whether or not to only get the + # latest backup for each database. + # @param database_state [LongTermRetentionDatabaseState] Whether to query + # against just live databases, just deleted databases, or all databases. + # Possible values include: 'All', 'Live', 'Deleted' + # @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_location_async(location_name, only_latest_per_database = nil, database_state = nil, custom_headers = nil) + fail ArgumentError, 'location_name is nil' if location_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/locations/{locationName}/longTermRetentionBackups' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'locationName' => location_name,'subscriptionId' => @client.subscription_id}, + query_params: {'onlyLatestPerDatabase' => only_latest_per_database,'databaseState' => database_state,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackupListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Lists the long term retention backups for a given server. + # + # @param location_name [String] The location of the database + # @param long_term_retention_server_name [String] + # @param only_latest_per_database [Boolean] Whether or not to only get the + # latest backup for each database. + # @param database_state [LongTermRetentionDatabaseState] Whether to query + # against just live databases, just deleted databases, or all databases. + # Possible values include: 'All', 'Live', 'Deleted' + # @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_server(location_name, long_term_retention_server_name, only_latest_per_database = nil, database_state = nil, custom_headers = nil) + first_page = list_by_server_as_lazy(location_name, long_term_retention_server_name, only_latest_per_database, database_state, custom_headers) + first_page.get_all_items + end + + # + # Lists the long term retention backups for a given server. + # + # @param location_name [String] The location of the database + # @param long_term_retention_server_name [String] + # @param only_latest_per_database [Boolean] Whether or not to only get the + # latest backup for each database. + # @param database_state [LongTermRetentionDatabaseState] Whether to query + # against just live databases, just deleted databases, or all databases. + # Possible values include: 'All', 'Live', 'Deleted' + # @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_server_with_http_info(location_name, long_term_retention_server_name, only_latest_per_database = nil, database_state = nil, custom_headers = nil) + list_by_server_async(location_name, long_term_retention_server_name, only_latest_per_database, database_state, custom_headers).value! + end + + # + # Lists the long term retention backups for a given server. + # + # @param location_name [String] The location of the database + # @param long_term_retention_server_name [String] + # @param only_latest_per_database [Boolean] Whether or not to only get the + # latest backup for each database. + # @param database_state [LongTermRetentionDatabaseState] Whether to query + # against just live databases, just deleted databases, or all databases. + # Possible values include: 'All', 'Live', 'Deleted' + # @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_server_async(location_name, long_term_retention_server_name, only_latest_per_database = nil, database_state = nil, custom_headers = nil) + fail ArgumentError, 'location_name is nil' if location_name.nil? + fail ArgumentError, 'long_term_retention_server_name is nil' if long_term_retention_server_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'locationName' => location_name,'longTermRetentionServerName' => long_term_retention_server_name,'subscriptionId' => @client.subscription_id}, + query_params: {'onlyLatestPerDatabase' => only_latest_per_database,'databaseState' => database_state,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackupListResult.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 a long term retention backup. + # + # @param location_name [String] The location of the database + # @param long_term_retention_server_name [String] + # @param long_term_retention_database_name [String] + # @param backup_name [String] The backup name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers = nil) + response = begin_delete_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers).value! + nil + end + + # + # Deletes a long term retention backup. + # + # @param location_name [String] The location of the database + # @param long_term_retention_server_name [String] + # @param long_term_retention_database_name [String] + # @param backup_name [String] The backup 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 begin_delete_with_http_info(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers = nil) + begin_delete_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers).value! + end + + # + # Deletes a long term retention backup. + # + # @param location_name [String] The location of the database + # @param long_term_retention_server_name [String] + # @param long_term_retention_database_name [String] + # @param backup_name [String] The backup 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 begin_delete_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers = nil) + fail ArgumentError, 'location_name is nil' if location_name.nil? + fail ArgumentError, 'long_term_retention_server_name is nil' if long_term_retention_server_name.nil? + fail ArgumentError, 'long_term_retention_database_name is nil' if long_term_retention_database_name.nil? + fail ArgumentError, 'backup_name is nil' if backup_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'locationName' => location_name,'longTermRetentionServerName' => long_term_retention_server_name,'longTermRetentionDatabaseName' => long_term_retention_database_name,'backupName' => backup_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists all long term retention backups for a database. + # + # @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 [LongTermRetentionBackupListResult] operation results. + # + def list_by_database_next(next_page_link, custom_headers = nil) + response = list_by_database_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all long term retention backups for a database. + # + # @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_database_next_with_http_info(next_page_link, custom_headers = nil) + list_by_database_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all long term retention backups for a database. + # + # @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_database_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackupListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Lists the long term retention backups for a given location. + # + # @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 [LongTermRetentionBackupListResult] operation results. + # + def list_by_location_next(next_page_link, custom_headers = nil) + response = list_by_location_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists the long term retention backups for a given location. + # + # @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_location_next_with_http_info(next_page_link, custom_headers = nil) + list_by_location_next_async(next_page_link, custom_headers).value! + end + + # + # Lists the long term retention backups for a given location. + # + # @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_location_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackupListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Lists the long term retention backups for a given server. + # + # @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 [LongTermRetentionBackupListResult] operation results. + # + def list_by_server_next(next_page_link, custom_headers = nil) + response = list_by_server_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists the long term retention backups for a given server. + # + # @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_server_next_with_http_info(next_page_link, custom_headers = nil) + list_by_server_next_async(next_page_link, custom_headers).value! + end + + # + # Lists the long term retention backups for a given server. + # + # @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_server_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackupListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Lists all long term retention backups for a database. + # + # @param location_name [String] The location of the database + # @param long_term_retention_server_name [String] + # @param long_term_retention_database_name [String] + # @param only_latest_per_database [Boolean] Whether or not to only get the + # latest backup for each database. + # @param database_state [LongTermRetentionDatabaseState] Whether to query + # against just live databases, just deleted databases, or all databases. + # Possible values include: 'All', 'Live', 'Deleted' + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LongTermRetentionBackupListResult] which provide lazy access to + # pages of the response. + # + def list_by_database_as_lazy(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database = nil, database_state = nil, custom_headers = nil) + response = list_by_database_async(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database, database_state, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_database_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Lists the long term retention backups for a given location. + # + # @param location_name [String] The location of the database + # @param only_latest_per_database [Boolean] Whether or not to only get the + # latest backup for each database. + # @param database_state [LongTermRetentionDatabaseState] Whether to query + # against just live databases, just deleted databases, or all databases. + # Possible values include: 'All', 'Live', 'Deleted' + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LongTermRetentionBackupListResult] which provide lazy access to + # pages of the response. + # + def list_by_location_as_lazy(location_name, only_latest_per_database = nil, database_state = nil, custom_headers = nil) + response = list_by_location_async(location_name, only_latest_per_database, database_state, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_location_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Lists the long term retention backups for a given server. + # + # @param location_name [String] The location of the database + # @param long_term_retention_server_name [String] + # @param only_latest_per_database [Boolean] Whether or not to only get the + # latest backup for each database. + # @param database_state [LongTermRetentionDatabaseState] Whether to query + # against just live databases, just deleted databases, or all databases. + # Possible values include: 'All', 'Live', 'Deleted' + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LongTermRetentionBackupListResult] which provide lazy access to + # pages of the response. + # + def list_by_server_as_lazy(location_name, long_term_retention_server_name, only_latest_per_database = nil, database_state = nil, custom_headers = nil) + response = list_by_server_async(location_name, long_term_retention_server_name, only_latest_per_database, database_state, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_server_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/managed_databases.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/managed_databases.rb new file mode 100644 index 0000000000..9bb4950311 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/managed_databases.rb @@ -0,0 +1,962 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class ManagedDatabases + include MsRestAzure + + # + # Creates and initializes a new instance of the ManagedDatabases class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Completes the restore operation on a managed database. + # + # @param location_name [String] The name of the region where the resource is + # located. + # @param operation_id Management operation id that this request tries to + # complete. + # @param parameters [CompleteDatabaseRestoreDefinition] The definition for + # completing the restore of this managed database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def complete_restore(location_name, operation_id, parameters, custom_headers = nil) + response = complete_restore_async(location_name, operation_id, parameters, custom_headers).value! + nil + end + + # + # @param location_name [String] The name of the region where the resource is + # located. + # @param operation_id Management operation id that this request tries to + # complete. + # @param parameters [CompleteDatabaseRestoreDefinition] The definition for + # completing the restore of this managed database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def complete_restore_async(location_name, operation_id, parameters, custom_headers = nil) + # Send request + promise = begin_complete_restore_async(location_name, operation_id, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets a list of managed databases. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @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_instance(resource_group_name, managed_instance_name, custom_headers = nil) + first_page = list_by_instance_as_lazy(resource_group_name, managed_instance_name, custom_headers) + first_page.get_all_items + end + + # + # Gets a list of managed databases. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @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_instance_with_http_info(resource_group_name, managed_instance_name, custom_headers = nil) + list_by_instance_async(resource_group_name, managed_instance_name, custom_headers).value! + end + + # + # Gets a list of managed databases. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @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_instance_async(resource_group_name, managed_instance_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'managed_instance_name is nil' if managed_instance_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/managedInstances/{managedInstanceName}/databases' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'managedInstanceName' => managed_instance_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabaseListResult.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 managed database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ManagedDatabase] operation results. + # + def get(resource_group_name, managed_instance_name, database_name, custom_headers = nil) + response = get_async(resource_group_name, managed_instance_name, database_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a managed database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, managed_instance_name, database_name, custom_headers = nil) + get_async(resource_group_name, managed_instance_name, database_name, custom_headers).value! + end + + # + # Gets a managed database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param database_name [String] The name of the database. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, managed_instance_name, database_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'managed_instance_name is nil' if managed_instance_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'managedInstanceName' => managed_instance_name,'databaseName' => database_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabase.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates a new database or updates an existing database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param database_name [String] The name of the database. + # @param parameters [ManagedDatabase] The requested database resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ManagedDatabase] operation results. + # + def create_or_update(resource_group_name, managed_instance_name, database_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, managed_instance_name, database_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param database_name [String] The name of the database. + # @param parameters [ManagedDatabase] The requested database resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(resource_group_name, managed_instance_name, database_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, managed_instance_name, database_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabase.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes the managed database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, managed_instance_name, database_name, custom_headers = nil) + response = delete_async(resource_group_name, managed_instance_name, database_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, managed_instance_name, database_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, managed_instance_name, database_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Updates an existing database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param database_name [String] The name of the database. + # @param parameters [ManagedDatabaseUpdate] The requested database resource + # state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ManagedDatabase] operation results. + # + def update(resource_group_name, managed_instance_name, database_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, managed_instance_name, database_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param database_name [String] The name of the database. + # @param parameters [ManagedDatabaseUpdate] The requested database resource + # state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def update_async(resource_group_name, managed_instance_name, database_name, parameters, custom_headers = nil) + # Send request + promise = begin_update_async(resource_group_name, managed_instance_name, database_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabase.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Completes the restore operation on a managed database. + # + # @param location_name [String] The name of the region where the resource is + # located. + # @param operation_id Management operation id that this request tries to + # complete. + # @param parameters [CompleteDatabaseRestoreDefinition] The definition for + # completing the restore of this managed database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_complete_restore(location_name, operation_id, parameters, custom_headers = nil) + response = begin_complete_restore_async(location_name, operation_id, parameters, custom_headers).value! + nil + end + + # + # Completes the restore operation on a managed database. + # + # @param location_name [String] The name of the region where the resource is + # located. + # @param operation_id Management operation id that this request tries to + # complete. + # @param parameters [CompleteDatabaseRestoreDefinition] The definition for + # completing the restore of this managed database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_complete_restore_with_http_info(location_name, operation_id, parameters, custom_headers = nil) + begin_complete_restore_async(location_name, operation_id, parameters, custom_headers).value! + end + + # + # Completes the restore operation on a managed database. + # + # @param location_name [String] The name of the region where the resource is + # located. + # @param operation_id Management operation id that this request tries to + # complete. + # @param parameters [CompleteDatabaseRestoreDefinition] The definition for + # completing the restore of this managed database. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_complete_restore_async(location_name, operation_id, parameters, custom_headers = nil) + fail ArgumentError, 'location_name is nil' if location_name.nil? + fail ArgumentError, 'operation_id is nil' if operation_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::CompleteDatabaseRestoreDefinition.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/managedDatabaseRestoreAzureAsyncOperation/{operationId}/completeRestore' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'locationName' => location_name,'operationId' => operation_id,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(: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 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Creates a new database or updates an existing database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param database_name [String] The name of the database. + # @param parameters [ManagedDatabase] The requested database resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ManagedDatabase] operation results. + # + def begin_create_or_update(resource_group_name, managed_instance_name, database_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, managed_instance_name, database_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a new database or updates an existing database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param database_name [String] The name of the database. + # @param parameters [ManagedDatabase] The requested database resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(resource_group_name, managed_instance_name, database_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, managed_instance_name, database_name, parameters, custom_headers).value! + end + + # + # Creates a new database or updates an existing database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param database_name [String] The name of the database. + # @param parameters [ManagedDatabase] The requested database resource state. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(resource_group_name, managed_instance_name, database_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'managed_instance_name is nil' if managed_instance_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabase.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'managedInstanceName' => managed_instance_name,'databaseName' => database_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabase.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabase.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes the managed database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(resource_group_name, managed_instance_name, database_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, managed_instance_name, database_name, custom_headers).value! + nil + end + + # + # Deletes the managed database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(resource_group_name, managed_instance_name, database_name, custom_headers = nil) + begin_delete_async(resource_group_name, managed_instance_name, database_name, custom_headers).value! + end + + # + # Deletes the managed database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param database_name [String] The name of the database. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(resource_group_name, managed_instance_name, database_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'managed_instance_name is nil' if managed_instance_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'managedInstanceName' => managed_instance_name,'databaseName' => database_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Updates an existing database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param database_name [String] The name of the database. + # @param parameters [ManagedDatabaseUpdate] The requested database resource + # state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ManagedDatabase] operation results. + # + def begin_update(resource_group_name, managed_instance_name, database_name, parameters, custom_headers = nil) + response = begin_update_async(resource_group_name, managed_instance_name, database_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates an existing database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param database_name [String] The name of the database. + # @param parameters [ManagedDatabaseUpdate] The requested database resource + # state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_update_with_http_info(resource_group_name, managed_instance_name, database_name, parameters, custom_headers = nil) + begin_update_async(resource_group_name, managed_instance_name, database_name, parameters, custom_headers).value! + end + + # + # Updates an existing database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param database_name [String] The name of the database. + # @param parameters [ManagedDatabaseUpdate] The requested database resource + # state. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_update_async(resource_group_name, managed_instance_name, database_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'managed_instance_name is nil' if managed_instance_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabaseUpdate.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'managedInstanceName' => managed_instance_name,'databaseName' => database_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabase.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 managed databases. + # + # @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 [ManagedDatabaseListResult] operation results. + # + def list_by_instance_next(next_page_link, custom_headers = nil) + response = list_by_instance_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a list of managed databases. + # + # @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_instance_next_with_http_info(next_page_link, custom_headers = nil) + list_by_instance_next_async(next_page_link, custom_headers).value! + end + + # + # Gets a list of managed databases. + # + # @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_instance_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabaseListResult.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 managed databases. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param managed_instance_name [String] The name of the managed instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ManagedDatabaseListResult] which provide lazy access to pages of the + # response. + # + def list_by_instance_as_lazy(resource_group_name, managed_instance_name, custom_headers = nil) + response = list_by_instance_async(resource_group_name, managed_instance_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_instance_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_server_options.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_server_options.rb index 4ab4288e9b..b78f440e3b 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_server_options.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_server_options.rb @@ -36,7 +36,6 @@ class AutomaticTuningServerOptions # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'AutomaticTuningServerOptions', type: { @@ -44,7 +43,6 @@ def self.mapper() class_name: 'AutomaticTuningServerOptions', model_properties: { desired_state: { - client_side_validation: true, required: false, serialized_name: 'desiredState', type: { @@ -53,7 +51,6 @@ def self.mapper() } }, actual_state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'actualState', @@ -63,7 +60,6 @@ def self.mapper() } }, reason_code: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'reasonCode', @@ -72,7 +68,6 @@ def self.mapper() } }, reason_desc: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'reasonDesc', diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/backup_long_term_retention_policy.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/backup_long_term_retention_policy.rb new file mode 100644 index 0000000000..708057b5d0 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/backup_long_term_retention_policy.rb @@ -0,0 +1,102 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A long term retention policy. + # + class BackupLongTermRetentionPolicy < ProxyResource + + include MsRestAzure + + # @return [String] The weekly retention policy for an LTR backup in an + # ISO 8601 format. + attr_accessor :weekly_retention + + # @return [String] The montly retention policy for an LTR backup in an + # ISO 8601 format. + attr_accessor :monthly_retention + + # @return [String] The yearly retention policy for an LTR backup in an + # ISO 8601 format. + attr_accessor :yearly_retention + + # @return [Integer] The week of year to take the yearly backup in an ISO + # 8601 format. + attr_accessor :week_of_year + + + # + # Mapper for BackupLongTermRetentionPolicy class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BackupLongTermRetentionPolicy', + type: { + name: 'Composite', + class_name: 'BackupLongTermRetentionPolicy', + 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' + } + }, + weekly_retention: { + required: false, + serialized_name: 'properties.weeklyRetention', + type: { + name: 'String' + } + }, + monthly_retention: { + required: false, + serialized_name: 'properties.monthlyRetention', + type: { + name: 'String' + } + }, + yearly_retention: { + required: false, + serialized_name: 'properties.yearlyRetention', + type: { + name: 'String' + } + }, + week_of_year: { + required: false, + serialized_name: 'properties.weekOfYear', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/blob_auditing_policy_state.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/blob_auditing_policy_state.rb new file mode 100644 index 0000000000..503ef7cd4a --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/blob_auditing_policy_state.rb @@ -0,0 +1,16 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # Defines values for BlobAuditingPolicyState + # + module BlobAuditingPolicyState + Enabled = "Enabled" + Disabled = "Disabled" + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/complete_database_restore_definition.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/complete_database_restore_definition.rb new file mode 100644 index 0000000000..4fdef50451 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/complete_database_restore_definition.rb @@ -0,0 +1,45 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # Contains the information necessary to perform a complete database restore + # operation. + # + class CompleteDatabaseRestoreDefinition + + include MsRestAzure + + # @return [String] The last backup name to apply + attr_accessor :last_backup_name + + + # + # Mapper for CompleteDatabaseRestoreDefinition class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CompleteDatabaseRestoreDefinition', + type: { + name: 'Composite', + class_name: 'CompleteDatabaseRestoreDefinition', + model_properties: { + last_backup_name: { + required: true, + serialized_name: 'lastBackupName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/create_database_restore_point_definition.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/create_database_restore_point_definition.rb index 2ca49081f7..bf08d7dda3 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/create_database_restore_point_definition.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/create_database_restore_point_definition.rb @@ -23,7 +23,6 @@ class CreateDatabaseRestorePointDefinition # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'CreateDatabaseRestorePointDefinition', type: { @@ -31,7 +30,6 @@ def self.mapper() class_name: 'CreateDatabaseRestorePointDefinition', model_properties: { restore_point_label: { - client_side_validation: true, required: true, serialized_name: 'restorePointLabel', type: { diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/create_mode.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/create_mode.rb index c49e1a8f0b..5e89a67726 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/create_mode.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/create_mode.rb @@ -12,6 +12,7 @@ module CreateMode Default = "Default" Copy = "Copy" Secondary = "Secondary" + OnlineSecondary = "OnlineSecondary" PointInTimeRestore = "PointInTimeRestore" Restore = "Restore" Recovery = "Recovery" diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/data_warehouse_user_activities.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/data_warehouse_user_activities.rb new file mode 100644 index 0000000000..7f58f12a08 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/data_warehouse_user_activities.rb @@ -0,0 +1,69 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # User activities of a data warehouse + # + class DataWarehouseUserActivities < ProxyResource + + include MsRestAzure + + # @return [Integer] Count of running and suspended queries. + attr_accessor :active_queries_count + + + # + # Mapper for DataWarehouseUserActivities class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DataWarehouseUserActivities', + type: { + name: 'Composite', + class_name: 'DataWarehouseUserActivities', + 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' + } + }, + active_queries_count: { + required: false, + read_only: true, + serialized_name: 'properties.activeQueriesCount', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database.rb index c6988bdfca..42c82a8f65 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database.rb @@ -12,7 +12,7 @@ class Database < TrackedResource include MsRestAzure - # @return [ArmSku] The name and tier of the SKU. + # @return [Sku] The name and tier of the SKU. attr_accessor :sku # @return [String] Kind of database. This is metadata used for the Azure @@ -54,8 +54,8 @@ class Database < TrackedResource # # Copy, Secondary, and RestoreLongTermRetentionBackup are not supported # for DataWarehouse edition. Possible values include: 'Default', 'Copy', - # 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - # 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + # 'Secondary', 'OnlineSecondary', 'PointInTimeRestore', 'Restore', + # 'Recovery', 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', # 'RestoreLongTermRetentionBackup' attr_accessor :create_mode @@ -78,11 +78,11 @@ class Database < TrackedResource # associated with create operation of this database. attr_accessor :source_database_id - # @return [Status] The status of the database. Possible values include: - # 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - # 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - # 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - # 'Paused', 'Resuming', 'Scaling' + # @return [DatabaseStatus] The status of the database. Possible values + # include: 'Online', 'Restoring', 'RecoveryPending', 'Recovering', + # 'Suspect', 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', + # 'AutoClosed', 'Copying', 'Creating', 'Inaccessible', + # 'OfflineSecondary', 'Pausing', 'Paused', 'Resuming', 'Scaling' attr_accessor :status # @return The ID of the database. @@ -142,7 +142,6 @@ class Database < TrackedResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Database', type: { @@ -150,7 +149,6 @@ def self.mapper() class_name: 'Database', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -159,7 +157,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -168,7 +165,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -177,7 +173,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: true, serialized_name: 'location', type: { @@ -185,13 +180,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: { @@ -201,16 +194,14 @@ def self.mapper() } }, sku: { - client_side_validation: true, required: false, serialized_name: 'sku', type: { name: 'Composite', - class_name: 'ArmSku' + class_name: 'Sku' } }, kind: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'kind', @@ -219,7 +210,6 @@ def self.mapper() } }, create_mode: { - client_side_validation: true, required: false, serialized_name: 'properties.createMode', type: { @@ -227,7 +217,6 @@ def self.mapper() } }, collation: { - client_side_validation: true, required: false, serialized_name: 'properties.collation', type: { @@ -235,7 +224,6 @@ def self.mapper() } }, max_size_bytes: { - client_side_validation: true, required: false, serialized_name: 'properties.maxSizeBytes', type: { @@ -243,7 +231,6 @@ def self.mapper() } }, sample_name: { - client_side_validation: true, required: false, serialized_name: 'properties.sampleName', type: { @@ -251,7 +238,6 @@ def self.mapper() } }, elastic_pool_id: { - client_side_validation: true, required: false, serialized_name: 'properties.elasticPoolId', type: { @@ -259,7 +245,6 @@ def self.mapper() } }, source_database_id: { - client_side_validation: true, required: false, serialized_name: 'properties.sourceDatabaseId', type: { @@ -267,7 +252,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.status', @@ -276,7 +260,6 @@ def self.mapper() } }, database_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.databaseId', @@ -285,7 +268,6 @@ def self.mapper() } }, creation_date: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.creationDate', @@ -294,7 +276,6 @@ def self.mapper() } }, current_service_objective_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.currentServiceObjectiveName', @@ -303,7 +284,6 @@ def self.mapper() } }, default_secondary_location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.defaultSecondaryLocation', @@ -312,7 +292,6 @@ def self.mapper() } }, failover_group_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.failoverGroupId', @@ -321,7 +300,6 @@ def self.mapper() } }, restore_point_in_time: { - client_side_validation: true, required: false, serialized_name: 'properties.restorePointInTime', type: { @@ -329,7 +307,6 @@ def self.mapper() } }, source_database_deletion_date: { - client_side_validation: true, required: false, serialized_name: 'properties.sourceDatabaseDeletionDate', type: { @@ -337,7 +314,6 @@ def self.mapper() } }, recovery_services_recovery_point_id: { - client_side_validation: true, required: false, serialized_name: 'properties.recoveryServicesRecoveryPointId', type: { @@ -345,7 +321,6 @@ def self.mapper() } }, long_term_retention_backup_resource_id: { - client_side_validation: true, required: false, serialized_name: 'properties.longTermRetentionBackupResourceId', type: { @@ -353,7 +328,6 @@ def self.mapper() } }, recoverable_database_id: { - client_side_validation: true, required: false, serialized_name: 'properties.recoverableDatabaseId', type: { @@ -361,7 +335,6 @@ def self.mapper() } }, restorable_dropped_database_id: { - client_side_validation: true, required: false, serialized_name: 'properties.restorableDroppedDatabaseId', type: { @@ -369,7 +342,6 @@ def self.mapper() } }, catalog_collation: { - client_side_validation: true, required: false, serialized_name: 'properties.catalogCollation', type: { @@ -377,7 +349,6 @@ def self.mapper() } }, zone_redundant: { - client_side_validation: true, required: false, serialized_name: 'properties.zoneRedundant', type: { diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb new file mode 100644 index 0000000000..fc32891b89 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb @@ -0,0 +1,225 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A database blob auditing policy. + # + class DatabaseBlobAuditingPolicy < ProxyResource + + include MsRestAzure + + # @return [String] Resource kind. + attr_accessor :kind + + # @return [BlobAuditingPolicyState] Specifies the state of the policy. If + # state is Enabled, storageEndpoint and storageAccountAccessKey are + # required. Possible values include: 'Enabled', 'Disabled' + attr_accessor :state + + # @return [String] Specifies the blob storage endpoint (e.g. + # https://MyAccount.blob.core.windows.net). If state is Enabled, + # storageEndpoint is required. + attr_accessor :storage_endpoint + + # @return [String] Specifies the identifier key of the auditing storage + # account. If state is Enabled, storageAccountAccessKey is required. + attr_accessor :storage_account_access_key + + # @return [Integer] Specifies the number of days to keep in the audit + # logs. + attr_accessor :retention_days + + # @return [Array] Specifies the Actions-Groups and Actions to + # audit. + # + # The recommended set of action groups to use is the following + # combination - this will audit all the queries and stored procedures + # executed against the database, as well as successful and failed logins: + # + # BATCH_COMPLETED_GROUP, + # SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + # FAILED_DATABASE_AUTHENTICATION_GROUP. + # + # This above combination is also the set that is configured by default + # when enabling auditing from the Azure portal. + # + # The supported action groups to audit are (note: choose only specific + # groups that cover your auditing needs. Using unnecessary groups could + # lead to very large quantities of audit records): + # + # APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + # BACKUP_RESTORE_GROUP + # DATABASE_LOGOUT_GROUP + # DATABASE_OBJECT_CHANGE_GROUP + # DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + # DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + # DATABASE_OPERATION_GROUP + # DATABASE_PERMISSION_CHANGE_GROUP + # DATABASE_PRINCIPAL_CHANGE_GROUP + # DATABASE_PRINCIPAL_IMPERSONATION_GROUP + # DATABASE_ROLE_MEMBER_CHANGE_GROUP + # FAILED_DATABASE_AUTHENTICATION_GROUP + # SCHEMA_OBJECT_ACCESS_GROUP + # SCHEMA_OBJECT_CHANGE_GROUP + # SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + # SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + # SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + # USER_CHANGE_PASSWORD_GROUP + # BATCH_STARTED_GROUP + # BATCH_COMPLETED_GROUP + # + # These are groups that cover all sql statements and stored procedures + # executed against the database, and should not be used in combination + # with other groups as this will result in duplicate audit logs. + # + # For more information, see [Database-Level Audit Action + # Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + # + # For Database auditing policy, specific Actions can also be specified + # (note that Actions cannot be specified for Server auditing policy). The + # supported actions to audit are: + # SELECT + # UPDATE + # INSERT + # DELETE + # EXECUTE + # RECEIVE + # REFERENCES + # + # The general form for defining an action to be audited is: + # ON BY + # + # Note that in the above format can refer to an object like a + # table, view, or stored procedure, or an entire database or schema. For + # the latter cases, the forms DATABASE:: and + # SCHEMA:: are used, respectively. + # + # For example: + # SELECT on dbo.myTable by public + # SELECT on DATABASE::myDatabase by public + # SELECT on SCHEMA::mySchema by public + # + # For more information, see [Database-Level Audit + # Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + attr_accessor :audit_actions_and_groups + + # @return Specifies the blob storage subscription Id. + attr_accessor :storage_account_subscription_id + + # @return [Boolean] Specifies whether storageAccountAccessKey value is + # the storage's secondary key. + attr_accessor :is_storage_secondary_key_in_use + + + # + # Mapper for DatabaseBlobAuditingPolicy class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DatabaseBlobAuditingPolicy', + type: { + name: 'Composite', + class_name: 'DatabaseBlobAuditingPolicy', + 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' + } + }, + kind: { + required: false, + read_only: true, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + state: { + required: true, + serialized_name: 'properties.state', + type: { + name: 'Enum', + module: 'BlobAuditingPolicyState' + } + }, + storage_endpoint: { + required: false, + serialized_name: 'properties.storageEndpoint', + type: { + name: 'String' + } + }, + storage_account_access_key: { + required: false, + serialized_name: 'properties.storageAccountAccessKey', + type: { + name: 'String' + } + }, + retention_days: { + required: false, + serialized_name: 'properties.retentionDays', + type: { + name: 'Number' + } + }, + audit_actions_and_groups: { + required: false, + serialized_name: 'properties.auditActionsAndGroups', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + storage_account_subscription_id: { + required: false, + serialized_name: 'properties.storageAccountSubscriptionId', + type: { + name: 'String' + } + }, + is_storage_secondary_key_in_use: { + required: false, + serialized_name: 'properties.isStorageSecondaryKeyInUse', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_list_result.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_list_result.rb index 15e5db8e46..e618dab4e5 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_list_result.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_list_result.rb @@ -57,7 +57,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'DatabaseListResult', type: { @@ -65,14 +64,12 @@ def self.mapper() class_name: 'DatabaseListResult', 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: 'DatabaseElementType', type: { @@ -83,7 +80,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'nextLink', diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_operation.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_operation.rb index b12625a0cb..f95244c8f4 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_operation.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_operation.rb @@ -48,6 +48,15 @@ class DatabaseOperation < ProxyResource # @return [Boolean] Whether or not the error is a user error. attr_accessor :is_user_error + # @return [DateTime] The estimated completion time of the operation. + attr_accessor :estimated_completion_time + + # @return [String] The operation description. + attr_accessor :description + + # @return [Boolean] Whether the operation can be cancelled. + attr_accessor :is_cancellable + # # Mapper for DatabaseOperation class as Ruby Hash. @@ -55,7 +64,6 @@ class DatabaseOperation < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'DatabaseOperation', type: { @@ -63,7 +71,6 @@ def self.mapper() class_name: 'DatabaseOperation', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -72,7 +79,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -81,7 +87,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -90,7 +95,6 @@ def self.mapper() } }, database_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.databaseName', @@ -99,7 +103,6 @@ def self.mapper() } }, operation: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.operation', @@ -108,7 +111,6 @@ def self.mapper() } }, operation_friendly_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.operationFriendlyName', @@ -117,7 +119,6 @@ def self.mapper() } }, percent_complete: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.percentComplete', @@ -126,7 +127,6 @@ def self.mapper() } }, server_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.serverName', @@ -135,7 +135,6 @@ def self.mapper() } }, start_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.startTime', @@ -144,7 +143,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.state', @@ -153,7 +151,6 @@ def self.mapper() } }, error_code: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.errorCode', @@ -162,7 +159,6 @@ def self.mapper() } }, error_description: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.errorDescription', @@ -171,7 +167,6 @@ def self.mapper() } }, error_severity: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.errorSeverity', @@ -180,13 +175,36 @@ def self.mapper() } }, is_user_error: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.isUserError', type: { name: 'Boolean' } + }, + estimated_completion_time: { + required: false, + read_only: true, + serialized_name: 'properties.estimatedCompletionTime', + type: { + name: 'DateTime' + } + }, + description: { + required: false, + read_only: true, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + is_cancellable: { + required: false, + read_only: true, + serialized_name: 'properties.isCancellable', + type: { + name: 'Boolean' + } } } } diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_operation_list_result.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_operation_list_result.rb index 39f5bf1728..816a9586bc 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_operation_list_result.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_operation_list_result.rb @@ -57,7 +57,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'DatabaseOperationListResult', type: { @@ -65,14 +64,12 @@ def self.mapper() class_name: 'DatabaseOperationListResult', 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: 'DatabaseOperationElementType', type: { @@ -83,7 +80,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'nextLink', diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_status.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_status.rb new file mode 100644 index 0000000000..27c2e854d2 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_status.rb @@ -0,0 +1,32 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # Defines values for DatabaseStatus + # + module DatabaseStatus + Online = "Online" + Restoring = "Restoring" + RecoveryPending = "RecoveryPending" + Recovering = "Recovering" + Suspect = "Suspect" + Offline = "Offline" + Standby = "Standby" + Shutdown = "Shutdown" + EmergencyMode = "EmergencyMode" + AutoClosed = "AutoClosed" + Copying = "Copying" + Creating = "Creating" + Inaccessible = "Inaccessible" + OfflineSecondary = "OfflineSecondary" + Pausing = "Pausing" + Paused = "Paused" + Resuming = "Resuming" + Scaling = "Scaling" + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_update.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_update.rb index 639c7cb45e..6b222ae0ab 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_update.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_update.rb @@ -12,7 +12,7 @@ class DatabaseUpdate include MsRestAzure - # @return [ArmSku] The name and tier of the SKU. + # @return [Sku] The name and tier of the SKU. attr_accessor :sku # @return [CreateMode] Specifies the mode of database creation. @@ -50,8 +50,8 @@ class DatabaseUpdate # # Copy, Secondary, and RestoreLongTermRetentionBackup are not supported # for DataWarehouse edition. Possible values include: 'Default', 'Copy', - # 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - # 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + # 'Secondary', 'OnlineSecondary', 'PointInTimeRestore', 'Restore', + # 'Recovery', 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', # 'RestoreLongTermRetentionBackup' attr_accessor :create_mode @@ -74,11 +74,11 @@ class DatabaseUpdate # associated with create operation of this database. attr_accessor :source_database_id - # @return [Status] The status of the database. Possible values include: - # 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - # 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - # 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - # 'Paused', 'Resuming', 'Scaling' + # @return [DatabaseStatus] The status of the database. Possible values + # include: 'Online', 'Restoring', 'RecoveryPending', 'Recovering', + # 'Suspect', 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', + # 'AutoClosed', 'Copying', 'Creating', 'Inaccessible', + # 'OfflineSecondary', 'Pausing', 'Paused', 'Resuming', 'Scaling' attr_accessor :status # @return The ID of the database. @@ -141,7 +141,6 @@ class DatabaseUpdate # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'DatabaseUpdate', type: { @@ -149,16 +148,14 @@ def self.mapper() class_name: 'DatabaseUpdate', model_properties: { sku: { - client_side_validation: true, required: false, serialized_name: 'sku', type: { name: 'Composite', - class_name: 'ArmSku' + class_name: 'Sku' } }, create_mode: { - client_side_validation: true, required: false, serialized_name: 'properties.createMode', type: { @@ -166,7 +163,6 @@ def self.mapper() } }, collation: { - client_side_validation: true, required: false, serialized_name: 'properties.collation', type: { @@ -174,7 +170,6 @@ def self.mapper() } }, max_size_bytes: { - client_side_validation: true, required: false, serialized_name: 'properties.maxSizeBytes', type: { @@ -182,7 +177,6 @@ def self.mapper() } }, sample_name: { - client_side_validation: true, required: false, serialized_name: 'properties.sampleName', type: { @@ -190,7 +184,6 @@ def self.mapper() } }, elastic_pool_id: { - client_side_validation: true, required: false, serialized_name: 'properties.elasticPoolId', type: { @@ -198,7 +191,6 @@ def self.mapper() } }, source_database_id: { - client_side_validation: true, required: false, serialized_name: 'properties.sourceDatabaseId', type: { @@ -206,7 +198,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.status', @@ -215,7 +206,6 @@ def self.mapper() } }, database_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.databaseId', @@ -224,7 +214,6 @@ def self.mapper() } }, creation_date: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.creationDate', @@ -233,7 +222,6 @@ def self.mapper() } }, current_service_objective_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.currentServiceObjectiveName', @@ -242,7 +230,6 @@ def self.mapper() } }, default_secondary_location: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.defaultSecondaryLocation', @@ -251,7 +238,6 @@ def self.mapper() } }, failover_group_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.failoverGroupId', @@ -260,7 +246,6 @@ def self.mapper() } }, restore_point_in_time: { - client_side_validation: true, required: false, serialized_name: 'properties.restorePointInTime', type: { @@ -268,7 +253,6 @@ def self.mapper() } }, source_database_deletion_date: { - client_side_validation: true, required: false, serialized_name: 'properties.sourceDatabaseDeletionDate', type: { @@ -276,7 +260,6 @@ def self.mapper() } }, recovery_services_recovery_point_id: { - client_side_validation: true, required: false, serialized_name: 'properties.recoveryServicesRecoveryPointId', type: { @@ -284,7 +267,6 @@ def self.mapper() } }, long_term_retention_backup_resource_id: { - client_side_validation: true, required: false, serialized_name: 'properties.longTermRetentionBackupResourceId', type: { @@ -292,7 +274,6 @@ def self.mapper() } }, recoverable_database_id: { - client_side_validation: true, required: false, serialized_name: 'properties.recoverableDatabaseId', type: { @@ -300,7 +281,6 @@ def self.mapper() } }, restorable_dropped_database_id: { - client_side_validation: true, required: false, serialized_name: 'properties.restorableDroppedDatabaseId', type: { @@ -308,7 +288,6 @@ def self.mapper() } }, catalog_collation: { - client_side_validation: true, required: false, serialized_name: 'properties.catalogCollation', type: { @@ -316,7 +295,6 @@ def self.mapper() } }, zone_redundant: { - client_side_validation: true, required: false, serialized_name: 'properties.zoneRedundant', type: { @@ -324,13 +302,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_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment.rb new file mode 100644 index 0000000000..ab1417a84d --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment.rb @@ -0,0 +1,93 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A database vulnerability assessment. + # + class DatabaseVulnerabilityAssessment < ProxyResource + + include MsRestAzure + + # @return [String] A blob storage container path to hold the scan results + # (e.g. https://myStorage.blob.core.windows.net/VaScans/). + attr_accessor :storage_container_path + + # @return [String] A shared access signature (SAS Key) that has write + # access to the blob container specified in 'storageContainerPath' + # parameter. + attr_accessor :storage_container_sas_key + + # @return [VulnerabilityAssessmentRecurringScansProperties] The recurring + # scans settings + attr_accessor :recurring_scans + + + # + # Mapper for DatabaseVulnerabilityAssessment class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DatabaseVulnerabilityAssessment', + type: { + name: 'Composite', + class_name: 'DatabaseVulnerabilityAssessment', + 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' + } + }, + storage_container_path: { + required: true, + serialized_name: 'properties.storageContainerPath', + type: { + name: 'String' + } + }, + storage_container_sas_key: { + required: true, + serialized_name: 'properties.storageContainerSasKey', + type: { + name: 'String' + } + }, + recurring_scans: { + required: false, + serialized_name: 'properties.recurringScans', + type: { + name: 'Composite', + class_name: 'VulnerabilityAssessmentRecurringScansProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_rule_baseline.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_rule_baseline.rb new file mode 100644 index 0000000000..1a19684bee --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_rule_baseline.rb @@ -0,0 +1,78 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A database vulnerability assessment rule baseline. + # + class DatabaseVulnerabilityAssessmentRuleBaseline < ProxyResource + + include MsRestAzure + + # @return [Array] The + # rule baseline result + attr_accessor :baseline_results + + + # + # Mapper for DatabaseVulnerabilityAssessmentRuleBaseline class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DatabaseVulnerabilityAssessmentRuleBaseline', + type: { + name: 'Composite', + class_name: 'DatabaseVulnerabilityAssessmentRuleBaseline', + 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' + } + }, + baseline_results: { + required: true, + serialized_name: 'properties.baselineResults', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DatabaseVulnerabilityAssessmentRuleBaselineItemElementType', + type: { + name: 'Composite', + class_name: 'DatabaseVulnerabilityAssessmentRuleBaselineItem' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_rule_baseline_item.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_rule_baseline_item.rb new file mode 100644 index 0000000000..1289ff7d9b --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_rule_baseline_item.rb @@ -0,0 +1,53 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # Properties for an Azure SQL Database Vulnerability Assessment rule + # baseline's result. + # + class DatabaseVulnerabilityAssessmentRuleBaselineItem + + include MsRestAzure + + # @return [Array] The rule baseline result + attr_accessor :result + + + # + # Mapper for DatabaseVulnerabilityAssessmentRuleBaselineItem class as + # Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DatabaseVulnerabilityAssessmentRuleBaselineItem', + type: { + name: 'Composite', + class_name: 'DatabaseVulnerabilityAssessmentRuleBaselineItem', + model_properties: { + result: { + required: true, + serialized_name: 'result', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/extended_database_blob_auditing_policy.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/extended_database_blob_auditing_policy.rb new file mode 100644 index 0000000000..84c7bd9d01 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/extended_database_blob_auditing_policy.rb @@ -0,0 +1,225 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # An extended database blob auditing policy. + # + class ExtendedDatabaseBlobAuditingPolicy < ProxyResource + + include MsRestAzure + + # @return [String] Specifies condition of where clause when creating an + # audit. + attr_accessor :predicate_expression + + # @return [BlobAuditingPolicyState] Specifies the state of the policy. If + # state is Enabled, storageEndpoint and storageAccountAccessKey are + # required. Possible values include: 'Enabled', 'Disabled' + attr_accessor :state + + # @return [String] Specifies the blob storage endpoint (e.g. + # https://MyAccount.blob.core.windows.net). If state is Enabled, + # storageEndpoint is required. + attr_accessor :storage_endpoint + + # @return [String] Specifies the identifier key of the auditing storage + # account. If state is Enabled, storageAccountAccessKey is required. + attr_accessor :storage_account_access_key + + # @return [Integer] Specifies the number of days to keep in the audit + # logs. + attr_accessor :retention_days + + # @return [Array] Specifies the Actions-Groups and Actions to + # audit. + # + # The recommended set of action groups to use is the following + # combination - this will audit all the queries and stored procedures + # executed against the database, as well as successful and failed logins: + # + # BATCH_COMPLETED_GROUP, + # SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + # FAILED_DATABASE_AUTHENTICATION_GROUP. + # + # This above combination is also the set that is configured by default + # when enabling auditing from the Azure portal. + # + # The supported action groups to audit are (note: choose only specific + # groups that cover your auditing needs. Using unnecessary groups could + # lead to very large quantities of audit records): + # + # APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + # BACKUP_RESTORE_GROUP + # DATABASE_LOGOUT_GROUP + # DATABASE_OBJECT_CHANGE_GROUP + # DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + # DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + # DATABASE_OPERATION_GROUP + # DATABASE_PERMISSION_CHANGE_GROUP + # DATABASE_PRINCIPAL_CHANGE_GROUP + # DATABASE_PRINCIPAL_IMPERSONATION_GROUP + # DATABASE_ROLE_MEMBER_CHANGE_GROUP + # FAILED_DATABASE_AUTHENTICATION_GROUP + # SCHEMA_OBJECT_ACCESS_GROUP + # SCHEMA_OBJECT_CHANGE_GROUP + # SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + # SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + # SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + # USER_CHANGE_PASSWORD_GROUP + # BATCH_STARTED_GROUP + # BATCH_COMPLETED_GROUP + # + # These are groups that cover all sql statements and stored procedures + # executed against the database, and should not be used in combination + # with other groups as this will result in duplicate audit logs. + # + # For more information, see [Database-Level Audit Action + # Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + # + # For Database auditing policy, specific Actions can also be specified + # (note that Actions cannot be specified for Server auditing policy). The + # supported actions to audit are: + # SELECT + # UPDATE + # INSERT + # DELETE + # EXECUTE + # RECEIVE + # REFERENCES + # + # The general form for defining an action to be audited is: + # ON BY + # + # Note that in the above format can refer to an object like a + # table, view, or stored procedure, or an entire database or schema. For + # the latter cases, the forms DATABASE:: and + # SCHEMA:: are used, respectively. + # + # For example: + # SELECT on dbo.myTable by public + # SELECT on DATABASE::myDatabase by public + # SELECT on SCHEMA::mySchema by public + # + # For more information, see [Database-Level Audit + # Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + attr_accessor :audit_actions_and_groups + + # @return Specifies the blob storage subscription Id. + attr_accessor :storage_account_subscription_id + + # @return [Boolean] Specifies whether storageAccountAccessKey value is + # the storage's secondary key. + attr_accessor :is_storage_secondary_key_in_use + + + # + # Mapper for ExtendedDatabaseBlobAuditingPolicy class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ExtendedDatabaseBlobAuditingPolicy', + type: { + name: 'Composite', + class_name: 'ExtendedDatabaseBlobAuditingPolicy', + 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' + } + }, + predicate_expression: { + required: false, + serialized_name: 'properties.predicateExpression', + type: { + name: 'String' + } + }, + state: { + required: true, + serialized_name: 'properties.state', + type: { + name: 'Enum', + module: 'BlobAuditingPolicyState' + } + }, + storage_endpoint: { + required: false, + serialized_name: 'properties.storageEndpoint', + type: { + name: 'String' + } + }, + storage_account_access_key: { + required: false, + serialized_name: 'properties.storageAccountAccessKey', + type: { + name: 'String' + } + }, + retention_days: { + required: false, + serialized_name: 'properties.retentionDays', + type: { + name: 'Number' + } + }, + audit_actions_and_groups: { + required: false, + serialized_name: 'properties.auditActionsAndGroups', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + storage_account_subscription_id: { + required: false, + serialized_name: 'properties.storageAccountSubscriptionId', + type: { + name: 'String' + } + }, + is_storage_secondary_key_in_use: { + required: false, + serialized_name: 'properties.isStorageSecondaryKeyInUse', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/extended_server_blob_auditing_policy.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/extended_server_blob_auditing_policy.rb new file mode 100644 index 0000000000..3430506fa1 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/extended_server_blob_auditing_policy.rb @@ -0,0 +1,225 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # An extended server blob auditing policy. + # + class ExtendedServerBlobAuditingPolicy < ProxyResource + + include MsRestAzure + + # @return [String] Specifies condition of where clause when creating an + # audit. + attr_accessor :predicate_expression + + # @return [BlobAuditingPolicyState] Specifies the state of the policy. If + # state is Enabled, storageEndpoint and storageAccountAccessKey are + # required. Possible values include: 'Enabled', 'Disabled' + attr_accessor :state + + # @return [String] Specifies the blob storage endpoint (e.g. + # https://MyAccount.blob.core.windows.net). If state is Enabled, + # storageEndpoint is required. + attr_accessor :storage_endpoint + + # @return [String] Specifies the identifier key of the auditing storage + # account. If state is Enabled, storageAccountAccessKey is required. + attr_accessor :storage_account_access_key + + # @return [Integer] Specifies the number of days to keep in the audit + # logs. + attr_accessor :retention_days + + # @return [Array] Specifies the Actions-Groups and Actions to + # audit. + # + # The recommended set of action groups to use is the following + # combination - this will audit all the queries and stored procedures + # executed against the database, as well as successful and failed logins: + # + # BATCH_COMPLETED_GROUP, + # SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + # FAILED_DATABASE_AUTHENTICATION_GROUP. + # + # This above combination is also the set that is configured by default + # when enabling auditing from the Azure portal. + # + # The supported action groups to audit are (note: choose only specific + # groups that cover your auditing needs. Using unnecessary groups could + # lead to very large quantities of audit records): + # + # APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + # BACKUP_RESTORE_GROUP + # DATABASE_LOGOUT_GROUP + # DATABASE_OBJECT_CHANGE_GROUP + # DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + # DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + # DATABASE_OPERATION_GROUP + # DATABASE_PERMISSION_CHANGE_GROUP + # DATABASE_PRINCIPAL_CHANGE_GROUP + # DATABASE_PRINCIPAL_IMPERSONATION_GROUP + # DATABASE_ROLE_MEMBER_CHANGE_GROUP + # FAILED_DATABASE_AUTHENTICATION_GROUP + # SCHEMA_OBJECT_ACCESS_GROUP + # SCHEMA_OBJECT_CHANGE_GROUP + # SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + # SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + # SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + # USER_CHANGE_PASSWORD_GROUP + # BATCH_STARTED_GROUP + # BATCH_COMPLETED_GROUP + # + # These are groups that cover all sql statements and stored procedures + # executed against the database, and should not be used in combination + # with other groups as this will result in duplicate audit logs. + # + # For more information, see [Database-Level Audit Action + # Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + # + # For Database auditing policy, specific Actions can also be specified + # (note that Actions cannot be specified for Server auditing policy). The + # supported actions to audit are: + # SELECT + # UPDATE + # INSERT + # DELETE + # EXECUTE + # RECEIVE + # REFERENCES + # + # The general form for defining an action to be audited is: + # ON BY + # + # Note that in the above format can refer to an object like a + # table, view, or stored procedure, or an entire database or schema. For + # the latter cases, the forms DATABASE:: and + # SCHEMA:: are used, respectively. + # + # For example: + # SELECT on dbo.myTable by public + # SELECT on DATABASE::myDatabase by public + # SELECT on SCHEMA::mySchema by public + # + # For more information, see [Database-Level Audit + # Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + attr_accessor :audit_actions_and_groups + + # @return Specifies the blob storage subscription Id. + attr_accessor :storage_account_subscription_id + + # @return [Boolean] Specifies whether storageAccountAccessKey value is + # the storage's secondary key. + attr_accessor :is_storage_secondary_key_in_use + + + # + # Mapper for ExtendedServerBlobAuditingPolicy class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ExtendedServerBlobAuditingPolicy', + type: { + name: 'Composite', + class_name: 'ExtendedServerBlobAuditingPolicy', + 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' + } + }, + predicate_expression: { + required: false, + serialized_name: 'properties.predicateExpression', + type: { + name: 'String' + } + }, + state: { + required: true, + serialized_name: 'properties.state', + type: { + name: 'Enum', + module: 'BlobAuditingPolicyState' + } + }, + storage_endpoint: { + required: false, + serialized_name: 'properties.storageEndpoint', + type: { + name: 'String' + } + }, + storage_account_access_key: { + required: false, + serialized_name: 'properties.storageAccountAccessKey', + type: { + name: 'String' + } + }, + retention_days: { + required: false, + serialized_name: 'properties.retentionDays', + type: { + name: 'Number' + } + }, + audit_actions_and_groups: { + required: false, + serialized_name: 'properties.auditActionsAndGroups', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + storage_account_subscription_id: { + required: false, + serialized_name: 'properties.storageAccountSubscriptionId', + type: { + name: 'String' + } + }, + is_storage_secondary_key_in_use: { + required: false, + serialized_name: 'properties.isStorageSecondaryKeyInUse', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/import_export_database_definition.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/import_export_database_definition.rb index 6cefc54362..b772d7ba7f 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/import_export_database_definition.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/import_export_database_definition.rb @@ -49,7 +49,6 @@ class ImportExportDatabaseDefinition # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ImportExportDatabaseDefinition', type: { @@ -57,7 +56,6 @@ def self.mapper() class_name: 'ImportExportDatabaseDefinition', model_properties: { database_name: { - client_side_validation: true, required: false, serialized_name: 'databaseName', type: { @@ -65,7 +63,6 @@ def self.mapper() } }, edition: { - client_side_validation: true, required: false, serialized_name: 'edition', type: { @@ -73,7 +70,6 @@ def self.mapper() } }, service_objective_name: { - client_side_validation: true, required: false, serialized_name: 'serviceObjectiveName', type: { @@ -81,7 +77,6 @@ def self.mapper() } }, max_size_bytes: { - client_side_validation: true, required: false, serialized_name: 'maxSizeBytes', type: { @@ -89,7 +84,6 @@ def self.mapper() } }, storage_key_type: { - client_side_validation: true, required: true, serialized_name: 'storageKeyType', type: { @@ -97,7 +91,6 @@ def self.mapper() } }, storage_key: { - client_side_validation: true, required: true, serialized_name: 'storageKey', type: { @@ -105,7 +98,6 @@ def self.mapper() } }, storage_uri: { - client_side_validation: true, required: true, serialized_name: 'storageUri', type: { @@ -113,7 +105,6 @@ def self.mapper() } }, administrator_login: { - client_side_validation: true, required: true, serialized_name: 'administratorLogin', type: { @@ -121,7 +112,6 @@ def self.mapper() } }, administrator_login_password: { - client_side_validation: true, required: true, serialized_name: 'administratorLoginPassword', type: { @@ -129,7 +119,6 @@ def self.mapper() } }, authentication_type: { - client_side_validation: true, required: false, serialized_name: 'authenticationType', type: { diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/import_export_operation_result.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/import_export_operation_result.rb index 70843299bd..aff8b57bfb 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/import_export_operation_result.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/import_export_operation_result.rb @@ -46,7 +46,6 @@ class ImportExportOperationResult < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ImportExportOperationResult', type: { @@ -54,7 +53,6 @@ def self.mapper() class_name: 'ImportExportOperationResult', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -63,7 +61,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -72,7 +69,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -81,7 +77,6 @@ def self.mapper() } }, request_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.requestId', @@ -90,7 +85,6 @@ def self.mapper() } }, request_type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.requestType', @@ -99,7 +93,6 @@ def self.mapper() } }, queued_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.queuedTime', @@ -108,7 +101,6 @@ def self.mapper() } }, last_modified_time: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.lastModifiedTime', @@ -117,7 +109,6 @@ def self.mapper() } }, blob_uri: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.blobUri', @@ -126,7 +117,6 @@ def self.mapper() } }, server_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.serverName', @@ -135,7 +125,6 @@ def self.mapper() } }, database_name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.databaseName', @@ -144,7 +133,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.status', @@ -153,7 +141,6 @@ def self.mapper() } }, error_message: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.errorMessage', diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job.rb new file mode 100644 index 0000000000..55f4ed3171 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job.rb @@ -0,0 +1,92 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A job. + # + class Job < ProxyResource + + include MsRestAzure + + # @return [String] User-defined description of the job. Default value: '' + # . + attr_accessor :description + + # @return [Integer] The job version number. + attr_accessor :version + + # @return [JobSchedule] Schedule properties of the job. + attr_accessor :schedule + + + # + # Mapper for Job class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Job', + type: { + name: 'Composite', + class_name: 'Job', + 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' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + default_value: '', + type: { + name: 'String' + } + }, + version: { + required: false, + read_only: true, + serialized_name: 'properties.version', + type: { + name: 'Number' + } + }, + schedule: { + required: false, + serialized_name: 'properties.schedule', + type: { + name: 'Composite', + class_name: 'JobSchedule' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent.rb new file mode 100644 index 0000000000..2cdf6b40c0 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent.rb @@ -0,0 +1,112 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # An Azure SQL job agent. + # + class JobAgent < TrackedResource + + include MsRestAzure + + # @return [Sku] The name and tier of the SKU. + attr_accessor :sku + + # @return [String] Resource ID of the database to store job metadata in. + attr_accessor :database_id + + # @return [JobAgentState] The state of the job agent. Possible values + # include: 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' + attr_accessor :state + + + # + # Mapper for JobAgent class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobAgent', + type: { + name: 'Composite', + class_name: 'JobAgent', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + sku: { + required: false, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + }, + database_id: { + required: true, + serialized_name: 'properties.databaseId', + type: { + name: 'String' + } + }, + state: { + required: false, + read_only: true, + serialized_name: 'properties.state', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_list_result.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_list_result.rb new file mode 100644 index 0000000000..8338e8adac --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_list_result.rb @@ -0,0 +1,96 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A list of Azure SQL job agents. + # + class JobAgentListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Array of results. + attr_accessor :value + + # @return [String] Link to retrieve next page of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [JobAgentListResult] 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 JobAgentListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobAgentListResult', + type: { + name: 'Composite', + class_name: 'JobAgentListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobAgentElementType', + type: { + name: 'Composite', + class_name: 'JobAgent' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_state.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_state.rb new file mode 100644 index 0000000000..3e91d2922b --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_state.rb @@ -0,0 +1,19 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # Defines values for JobAgentState + # + module JobAgentState + Creating = "Creating" + Ready = "Ready" + Updating = "Updating" + Deleting = "Deleting" + Disabled = "Disabled" + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_update.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_update.rb new file mode 100644 index 0000000000..089a7df585 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_update.rb @@ -0,0 +1,51 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # An update to an Azure SQL job agent. + # + class JobAgentUpdate + + include MsRestAzure + + # @return [Hash{String => String}] Resource tags. + attr_accessor :tags + + + # + # Mapper for JobAgentUpdate class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobAgentUpdate', + type: { + name: 'Composite', + class_name: 'JobAgentUpdate', + model_properties: { + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_credential.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_credential.rb new file mode 100644 index 0000000000..5423bddadb --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_credential.rb @@ -0,0 +1,79 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A stored credential that can be used by a job to connect to target + # databases. + # + class JobCredential < ProxyResource + + include MsRestAzure + + # @return [String] The credential user name. + attr_accessor :username + + # @return [String] The credential password. + attr_accessor :password + + + # + # Mapper for JobCredential class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobCredential', + type: { + name: 'Composite', + class_name: 'JobCredential', + 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' + } + }, + username: { + required: true, + serialized_name: 'properties.username', + type: { + name: 'String' + } + }, + password: { + required: true, + serialized_name: 'properties.password', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_credential_list_result.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_credential_list_result.rb new file mode 100644 index 0000000000..ac4a337506 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_credential_list_result.rb @@ -0,0 +1,96 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A list of job credentials. + # + class JobCredentialListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Array of results. + attr_accessor :value + + # @return [String] Link to retrieve next page of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [JobCredentialListResult] 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 JobCredentialListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobCredentialListResult', + type: { + name: 'Composite', + class_name: 'JobCredentialListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobCredentialElementType', + type: { + name: 'Composite', + class_name: 'JobCredential' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution.rb new file mode 100644 index 0000000000..a1746bed37 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution.rb @@ -0,0 +1,207 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # An execution of a job + # + class JobExecution < ProxyResource + + include MsRestAzure + + # @return [Integer] The job version number. + attr_accessor :job_version + + # @return [String] The job step name. + attr_accessor :step_name + + # @return [Integer] The job step id. + attr_accessor :step_id + + # @return The unique identifier of the job execution. + attr_accessor :job_execution_id + + # @return [JobExecutionLifecycle] The detailed state of the job + # execution. Possible values include: 'Created', 'InProgress', + # 'WaitingForChildJobExecutions', 'WaitingForRetry', 'Succeeded', + # 'SucceededWithSkipped', 'Failed', 'TimedOut', 'Canceled', 'Skipped' + attr_accessor :lifecycle + + # @return [ProvisioningState] The ARM provisioning state of the job + # execution. Possible values include: 'Created', 'InProgress', + # 'Succeeded', 'Failed', 'Canceled' + attr_accessor :provisioning_state + + # @return [DateTime] The time that the job execution was created. + attr_accessor :create_time + + # @return [DateTime] The time that the job execution started. + attr_accessor :start_time + + # @return [DateTime] The time that the job execution completed. + attr_accessor :end_time + + # @return [Integer] Number of times the job execution has been attempted. + attr_accessor :current_attempts + + # @return [DateTime] Start time of the current attempt. + attr_accessor :current_attempt_start_time + + # @return [String] The last status or error message. + attr_accessor :last_message + + # @return [JobExecutionTarget] The target that this execution is executed + # on. + attr_accessor :target + + + # + # Mapper for JobExecution class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobExecution', + type: { + name: 'Composite', + class_name: 'JobExecution', + 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' + } + }, + job_version: { + required: false, + read_only: true, + serialized_name: 'properties.jobVersion', + type: { + name: 'Number' + } + }, + step_name: { + required: false, + read_only: true, + serialized_name: 'properties.stepName', + type: { + name: 'String' + } + }, + step_id: { + required: false, + read_only: true, + serialized_name: 'properties.stepId', + type: { + name: 'Number' + } + }, + job_execution_id: { + required: false, + read_only: true, + serialized_name: 'properties.jobExecutionId', + type: { + name: 'String' + } + }, + lifecycle: { + required: false, + read_only: true, + serialized_name: 'properties.lifecycle', + type: { + name: 'String' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + create_time: { + required: false, + read_only: true, + serialized_name: 'properties.createTime', + type: { + name: 'DateTime' + } + }, + start_time: { + required: false, + read_only: true, + serialized_name: 'properties.startTime', + type: { + name: 'DateTime' + } + }, + end_time: { + required: false, + read_only: true, + serialized_name: 'properties.endTime', + type: { + name: 'DateTime' + } + }, + current_attempts: { + required: false, + serialized_name: 'properties.currentAttempts', + type: { + name: 'Number' + } + }, + current_attempt_start_time: { + required: false, + read_only: true, + serialized_name: 'properties.currentAttemptStartTime', + type: { + name: 'DateTime' + } + }, + last_message: { + required: false, + read_only: true, + serialized_name: 'properties.lastMessage', + type: { + name: 'String' + } + }, + target: { + required: false, + read_only: true, + serialized_name: 'properties.target', + type: { + name: 'Composite', + class_name: 'JobExecutionTarget' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_lifecycle.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_lifecycle.rb new file mode 100644 index 0000000000..4c188fbd23 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_lifecycle.rb @@ -0,0 +1,24 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # Defines values for JobExecutionLifecycle + # + module JobExecutionLifecycle + Created = "Created" + InProgress = "InProgress" + WaitingForChildJobExecutions = "WaitingForChildJobExecutions" + WaitingForRetry = "WaitingForRetry" + Succeeded = "Succeeded" + SucceededWithSkipped = "SucceededWithSkipped" + Failed = "Failed" + TimedOut = "TimedOut" + Canceled = "Canceled" + Skipped = "Skipped" + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_list_result.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_list_result.rb new file mode 100644 index 0000000000..51a1bc3a3e --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_list_result.rb @@ -0,0 +1,96 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A list of job executions. + # + class JobExecutionListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Array of results. + attr_accessor :value + + # @return [String] Link to retrieve next page of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [JobExecutionListResult] 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 JobExecutionListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobExecutionListResult', + type: { + name: 'Composite', + class_name: 'JobExecutionListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobExecutionElementType', + type: { + name: 'Composite', + class_name: 'JobExecution' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_target.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_target.rb new file mode 100644 index 0000000000..a38381e055 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_target.rb @@ -0,0 +1,69 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # The target that a job execution is executed on. + # + class JobExecutionTarget + + include MsRestAzure + + # @return [JobTargetType] The type of the target. Possible values + # include: 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', + # 'SqlServer' + attr_accessor :type + + # @return [String] The server name. + attr_accessor :server_name + + # @return [String] The database name. + attr_accessor :database_name + + + # + # Mapper for JobExecutionTarget class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobExecutionTarget', + type: { + name: 'Composite', + class_name: 'JobExecutionTarget', + model_properties: { + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + server_name: { + required: false, + read_only: true, + serialized_name: 'serverName', + type: { + name: 'String' + } + }, + database_name: { + required: false, + read_only: true, + serialized_name: 'databaseName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_list_result.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_list_result.rb new file mode 100644 index 0000000000..991573fa20 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_list_result.rb @@ -0,0 +1,96 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A list of jobs. + # + class JobListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Array of results. + attr_accessor :value + + # @return [String] Link to retrieve next page of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [JobListResult] 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 JobListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobListResult', + type: { + name: 'Composite', + class_name: 'JobListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobElementType', + type: { + name: 'Composite', + class_name: 'Job' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_schedule.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_schedule.rb new file mode 100644 index 0000000000..dfbcf19919 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_schedule.rb @@ -0,0 +1,92 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # Scheduling properties of a job. + # + class JobSchedule + + include MsRestAzure + + # @return [DateTime] Schedule start time. Default value: + # Date.parse('0001-01-01T00:00:00Z') . + attr_accessor :start_time + + # @return [DateTime] Schedule end time. Default value: + # Date.parse('9999-12-31T11:59:59Z') . + attr_accessor :end_time + + # @return [JobScheduleType] Schedule interval type. Possible values + # include: 'Once', 'Recurring'. Default value: 'Once' . + attr_accessor :type + + # @return [Boolean] Whether or not the schedule is enabled. + attr_accessor :enabled + + # @return [String] Value of the schedule's recurring interval, if the + # scheduletype is recurring. ISO8601 duration format. + attr_accessor :interval + + + # + # Mapper for JobSchedule class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobSchedule', + type: { + name: 'Composite', + class_name: 'JobSchedule', + model_properties: { + start_time: { + required: false, + serialized_name: 'startTime', + default_value: Date.parse('0001-01-01T00:00:00Z'), + type: { + name: 'DateTime' + } + }, + end_time: { + required: false, + serialized_name: 'endTime', + default_value: Date.parse('9999-12-31T11:59:59Z'), + type: { + name: 'DateTime' + } + }, + type: { + required: false, + serialized_name: 'type', + default_value: 'Once', + type: { + name: 'Enum', + module: 'JobScheduleType' + } + }, + enabled: { + required: false, + serialized_name: 'enabled', + type: { + name: 'Boolean' + } + }, + interval: { + required: false, + serialized_name: 'interval', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_schedule_type.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_schedule_type.rb new file mode 100644 index 0000000000..fde6b64ba8 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_schedule_type.rb @@ -0,0 +1,16 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # Defines values for JobScheduleType + # + module JobScheduleType + Once = "Once" + Recurring = "Recurring" + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step.rb new file mode 100644 index 0000000000..2e5632d04b --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step.rb @@ -0,0 +1,125 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A job step. + # + class JobStep < ProxyResource + + include MsRestAzure + + # @return [Integer] The job step's index within the job. If not specified + # when creating the job step, it will be created as the last step. If not + # specified when updating the job step, the step id is not modified. + attr_accessor :step_id + + # @return [String] The resource ID of the target group that the job step + # will be executed on. + attr_accessor :target_group + + # @return [String] The resource ID of the job credential that will be + # used to connect to the targets. + attr_accessor :credential + + # @return [JobStepAction] The action payload of the job step. + attr_accessor :action + + # @return [JobStepOutput] Output destination properties of the job step. + attr_accessor :output + + # @return [JobStepExecutionOptions] Execution options for the job step. + attr_accessor :execution_options + + + # + # Mapper for JobStep class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobStep', + type: { + name: 'Composite', + class_name: 'JobStep', + 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' + } + }, + step_id: { + required: false, + serialized_name: 'properties.stepId', + type: { + name: 'Number' + } + }, + target_group: { + required: true, + serialized_name: 'properties.targetGroup', + type: { + name: 'String' + } + }, + credential: { + required: true, + serialized_name: 'properties.credential', + type: { + name: 'String' + } + }, + action: { + required: true, + serialized_name: 'properties.action', + type: { + name: 'Composite', + class_name: 'JobStepAction' + } + }, + output: { + required: false, + serialized_name: 'properties.output', + type: { + name: 'Composite', + class_name: 'JobStepOutput' + } + }, + execution_options: { + required: false, + serialized_name: 'properties.executionOptions', + type: { + name: 'Composite', + class_name: 'JobStepExecutionOptions' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action.rb new file mode 100644 index 0000000000..7f74b52604 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action.rb @@ -0,0 +1,69 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # The action to be executed by a job step. + # + class JobStepAction + + include MsRestAzure + + # @return [JobStepActionType] Type of action being executed by the job + # step. Possible values include: 'TSql'. Default value: 'TSql' . + attr_accessor :type + + # @return [JobStepActionSource] The source of the action to execute. + # Possible values include: 'Inline'. Default value: 'Inline' . + attr_accessor :source + + # @return [String] The action value, for example the text of the T-SQL + # script to execute. + attr_accessor :value + + + # + # Mapper for JobStepAction class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobStepAction', + type: { + name: 'Composite', + class_name: 'JobStepAction', + model_properties: { + type: { + required: false, + serialized_name: 'type', + default_value: 'TSql', + type: { + name: 'String' + } + }, + source: { + required: false, + serialized_name: 'source', + default_value: 'Inline', + type: { + name: 'String' + } + }, + value: { + required: true, + serialized_name: 'value', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action_source.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action_source.rb new file mode 100644 index 0000000000..f6716f8e06 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action_source.rb @@ -0,0 +1,15 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # Defines values for JobStepActionSource + # + module JobStepActionSource + Inline = "Inline" + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action_type.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action_type.rb new file mode 100644 index 0000000000..9c15172e15 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action_type.rb @@ -0,0 +1,15 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # Defines values for JobStepActionType + # + module JobStepActionType + TSql = "TSql" + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_execution_options.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_execution_options.rb new file mode 100644 index 0000000000..557d0a71ce --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_execution_options.rb @@ -0,0 +1,94 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # The execution options of a job step. + # + class JobStepExecutionOptions + + include MsRestAzure + + # @return [Integer] Execution timeout for the job step. Default value: + # 43200 . + attr_accessor :timeout_seconds + + # @return [Integer] Maximum number of times the job step will be + # reattempted if the first attempt fails. Default value: 10 . + attr_accessor :retry_attempts + + # @return [Integer] Initial delay between retries for job step execution. + # Default value: 1 . + attr_accessor :initial_retry_interval_seconds + + # @return [Integer] The maximum amount of time to wait between retries + # for job step execution. Default value: 120 . + attr_accessor :maximum_retry_interval_seconds + + # @return [Float] The backoff multiplier for the time between retries. + # Default value: 2 . + attr_accessor :retry_interval_backoff_multiplier + + + # + # Mapper for JobStepExecutionOptions class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobStepExecutionOptions', + type: { + name: 'Composite', + class_name: 'JobStepExecutionOptions', + model_properties: { + timeout_seconds: { + required: false, + serialized_name: 'timeoutSeconds', + default_value: 43200, + type: { + name: 'Number' + } + }, + retry_attempts: { + required: false, + serialized_name: 'retryAttempts', + default_value: 10, + type: { + name: 'Number' + } + }, + initial_retry_interval_seconds: { + required: false, + serialized_name: 'initialRetryIntervalSeconds', + default_value: 1, + type: { + name: 'Number' + } + }, + maximum_retry_interval_seconds: { + required: false, + serialized_name: 'maximumRetryIntervalSeconds', + default_value: 120, + type: { + name: 'Number' + } + }, + retry_interval_backoff_multiplier: { + required: false, + serialized_name: 'retryIntervalBackoffMultiplier', + default_value: 2, + type: { + name: 'Double' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_list_result.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_list_result.rb new file mode 100644 index 0000000000..2f080da799 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_list_result.rb @@ -0,0 +1,96 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A list of job steps. + # + class JobStepListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Array of results. + attr_accessor :value + + # @return [String] Link to retrieve next page of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [JobStepListResult] 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 JobStepListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobStepListResult', + type: { + name: 'Composite', + class_name: 'JobStepListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobStepElementType', + type: { + name: 'Composite', + class_name: 'JobStep' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_output.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_output.rb new file mode 100644 index 0000000000..56446da074 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_output.rb @@ -0,0 +1,118 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # The output configuration of a job step. + # + class JobStepOutput + + include MsRestAzure + + # @return [JobStepOutputType] The output destination type. Possible + # values include: 'SqlDatabase'. Default value: 'SqlDatabase' . + attr_accessor :type + + # @return The output destination subscription id. + attr_accessor :subscription_id + + # @return [String] The output destination resource group. + attr_accessor :resource_group_name + + # @return [String] The output destination server name. + attr_accessor :server_name + + # @return [String] The output destination database. + attr_accessor :database_name + + # @return [String] The output destination schema. Default value: 'dbo' . + attr_accessor :schema_name + + # @return [String] The output destination table. + attr_accessor :table_name + + # @return [String] The resource ID of the credential to use to connect to + # the output destination. + attr_accessor :credential + + + # + # Mapper for JobStepOutput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobStepOutput', + type: { + name: 'Composite', + class_name: 'JobStepOutput', + model_properties: { + type: { + required: false, + serialized_name: 'type', + default_value: 'SqlDatabase', + type: { + name: 'String' + } + }, + subscription_id: { + required: false, + serialized_name: 'subscriptionId', + type: { + name: 'String' + } + }, + resource_group_name: { + required: false, + serialized_name: 'resourceGroupName', + type: { + name: 'String' + } + }, + server_name: { + required: true, + serialized_name: 'serverName', + type: { + name: 'String' + } + }, + database_name: { + required: true, + serialized_name: 'databaseName', + type: { + name: 'String' + } + }, + schema_name: { + required: false, + serialized_name: 'schemaName', + default_value: 'dbo', + type: { + name: 'String' + } + }, + table_name: { + required: true, + serialized_name: 'tableName', + type: { + name: 'String' + } + }, + credential: { + required: true, + serialized_name: 'credential', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_output_type.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_output_type.rb new file mode 100644 index 0000000000..9f1f013dcf --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_output_type.rb @@ -0,0 +1,15 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # Defines values for JobStepOutputType + # + module JobStepOutputType + SqlDatabase = "SqlDatabase" + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target.rb new file mode 100644 index 0000000000..c98dfdfe90 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target.rb @@ -0,0 +1,113 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A job target, for example a specific database or a container of databases + # that is evaluated during job execution. + # + class JobTarget + + include MsRestAzure + + # @return [JobTargetGroupMembershipType] Whether the target is included + # or excluded from the group. Possible values include: 'Include', + # 'Exclude'. Default value: 'Include' . + attr_accessor :membership_type + + # @return [JobTargetType] The target type. Possible values include: + # 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', + # 'SqlServer' + attr_accessor :type + + # @return [String] The target server name. + attr_accessor :server_name + + # @return [String] The target database name. + attr_accessor :database_name + + # @return [String] The target elastic pool name. + attr_accessor :elastic_pool_name + + # @return [String] The target shard map. + attr_accessor :shard_map_name + + # @return [String] The resource ID of the credential that is used during + # job execution to connect to the target and determine the list of + # databases inside the target. + attr_accessor :refresh_credential + + + # + # Mapper for JobTarget class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobTarget', + type: { + name: 'Composite', + class_name: 'JobTarget', + model_properties: { + membership_type: { + required: false, + serialized_name: 'membershipType', + default_value: 'Include', + type: { + name: 'Enum', + module: 'JobTargetGroupMembershipType' + } + }, + type: { + required: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + server_name: { + required: false, + serialized_name: 'serverName', + type: { + name: 'String' + } + }, + database_name: { + required: false, + serialized_name: 'databaseName', + type: { + name: 'String' + } + }, + elastic_pool_name: { + required: false, + serialized_name: 'elasticPoolName', + type: { + name: 'String' + } + }, + shard_map_name: { + required: false, + serialized_name: 'shardMapName', + type: { + name: 'String' + } + }, + refresh_credential: { + required: false, + serialized_name: 'refreshCredential', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group.rb new file mode 100644 index 0000000000..0331bd5b55 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group.rb @@ -0,0 +1,76 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A group of job targets. + # + class JobTargetGroup < ProxyResource + + include MsRestAzure + + # @return [Array] Members of the target group. + attr_accessor :members + + + # + # Mapper for JobTargetGroup class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobTargetGroup', + type: { + name: 'Composite', + class_name: 'JobTargetGroup', + 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' + } + }, + members: { + required: true, + serialized_name: 'properties.members', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobTargetElementType', + type: { + name: 'Composite', + class_name: 'JobTarget' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group_list_result.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group_list_result.rb new file mode 100644 index 0000000000..20a4eabeeb --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group_list_result.rb @@ -0,0 +1,96 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A list of target groups. + # + class JobTargetGroupListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Array of results. + attr_accessor :value + + # @return [String] Link to retrieve next page of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [JobTargetGroupListResult] 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 JobTargetGroupListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobTargetGroupListResult', + type: { + name: 'Composite', + class_name: 'JobTargetGroupListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobTargetGroupElementType', + type: { + name: 'Composite', + class_name: 'JobTargetGroup' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group_membership_type.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group_membership_type.rb new file mode 100644 index 0000000000..5a67f663e2 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group_membership_type.rb @@ -0,0 +1,16 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # Defines values for JobTargetGroupMembershipType + # + module JobTargetGroupMembershipType + Include = "Include" + Exclude = "Exclude" + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_type.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_type.rb new file mode 100644 index 0000000000..0c2d3e62ff --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_type.rb @@ -0,0 +1,19 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # Defines values for JobTargetType + # + module JobTargetType + TargetGroup = "TargetGroup" + SqlDatabase = "SqlDatabase" + SqlElasticPool = "SqlElasticPool" + SqlShardMap = "SqlShardMap" + SqlServer = "SqlServer" + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_version.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_version.rb new file mode 100644 index 0000000000..c5a54f5e5c --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_version.rb @@ -0,0 +1,58 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A job version. + # + class JobVersion < ProxyResource + + include MsRestAzure + + + # + # Mapper for JobVersion class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobVersion', + type: { + name: 'Composite', + class_name: 'JobVersion', + 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' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_version_list_result.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_version_list_result.rb new file mode 100644 index 0000000000..c5b1a3602e --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_version_list_result.rb @@ -0,0 +1,96 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A list of job versions. + # + class JobVersionListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Array of results. + attr_accessor :value + + # @return [String] Link to retrieve next page of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [JobVersionListResult] 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 JobVersionListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobVersionListResult', + type: { + name: 'Composite', + class_name: 'JobVersionListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobVersionElementType', + type: { + name: 'Composite', + class_name: 'JobVersion' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_backup.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_backup.rb new file mode 100644 index 0000000000..764423d207 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_backup.rb @@ -0,0 +1,124 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A long term retention backup. + # + class LongTermRetentionBackup < ProxyResource + + include MsRestAzure + + # @return [String] The server name that the backup database belong to. + attr_accessor :server_name + + # @return [DateTime] The create time of the server. + attr_accessor :server_create_time + + # @return [String] The name of the database the backup belong to + attr_accessor :database_name + + # @return [DateTime] The delete time of the database + attr_accessor :database_deletion_time + + # @return [DateTime] The time the backup was taken + attr_accessor :backup_time + + # @return [DateTime] The time the long term retention backup will expire. + attr_accessor :backup_expiration_time + + + # + # Mapper for LongTermRetentionBackup class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LongTermRetentionBackup', + type: { + name: 'Composite', + class_name: 'LongTermRetentionBackup', + 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' + } + }, + server_name: { + required: false, + read_only: true, + serialized_name: 'properties.serverName', + type: { + name: 'String' + } + }, + server_create_time: { + required: false, + read_only: true, + serialized_name: 'properties.serverCreateTime', + type: { + name: 'DateTime' + } + }, + database_name: { + required: false, + read_only: true, + serialized_name: 'properties.databaseName', + type: { + name: 'String' + } + }, + database_deletion_time: { + required: false, + read_only: true, + serialized_name: 'properties.databaseDeletionTime', + type: { + name: 'DateTime' + } + }, + backup_time: { + required: false, + read_only: true, + serialized_name: 'properties.backupTime', + type: { + name: 'DateTime' + } + }, + backup_expiration_time: { + required: false, + read_only: true, + serialized_name: 'properties.backupExpirationTime', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_backup_list_result.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_backup_list_result.rb new file mode 100644 index 0000000000..4b796157ba --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_backup_list_result.rb @@ -0,0 +1,96 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A list of long term retention bacukps. + # + class LongTermRetentionBackupListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Array of results. + attr_accessor :value + + # @return [String] Link to retrieve next page of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [LongTermRetentionBackupListResult] 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 LongTermRetentionBackupListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LongTermRetentionBackupListResult', + type: { + name: 'Composite', + class_name: 'LongTermRetentionBackupListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'LongTermRetentionBackupElementType', + type: { + name: 'Composite', + class_name: 'LongTermRetentionBackup' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_database_state.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_database_state.rb new file mode 100644 index 0000000000..152c80a09d --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_database_state.rb @@ -0,0 +1,17 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # Defines values for LongTermRetentionDatabaseState + # + module LongTermRetentionDatabaseState + All = "All" + Live = "Live" + Deleted = "Deleted" + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database.rb new file mode 100644 index 0000000000..7a99e0b345 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database.rb @@ -0,0 +1,223 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A managed database resource. + # + class ManagedDatabase < TrackedResource + + include MsRestAzure + + # @return [String] Collation of the managed database. + attr_accessor :collation + + # @return [ManagedDatabaseStatus] Status for the database. Possible + # values include: 'Online', 'Offline', 'Shutdown', 'Creating', + # 'Inaccessible' + attr_accessor :status + + # @return [DateTime] Creation date of the database. + attr_accessor :creation_date + + # @return [DateTime] Earliest restore point in time for point in time + # restore. + attr_accessor :earliest_restore_point + + # @return [DateTime] Conditional. If createMode is PointInTimeRestore, + # this value is required. Specifies the point in time (ISO8601 format) of + # the source database that will be restored to create the new database. + attr_accessor :restore_point_in_time + + # @return [String] Geo paired region. + attr_accessor :default_secondary_location + + # @return [CatalogCollationType] Collation of the metadata catalog. + # Possible values include: 'DATABASE_DEFAULT', + # 'SQL_Latin1_General_CP1_CI_AS' + attr_accessor :catalog_collation + + # @return [ManagedDatabaseCreateMode] Managed database create mode. + # PointInTimeRestore: Create a database by restoring a point in time + # backup of an existing database. SourceDatabaseName, + # SourceManagedInstanceName and PointInTime must be specified. + # RestoreExternalBackup: Create a database by restoring from external + # backup files. Collation, StorageContainerUri and + # StorageContainerSasToken must be specified. Possible values include: + # 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + attr_accessor :create_mode + + # @return [String] Conditional. If createMode is RestoreExternalBackup, + # this value is required. Specifies the uri of the storage container + # where backups for this restore are stored. + attr_accessor :storage_container_uri + + # @return [String] The resource identifier of the source database + # associated with create operation of this database. + attr_accessor :source_database_id + + # @return [String] Conditional. If createMode is RestoreExternalBackup, + # this value is required. Specifies the storage container sas token. + attr_accessor :storage_container_sas_token + + # @return [String] Instance Failover Group resource identifier that this + # managed database belongs to. + attr_accessor :failover_group_id + + + # + # Mapper for ManagedDatabase class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ManagedDatabase', + type: { + name: 'Composite', + class_name: 'ManagedDatabase', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + collation: { + required: false, + serialized_name: 'properties.collation', + type: { + name: 'String' + } + }, + status: { + required: false, + read_only: true, + serialized_name: 'properties.status', + type: { + name: 'String' + } + }, + creation_date: { + required: false, + read_only: true, + serialized_name: 'properties.creationDate', + type: { + name: 'DateTime' + } + }, + earliest_restore_point: { + required: false, + read_only: true, + serialized_name: 'properties.earliestRestorePoint', + type: { + name: 'DateTime' + } + }, + restore_point_in_time: { + required: false, + serialized_name: 'properties.restorePointInTime', + type: { + name: 'DateTime' + } + }, + default_secondary_location: { + required: false, + read_only: true, + serialized_name: 'properties.defaultSecondaryLocation', + type: { + name: 'String' + } + }, + catalog_collation: { + required: false, + serialized_name: 'properties.catalogCollation', + type: { + name: 'String' + } + }, + create_mode: { + required: false, + serialized_name: 'properties.createMode', + type: { + name: 'String' + } + }, + storage_container_uri: { + required: false, + serialized_name: 'properties.storageContainerUri', + type: { + name: 'String' + } + }, + source_database_id: { + required: false, + serialized_name: 'properties.sourceDatabaseId', + type: { + name: 'String' + } + }, + storage_container_sas_token: { + required: false, + serialized_name: 'properties.storageContainerSasToken', + type: { + name: 'String' + } + }, + failover_group_id: { + required: false, + read_only: true, + serialized_name: 'properties.failoverGroupId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_create_mode.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_create_mode.rb new file mode 100644 index 0000000000..e2d1a0d378 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_create_mode.rb @@ -0,0 +1,17 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # Defines values for ManagedDatabaseCreateMode + # + module ManagedDatabaseCreateMode + Default = "Default" + RestoreExternalBackup = "RestoreExternalBackup" + PointInTimeRestore = "PointInTimeRestore" + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_list_result.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_list_result.rb new file mode 100644 index 0000000000..6d2cc78dab --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_list_result.rb @@ -0,0 +1,96 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A list of managed databases. + # + class ManagedDatabaseListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Array of results. + attr_accessor :value + + # @return [String] Link to retrieve next page of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [ManagedDatabaseListResult] 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 ManagedDatabaseListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ManagedDatabaseListResult', + type: { + name: 'Composite', + class_name: 'ManagedDatabaseListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ManagedDatabaseElementType', + type: { + name: 'Composite', + class_name: 'ManagedDatabase' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_status.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_status.rb new file mode 100644 index 0000000000..08b84fd7ff --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_status.rb @@ -0,0 +1,19 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # Defines values for ManagedDatabaseStatus + # + module ManagedDatabaseStatus + Online = "Online" + Offline = "Offline" + Shutdown = "Shutdown" + Creating = "Creating" + Inaccessible = "Inaccessible" + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_update.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_update.rb new file mode 100644 index 0000000000..e6aff87833 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_update.rb @@ -0,0 +1,195 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # An managed database update. + # + class ManagedDatabaseUpdate + + include MsRestAzure + + # @return [String] Collation of the managed database. + attr_accessor :collation + + # @return [ManagedDatabaseStatus] Status for the database. Possible + # values include: 'Online', 'Offline', 'Shutdown', 'Creating', + # 'Inaccessible' + attr_accessor :status + + # @return [DateTime] Creation date of the database. + attr_accessor :creation_date + + # @return [DateTime] Earliest restore point in time for point in time + # restore. + attr_accessor :earliest_restore_point + + # @return [DateTime] Conditional. If createMode is PointInTimeRestore, + # this value is required. Specifies the point in time (ISO8601 format) of + # the source database that will be restored to create the new database. + attr_accessor :restore_point_in_time + + # @return [String] Geo paired region. + attr_accessor :default_secondary_location + + # @return [CatalogCollationType] Collation of the metadata catalog. + # Possible values include: 'DATABASE_DEFAULT', + # 'SQL_Latin1_General_CP1_CI_AS' + attr_accessor :catalog_collation + + # @return [ManagedDatabaseCreateMode] Managed database create mode. + # PointInTimeRestore: Create a database by restoring a point in time + # backup of an existing database. SourceDatabaseName, + # SourceManagedInstanceName and PointInTime must be specified. + # RestoreExternalBackup: Create a database by restoring from external + # backup files. Collation, StorageContainerUri and + # StorageContainerSasToken must be specified. Possible values include: + # 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + attr_accessor :create_mode + + # @return [String] Conditional. If createMode is RestoreExternalBackup, + # this value is required. Specifies the uri of the storage container + # where backups for this restore are stored. + attr_accessor :storage_container_uri + + # @return [String] The resource identifier of the source database + # associated with create operation of this database. + attr_accessor :source_database_id + + # @return [String] Conditional. If createMode is RestoreExternalBackup, + # this value is required. Specifies the storage container sas token. + attr_accessor :storage_container_sas_token + + # @return [String] Instance Failover Group resource identifier that this + # managed database belongs to. + attr_accessor :failover_group_id + + # @return [Hash{String => String}] Resource tags. + attr_accessor :tags + + + # + # Mapper for ManagedDatabaseUpdate class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ManagedDatabaseUpdate', + type: { + name: 'Composite', + class_name: 'ManagedDatabaseUpdate', + model_properties: { + collation: { + required: false, + serialized_name: 'properties.collation', + type: { + name: 'String' + } + }, + status: { + required: false, + read_only: true, + serialized_name: 'properties.status', + type: { + name: 'String' + } + }, + creation_date: { + required: false, + read_only: true, + serialized_name: 'properties.creationDate', + type: { + name: 'DateTime' + } + }, + earliest_restore_point: { + required: false, + read_only: true, + serialized_name: 'properties.earliestRestorePoint', + type: { + name: 'DateTime' + } + }, + restore_point_in_time: { + required: false, + serialized_name: 'properties.restorePointInTime', + type: { + name: 'DateTime' + } + }, + default_secondary_location: { + required: false, + read_only: true, + serialized_name: 'properties.defaultSecondaryLocation', + type: { + name: 'String' + } + }, + catalog_collation: { + required: false, + serialized_name: 'properties.catalogCollation', + type: { + name: 'String' + } + }, + create_mode: { + required: false, + serialized_name: 'properties.createMode', + type: { + name: 'String' + } + }, + storage_container_uri: { + required: false, + serialized_name: 'properties.storageContainerUri', + type: { + name: 'String' + } + }, + source_database_id: { + required: false, + serialized_name: 'properties.sourceDatabaseId', + type: { + name: 'String' + } + }, + storage_container_sas_token: { + required: false, + serialized_name: 'properties.storageContainerSasToken', + type: { + name: 'String' + } + }, + failover_group_id: { + required: false, + read_only: true, + serialized_name: 'properties.failoverGroupId', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/provisioning_state.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/provisioning_state.rb new file mode 100644 index 0000000000..1eaa46a252 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/provisioning_state.rb @@ -0,0 +1,19 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # Defines values for ProvisioningState + # + module ProvisioningState + Created = "Created" + InProgress = "InProgress" + Succeeded = "Succeeded" + Failed = "Failed" + Canceled = "Canceled" + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/proxy_resource.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/proxy_resource.rb index c139f75703..466ee9012d 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/proxy_resource.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/proxy_resource.rb @@ -19,7 +19,6 @@ class ProxyResource < Resource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ProxyResource', type: { @@ -27,7 +26,6 @@ def self.mapper() class_name: 'ProxyResource', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -36,7 +34,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -45,7 +42,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/resource.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/resource.rb index d215e4f66d..a84bf29d51 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/resource.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/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_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/resource_move_definition.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/resource_move_definition.rb index 9c77b68fc1..c5c300b089 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/resource_move_definition.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/resource_move_definition.rb @@ -22,7 +22,6 @@ class ResourceMoveDefinition # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ResourceMoveDefinition', type: { @@ -30,7 +29,6 @@ def self.mapper() class_name: 'ResourceMoveDefinition', model_properties: { id: { - client_side_validation: true, required: true, serialized_name: 'id', type: { diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/restore_point.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/restore_point.rb new file mode 100644 index 0000000000..91d20926c2 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/restore_point.rb @@ -0,0 +1,116 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # Database restore points. + # + class RestorePoint < ProxyResource + + include MsRestAzure + + # @return [String] Resource location. + attr_accessor :location + + # @return [RestorePointType] The type of restore point. Possible values + # include: 'CONTINUOUS', 'DISCRETE' + attr_accessor :restore_point_type + + # @return [DateTime] The earliest time to which this database can be + # restored + attr_accessor :earliest_restore_date + + # @return [DateTime] The time the backup was taken + attr_accessor :restore_point_creation_date + + # @return [String] The label of restore point for backup request by user + attr_accessor :restore_point_label + + + # + # Mapper for RestorePoint class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RestorePoint', + type: { + name: 'Composite', + class_name: 'RestorePoint', + 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, + read_only: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + restore_point_type: { + required: false, + read_only: true, + serialized_name: 'properties.restorePointType', + type: { + name: 'Enum', + module: 'RestorePointType' + } + }, + earliest_restore_date: { + required: false, + read_only: true, + serialized_name: 'properties.earliestRestoreDate', + type: { + name: 'DateTime' + } + }, + restore_point_creation_date: { + required: false, + read_only: true, + serialized_name: 'properties.restorePointCreationDate', + type: { + name: 'DateTime' + } + }, + restore_point_label: { + required: false, + read_only: true, + serialized_name: 'properties.restorePointLabel', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/restore_point_list_result.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/restore_point_list_result.rb new file mode 100644 index 0000000000..7051bda4cc --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/restore_point_list_result.rb @@ -0,0 +1,64 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A list of long term retention bacukps. + # + class RestorePointListResult + + include MsRestAzure + + # @return [Array] Array of results. + attr_accessor :value + + # @return [String] Link to retrieve next page of results. + attr_accessor :next_link + + + # + # Mapper for RestorePointListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RestorePointListResult', + type: { + name: 'Composite', + class_name: 'RestorePointListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RestorePointElementType', + type: { + name: 'Composite', + class_name: 'RestorePoint' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/security_alert_state.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/security_alert_state.rb new file mode 100644 index 0000000000..c2f32d2b2d --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/security_alert_state.rb @@ -0,0 +1,16 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # Defines values for SecurityAlertState + # + module SecurityAlertState + Enabled = "Enabled" + Disabled = "Disabled" + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_automatic_tuning.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_automatic_tuning.rb index af82fa3e54..0a78f6ffa2 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_automatic_tuning.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_automatic_tuning.rb @@ -31,7 +31,6 @@ class ServerAutomaticTuning < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServerAutomaticTuning', type: { @@ -39,7 +38,6 @@ def self.mapper() class_name: 'ServerAutomaticTuning', 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() } }, desired_state: { - client_side_validation: true, required: false, serialized_name: 'properties.desiredState', type: { @@ -75,7 +70,6 @@ def self.mapper() } }, actual_state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.actualState', @@ -85,13 +79,11 @@ def self.mapper() } }, options: { - client_side_validation: true, required: false, serialized_name: 'properties.options', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'AutomaticTuningServerOptionsElementType', type: { diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_blob_auditing_policy.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_blob_auditing_policy.rb new file mode 100644 index 0000000000..07d091064b --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_blob_auditing_policy.rb @@ -0,0 +1,214 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A server blob auditing policy. + # + class ServerBlobAuditingPolicy < ProxyResource + + include MsRestAzure + + # @return [BlobAuditingPolicyState] Specifies the state of the policy. If + # state is Enabled, storageEndpoint and storageAccountAccessKey are + # required. Possible values include: 'Enabled', 'Disabled' + attr_accessor :state + + # @return [String] Specifies the blob storage endpoint (e.g. + # https://MyAccount.blob.core.windows.net). If state is Enabled, + # storageEndpoint is required. + attr_accessor :storage_endpoint + + # @return [String] Specifies the identifier key of the auditing storage + # account. If state is Enabled, storageAccountAccessKey is required. + attr_accessor :storage_account_access_key + + # @return [Integer] Specifies the number of days to keep in the audit + # logs. + attr_accessor :retention_days + + # @return [Array] Specifies the Actions-Groups and Actions to + # audit. + # + # The recommended set of action groups to use is the following + # combination - this will audit all the queries and stored procedures + # executed against the database, as well as successful and failed logins: + # + # BATCH_COMPLETED_GROUP, + # SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + # FAILED_DATABASE_AUTHENTICATION_GROUP. + # + # This above combination is also the set that is configured by default + # when enabling auditing from the Azure portal. + # + # The supported action groups to audit are (note: choose only specific + # groups that cover your auditing needs. Using unnecessary groups could + # lead to very large quantities of audit records): + # + # APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + # BACKUP_RESTORE_GROUP + # DATABASE_LOGOUT_GROUP + # DATABASE_OBJECT_CHANGE_GROUP + # DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + # DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + # DATABASE_OPERATION_GROUP + # DATABASE_PERMISSION_CHANGE_GROUP + # DATABASE_PRINCIPAL_CHANGE_GROUP + # DATABASE_PRINCIPAL_IMPERSONATION_GROUP + # DATABASE_ROLE_MEMBER_CHANGE_GROUP + # FAILED_DATABASE_AUTHENTICATION_GROUP + # SCHEMA_OBJECT_ACCESS_GROUP + # SCHEMA_OBJECT_CHANGE_GROUP + # SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + # SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + # SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + # USER_CHANGE_PASSWORD_GROUP + # BATCH_STARTED_GROUP + # BATCH_COMPLETED_GROUP + # + # These are groups that cover all sql statements and stored procedures + # executed against the database, and should not be used in combination + # with other groups as this will result in duplicate audit logs. + # + # For more information, see [Database-Level Audit Action + # Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + # + # For Database auditing policy, specific Actions can also be specified + # (note that Actions cannot be specified for Server auditing policy). The + # supported actions to audit are: + # SELECT + # UPDATE + # INSERT + # DELETE + # EXECUTE + # RECEIVE + # REFERENCES + # + # The general form for defining an action to be audited is: + # ON BY + # + # Note that in the above format can refer to an object like a + # table, view, or stored procedure, or an entire database or schema. For + # the latter cases, the forms DATABASE:: and + # SCHEMA:: are used, respectively. + # + # For example: + # SELECT on dbo.myTable by public + # SELECT on DATABASE::myDatabase by public + # SELECT on SCHEMA::mySchema by public + # + # For more information, see [Database-Level Audit + # Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + attr_accessor :audit_actions_and_groups + + # @return Specifies the blob storage subscription Id. + attr_accessor :storage_account_subscription_id + + # @return [Boolean] Specifies whether storageAccountAccessKey value is + # the storage's secondary key. + attr_accessor :is_storage_secondary_key_in_use + + + # + # Mapper for ServerBlobAuditingPolicy class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ServerBlobAuditingPolicy', + type: { + name: 'Composite', + class_name: 'ServerBlobAuditingPolicy', + 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' + } + }, + state: { + required: true, + serialized_name: 'properties.state', + type: { + name: 'Enum', + module: 'BlobAuditingPolicyState' + } + }, + storage_endpoint: { + required: false, + serialized_name: 'properties.storageEndpoint', + type: { + name: 'String' + } + }, + storage_account_access_key: { + required: false, + serialized_name: 'properties.storageAccountAccessKey', + type: { + name: 'String' + } + }, + retention_days: { + required: false, + serialized_name: 'properties.retentionDays', + type: { + name: 'Number' + } + }, + audit_actions_and_groups: { + required: false, + serialized_name: 'properties.auditActionsAndGroups', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + storage_account_subscription_id: { + required: false, + serialized_name: 'properties.storageAccountSubscriptionId', + type: { + name: 'String' + } + }, + is_storage_secondary_key_in_use: { + required: false, + serialized_name: 'properties.isStorageSecondaryKeyInUse', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias.rb index 4ccfa61f11..8b7cef3bb1 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias.rb @@ -22,7 +22,6 @@ class ServerDnsAlias < ProxyResource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServerDnsAlias', type: { @@ -30,7 +29,6 @@ def self.mapper() class_name: 'ServerDnsAlias', 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,7 +53,6 @@ def self.mapper() } }, azure_dns_record: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.azureDnsRecord', diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias_acquisition.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias_acquisition.rb index 04c676eddb..80f062aa94 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias_acquisition.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias_acquisition.rb @@ -23,7 +23,6 @@ class ServerDnsAliasAcquisition # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServerDnsAliasAcquisition', type: { @@ -31,7 +30,6 @@ def self.mapper() class_name: 'ServerDnsAliasAcquisition', model_properties: { old_server_dns_alias_id: { - client_side_validation: true, required: false, serialized_name: 'oldServerDnsAliasId', type: { diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias_list_result.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias_list_result.rb index 6ddd586711..6f1a90e148 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias_list_result.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias_list_result.rb @@ -57,7 +57,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ServerDnsAliasListResult', type: { @@ -65,14 +64,12 @@ def self.mapper() class_name: 'ServerDnsAliasListResult', 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: 'ServerDnsAliasElementType', type: { @@ -83,7 +80,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'nextLink', diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_security_alert_policy.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_security_alert_policy.rb new file mode 100644 index 0000000000..ac1bb11483 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_security_alert_policy.rb @@ -0,0 +1,153 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # A server security alert policy. + # + class ServerSecurityAlertPolicy < ProxyResource + + include MsRestAzure + + # @return [SecurityAlertState] Specifies the state of the policy, whether + # it is enabled or disabled. Possible values include: 'Enabled', + # 'Disabled' + attr_accessor :state + + # @return [Array] Specifies an array of alerts that are disabled. + # Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + # Access_Anomaly + attr_accessor :disabled_alerts + + # @return [Array] Specifies an array of e-mail addresses to which + # the alert is sent. + attr_accessor :email_addresses + + # @return [Boolean] Specifies that the alert is sent to the account + # administrators. + attr_accessor :email_account_admins + + # @return [String] Specifies the blob storage endpoint (e.g. + # https://MyAccount.blob.core.windows.net). This blob storage will hold + # all Threat Detection audit logs. + attr_accessor :storage_endpoint + + # @return [String] Specifies the identifier key of the Threat Detection + # audit storage account. + attr_accessor :storage_account_access_key + + # @return [Integer] Specifies the number of days to keep in the Threat + # Detection audit logs. + attr_accessor :retention_days + + + # + # Mapper for ServerSecurityAlertPolicy class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ServerSecurityAlertPolicy', + type: { + name: 'Composite', + class_name: 'ServerSecurityAlertPolicy', + 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' + } + }, + state: { + required: true, + serialized_name: 'properties.state', + type: { + name: 'Enum', + module: 'SecurityAlertState' + } + }, + disabled_alerts: { + required: false, + serialized_name: 'properties.disabledAlerts', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + email_addresses: { + required: false, + serialized_name: 'properties.emailAddresses', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + email_account_admins: { + required: false, + serialized_name: 'properties.emailAccountAdmins', + type: { + name: 'Boolean' + } + }, + storage_endpoint: { + required: false, + serialized_name: 'properties.storageEndpoint', + type: { + name: 'String' + } + }, + storage_account_access_key: { + required: false, + serialized_name: 'properties.storageAccountAccessKey', + type: { + name: 'String' + } + }, + retention_days: { + required: false, + serialized_name: 'properties.retentionDays', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/sku.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/sku.rb new file mode 100644 index 0000000000..7fa5d01d99 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/sku.rb @@ -0,0 +1,91 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # The resource model definition representing SKU + # + class Sku + + include MsRestAzure + + # @return [String] The name of the SKU. Ex - P3. It is typically a + # letter+number code + attr_accessor :name + + # @return [String] This field is required to be implemented by the + # Resource Provider if the service has more than one tier, but is not + # required on a PUT. + attr_accessor :tier + + # @return [String] The SKU size. When the name field is the combination + # of tier and some other value, this would be the standalone code. + attr_accessor :size + + # @return [String] If the service has different generations of hardware, + # for the same SKU, then that can be captured here. + attr_accessor :family + + # @return [Integer] If the SKU supports scale out/in then the capacity + # integer should be included. If scale out/in is not possible for the + # resource this may be omitted. + attr_accessor :capacity + + + # + # Mapper for Sku class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Sku', + type: { + name: 'Composite', + class_name: 'Sku', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + tier: { + required: false, + serialized_name: 'tier', + type: { + name: 'String' + } + }, + size: { + required: false, + serialized_name: 'size', + type: { + name: 'String' + } + }, + family: { + required: false, + serialized_name: 'family', + type: { + name: 'String' + } + }, + capacity: { + required: false, + serialized_name: 'capacity', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/tracked_resource.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/tracked_resource.rb index d14f20d3f3..87cd47d7ca 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/tracked_resource.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/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: true, 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_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_policy_baseline_name.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_policy_baseline_name.rb new file mode 100644 index 0000000000..f90b67cd5e --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_policy_baseline_name.rb @@ -0,0 +1,16 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # Defines values for VulnerabilityAssessmentPolicyBaselineName + # + module VulnerabilityAssessmentPolicyBaselineName + Master = "master" + Default = "default" + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_recurring_scans_properties.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_recurring_scans_properties.rb new file mode 100644 index 0000000000..4ffdcf9a01 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_recurring_scans_properties.rb @@ -0,0 +1,75 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + module Models + # + # Properties of a Vulnerability Assessment recurring scans. + # + class VulnerabilityAssessmentRecurringScansProperties + + include MsRestAzure + + # @return [Boolean] Recurring scans state. + attr_accessor :is_enabled + + # @return [Boolean] Specifies that the schedule scan notification will be + # is sent to the subscription administrators. Default value: true . + attr_accessor :email_subscription_admins + + # @return [Array] Specifies an array of e-mail addresses to which + # the scan notification is sent. + attr_accessor :emails + + + # + # Mapper for VulnerabilityAssessmentRecurringScansProperties class as + # Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VulnerabilityAssessmentRecurringScansProperties', + type: { + name: 'Composite', + class_name: 'VulnerabilityAssessmentRecurringScansProperties', + model_properties: { + is_enabled: { + required: false, + serialized_name: 'isEnabled', + type: { + name: 'Boolean' + } + }, + email_subscription_admins: { + required: false, + serialized_name: 'emailSubscriptionAdmins', + default_value: true, + type: { + name: 'Boolean' + } + }, + emails: { + required: false, + serialized_name: 'emails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/restore_points.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/restore_points.rb new file mode 100644 index 0000000000..8abdce80fa --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/restore_points.rb @@ -0,0 +1,507 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class RestorePoints + include MsRestAzure + + # + # Creates and initializes a new instance of the RestorePoints class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets a list of database restore points. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RestorePointListResult] operation results. + # + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a list of database restore points. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @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_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Gets a list of database restore points. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @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_database_async(resource_group_name, server_name, database_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/databases/{databaseName}/restorePoints' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::RestorePointListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates a restore point for a data warehouse. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [CreateDatabaseRestorePointDefinition] The definition for + # creating the restore point of this database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RestorePoint] operation results. + # + def create(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [CreateDatabaseRestorePointDefinition] The definition for + # creating the restore point of this database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_async(resource_group_name, server_name, database_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::RestorePoint.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets a restore point. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param restore_point_name [String] The name of the restore point. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RestorePoint] operation results. + # + def get(resource_group_name, server_name, database_name, restore_point_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, restore_point_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a restore point. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param restore_point_name [String] The name of the restore point. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, database_name, restore_point_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, restore_point_name, custom_headers).value! + end + + # + # Gets a restore point. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param restore_point_name [String] The name of the restore point. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, database_name, restore_point_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'restore_point_name is nil' if restore_point_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/databases/{databaseName}/restorePoints/{restorePointName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'restorePointName' => restore_point_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::RestorePoint.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 a restore point. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param restore_point_name [String] The name of the restore point. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, server_name, database_name, restore_point_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, database_name, restore_point_name, custom_headers).value! + nil + end + + # + # Deletes a restore point. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param restore_point_name [String] The name of the restore point. + # @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 delete_with_http_info(resource_group_name, server_name, database_name, restore_point_name, custom_headers = nil) + delete_async(resource_group_name, server_name, database_name, restore_point_name, custom_headers).value! + end + + # + # Deletes a restore point. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param restore_point_name [String] The name of the restore point. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, server_name, database_name, restore_point_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'restore_point_name is nil' if restore_point_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/databases/{databaseName}/restorePoints/{restorePointName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'restorePointName' => restore_point_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Creates a restore point for a data warehouse. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [CreateDatabaseRestorePointDefinition] The definition for + # creating the restore point of this database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RestorePoint] operation results. + # + def begin_create(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = begin_create_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a restore point for a data warehouse. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [CreateDatabaseRestorePointDefinition] The definition for + # creating the restore point of this database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + begin_create_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + end + + # + # Creates a restore point for a data warehouse. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [CreateDatabaseRestorePointDefinition] The definition for + # creating the restore point of this database. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::CreateDatabaseRestorePointDefinition.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(: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 || status_code == 202 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::RestorePoint.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::RestorePoint.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 + + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_automatic_tuning_operations.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_automatic_tuning_operations.rb index b6fc05eaba..609c5da898 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_automatic_tuning_operations.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_automatic_tuning_operations.rb @@ -5,10 +5,10 @@ module Azure::SQL::Mgmt::V2017_03_01_preview # - # The Azure SQL Database management API provides a RESTful set of web APIs - # that interact with Azure SQL Database services to manage your databases. - # The API enables users to create, retrieve, update, and delete databases, - # servers, and other entities. + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. # class ServerAutomaticTuningOperations include MsRestAzure @@ -36,8 +36,8 @@ def initialize(client) # # @return [ServerAutomaticTuning] operation results. # - def get(resource_group_name, server_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -53,8 +53,8 @@ def get(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, custom_headers:nil) - get_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, custom_headers = nil) + get_async(resource_group_name, server_name, custom_headers).value! end # @@ -69,7 +69,7 @@ def get_with_http_info(resource_group_name, server_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, custom_headers:nil) + def get_async(resource_group_name, server_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -77,7 +77,6 @@ def get_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -136,8 +135,8 @@ def get_async(resource_group_name, server_name, custom_headers:nil) # # @return [ServerAutomaticTuning] operation results. # - def update(resource_group_name, server_name, parameters, custom_headers:nil) - response = update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def update(resource_group_name, server_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, server_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -155,8 +154,8 @@ def update(resource_group_name, server_name, parameters, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, server_name, parameters, custom_headers:nil) - update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil) + update_async(resource_group_name, server_name, parameters, custom_headers).value! end # @@ -173,7 +172,7 @@ def update_with_http_info(resource_group_name, server_name, parameters, custom_h # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, server_name, parameters, custom_headers:nil) + def update_async(resource_group_name, server_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? @@ -182,12 +181,13 @@ def update_async(resource_group_name, server_name, parameters, custom_headers:ni 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::SQL::Mgmt::V2017_03_01_preview::Models::ServerAutomaticTuning.mapper() request_content = @client.serialize(request_mapper, parameters) diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_blob_auditing_policies.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_blob_auditing_policies.rb new file mode 100644 index 0000000000..7f221b6b4a --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_blob_auditing_policies.rb @@ -0,0 +1,290 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class ServerBlobAuditingPolicies + include MsRestAzure + + # + # Creates and initializes a new instance of the ServerBlobAuditingPolicies class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets a server's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ServerBlobAuditingPolicy] operation results. + # + def get(resource_group_name, server_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a server's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, custom_headers = nil) + get_async(resource_group_name, server_name, custom_headers).value! + end + + # + # Gets a server's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + blob_auditing_policy_name = 'default' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'blobAuditingPolicyName' => blob_auditing_policy_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerBlobAuditingPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates or updates a server's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [ServerBlobAuditingPolicy] Properties of blob auditing + # policy + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ServerBlobAuditingPolicy] operation results. + # + def create_or_update(resource_group_name, server_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [ServerBlobAuditingPolicy] Properties of blob auditing + # policy + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerBlobAuditingPolicy.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Creates or updates a server's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [ServerBlobAuditingPolicy] Properties of blob auditing + # policy + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ServerBlobAuditingPolicy] operation results. + # + def begin_create_or_update(resource_group_name, server_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a server's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [ServerBlobAuditingPolicy] Properties of blob auditing + # policy + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! + end + + # + # Creates or updates a server's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [ServerBlobAuditingPolicy] Properties of blob auditing + # policy + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + blob_auditing_policy_name = 'default' + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerBlobAuditingPolicy.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'blobAuditingPolicyName' => blob_auditing_policy_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerBlobAuditingPolicy.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 + + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_dns_aliases.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_dns_aliases.rb index c1f538b788..18ec513d76 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_dns_aliases.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_dns_aliases.rb @@ -5,10 +5,10 @@ module Azure::SQL::Mgmt::V2017_03_01_preview # - # The Azure SQL Database management API provides a RESTful set of web APIs - # that interact with Azure SQL Database services to manage your databases. - # The API enables users to create, retrieve, update, and delete databases, - # servers, and other entities. + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. # class ServerDnsAliases include MsRestAzure @@ -38,8 +38,8 @@ def initialize(client) # # @return [ServerDnsAlias] operation results. # - def get(resource_group_name, server_name, dns_alias_name, custom_headers:nil) - response = get_async(resource_group_name, server_name, dns_alias_name, custom_headers:custom_headers).value! + def get(resource_group_name, server_name, dns_alias_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, dns_alias_name, custom_headers).value! response.body unless response.nil? end @@ -57,8 +57,8 @@ def get(resource_group_name, server_name, dns_alias_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, server_name, dns_alias_name, custom_headers:nil) - get_async(resource_group_name, server_name, dns_alias_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, server_name, dns_alias_name, custom_headers = nil) + get_async(resource_group_name, server_name, dns_alias_name, custom_headers).value! end # @@ -75,7 +75,7 @@ def get_with_http_info(resource_group_name, server_name, dns_alias_name, custom_ # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, server_name, dns_alias_name, custom_headers:nil) + def get_async(resource_group_name, server_name, dns_alias_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'dns_alias_name is nil' if dns_alias_name.nil? @@ -84,7 +84,6 @@ def get_async(resource_group_name, server_name, dns_alias_name, custom_headers:n request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -143,8 +142,8 @@ def get_async(resource_group_name, server_name, dns_alias_name, custom_headers:n # # @return [ServerDnsAlias] operation results. # - def create_or_update(resource_group_name, server_name, dns_alias_name, custom_headers:nil) - response = create_or_update_async(resource_group_name, server_name, dns_alias_name, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, server_name, dns_alias_name, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, dns_alias_name, custom_headers).value! response.body unless response.nil? end @@ -161,9 +160,9 @@ def create_or_update(resource_group_name, server_name, dns_alias_name, custom_he # @return [Concurrent::Promise] promise which provides async access to http # response. # - def create_or_update_async(resource_group_name, server_name, dns_alias_name, custom_headers:nil) + def create_or_update_async(resource_group_name, server_name, dns_alias_name, custom_headers = nil) # Send request - promise = begin_create_or_update_async(resource_group_name, server_name, dns_alias_name, custom_headers:custom_headers) + promise = begin_create_or_update_async(resource_group_name, server_name, dns_alias_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -191,8 +190,8 @@ def create_or_update_async(resource_group_name, server_name, dns_alias_name, cus # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - def delete(resource_group_name, server_name, dns_alias_name, custom_headers:nil) - response = delete_async(resource_group_name, server_name, dns_alias_name, custom_headers:custom_headers).value! + def delete(resource_group_name, server_name, dns_alias_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, dns_alias_name, custom_headers).value! nil end @@ -209,9 +208,9 @@ def delete(resource_group_name, server_name, dns_alias_name, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def delete_async(resource_group_name, server_name, dns_alias_name, custom_headers:nil) + def delete_async(resource_group_name, server_name, dns_alias_name, custom_headers = nil) # Send request - promise = begin_delete_async(resource_group_name, server_name, dns_alias_name, custom_headers:custom_headers) + promise = begin_delete_async(resource_group_name, server_name, dns_alias_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -238,8 +237,8 @@ def delete_async(resource_group_name, server_name, dns_alias_name, custom_header # # @return [Array] operation results. # - def list_by_server(resource_group_name, server_name, custom_headers:nil) - first_page = list_by_server_as_lazy(resource_group_name, server_name, custom_headers:custom_headers) + def list_by_server(resource_group_name, server_name, custom_headers = nil) + first_page = list_by_server_as_lazy(resource_group_name, server_name, custom_headers) first_page.get_all_items end @@ -256,8 +255,8 @@ def list_by_server(resource_group_name, server_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil) - list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! end # @@ -273,7 +272,7 @@ def list_by_server_with_http_info(resource_group_name, server_name, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_async(resource_group_name, server_name, custom_headers:nil) + def list_by_server_async(resource_group_name, server_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -281,7 +280,6 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -339,8 +337,8 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil) # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - def acquire(resource_group_name, server_name, dns_alias_name, parameters, custom_headers:nil) - response = acquire_async(resource_group_name, server_name, dns_alias_name, parameters, custom_headers:custom_headers).value! + def acquire(resource_group_name, server_name, dns_alias_name, parameters, custom_headers = nil) + response = acquire_async(resource_group_name, server_name, dns_alias_name, parameters, custom_headers).value! nil end @@ -358,9 +356,9 @@ def acquire(resource_group_name, server_name, dns_alias_name, parameters, custom # @return [Concurrent::Promise] promise which provides async access to http # response. # - def acquire_async(resource_group_name, server_name, dns_alias_name, parameters, custom_headers:nil) + def acquire_async(resource_group_name, server_name, dns_alias_name, parameters, custom_headers = nil) # Send request - promise = begin_acquire_async(resource_group_name, server_name, dns_alias_name, parameters, custom_headers:custom_headers) + promise = begin_acquire_async(resource_group_name, server_name, dns_alias_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -388,8 +386,8 @@ def acquire_async(resource_group_name, server_name, dns_alias_name, parameters, # # @return [ServerDnsAlias] operation results. # - def begin_create_or_update(resource_group_name, server_name, dns_alias_name, custom_headers:nil) - response = begin_create_or_update_async(resource_group_name, server_name, dns_alias_name, custom_headers:custom_headers).value! + def begin_create_or_update(resource_group_name, server_name, dns_alias_name, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, dns_alias_name, custom_headers).value! response.body unless response.nil? end @@ -407,8 +405,8 @@ def begin_create_or_update(resource_group_name, server_name, dns_alias_name, cus # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_create_or_update_with_http_info(resource_group_name, server_name, dns_alias_name, custom_headers:nil) - begin_create_or_update_async(resource_group_name, server_name, dns_alias_name, custom_headers:custom_headers).value! + def begin_create_or_update_with_http_info(resource_group_name, server_name, dns_alias_name, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, dns_alias_name, custom_headers).value! end # @@ -425,7 +423,7 @@ def begin_create_or_update_with_http_info(resource_group_name, server_name, dns_ # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_create_or_update_async(resource_group_name, server_name, dns_alias_name, custom_headers:nil) + def begin_create_or_update_async(resource_group_name, server_name, dns_alias_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'dns_alias_name is nil' if dns_alias_name.nil? @@ -434,7 +432,6 @@ def begin_create_or_update_async(resource_group_name, server_name, dns_alias_nam request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -502,8 +499,8 @@ def begin_create_or_update_async(resource_group_name, server_name, dns_alias_nam # will be added to the HTTP request. # # - def begin_delete(resource_group_name, server_name, dns_alias_name, custom_headers:nil) - response = begin_delete_async(resource_group_name, server_name, dns_alias_name, custom_headers:custom_headers).value! + def begin_delete(resource_group_name, server_name, dns_alias_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, server_name, dns_alias_name, custom_headers).value! nil end @@ -521,8 +518,8 @@ def begin_delete(resource_group_name, server_name, dns_alias_name, custom_header # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_delete_with_http_info(resource_group_name, server_name, dns_alias_name, custom_headers:nil) - begin_delete_async(resource_group_name, server_name, dns_alias_name, custom_headers:custom_headers).value! + def begin_delete_with_http_info(resource_group_name, server_name, dns_alias_name, custom_headers = nil) + begin_delete_async(resource_group_name, server_name, dns_alias_name, custom_headers).value! end # @@ -539,7 +536,7 @@ def begin_delete_with_http_info(resource_group_name, server_name, dns_alias_name # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_delete_async(resource_group_name, server_name, dns_alias_name, custom_headers:nil) + def begin_delete_async(resource_group_name, server_name, dns_alias_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'dns_alias_name is nil' if dns_alias_name.nil? @@ -548,7 +545,6 @@ def begin_delete_async(resource_group_name, server_name, dns_alias_name, custom_ request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -597,8 +593,8 @@ def begin_delete_async(resource_group_name, server_name, dns_alias_name, custom_ # will be added to the HTTP request. # # - def begin_acquire(resource_group_name, server_name, dns_alias_name, parameters, custom_headers:nil) - response = begin_acquire_async(resource_group_name, server_name, dns_alias_name, parameters, custom_headers:custom_headers).value! + def begin_acquire(resource_group_name, server_name, dns_alias_name, parameters, custom_headers = nil) + response = begin_acquire_async(resource_group_name, server_name, dns_alias_name, parameters, custom_headers).value! nil end @@ -617,8 +613,8 @@ def begin_acquire(resource_group_name, server_name, dns_alias_name, parameters, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_acquire_with_http_info(resource_group_name, server_name, dns_alias_name, parameters, custom_headers:nil) - begin_acquire_async(resource_group_name, server_name, dns_alias_name, parameters, custom_headers:custom_headers).value! + def begin_acquire_with_http_info(resource_group_name, server_name, dns_alias_name, parameters, custom_headers = nil) + begin_acquire_async(resource_group_name, server_name, dns_alias_name, parameters, custom_headers).value! end # @@ -636,7 +632,7 @@ def begin_acquire_with_http_info(resource_group_name, server_name, dns_alias_nam # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_acquire_async(resource_group_name, server_name, dns_alias_name, parameters, custom_headers:nil) + def begin_acquire_async(resource_group_name, server_name, dns_alias_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'dns_alias_name is nil' if dns_alias_name.nil? @@ -646,12 +642,13 @@ def begin_acquire_async(resource_group_name, server_name, dns_alias_name, parame 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::SQL::Mgmt::V2017_03_01_preview::Models::ServerDnsAliasAcquisition.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -698,8 +695,8 @@ def begin_acquire_async(resource_group_name, server_name, dns_alias_name, parame # # @return [ServerDnsAliasListResult] operation results. # - def list_by_server_next(next_page_link, custom_headers:nil) - response = list_by_server_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_server_next(next_page_link, custom_headers = nil) + response = list_by_server_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -713,8 +710,8 @@ def list_by_server_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_server_next_with_http_info(next_page_link, custom_headers:nil) - list_by_server_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_server_next_with_http_info(next_page_link, custom_headers = nil) + list_by_server_next_async(next_page_link, custom_headers).value! end # @@ -727,12 +724,11 @@ def list_by_server_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_server_next_async(next_page_link, custom_headers:nil) + def list_by_server_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 @@ -790,12 +786,12 @@ def list_by_server_next_async(next_page_link, custom_headers:nil) # @return [ServerDnsAliasListResult] which provide lazy access to pages of the # response. # - def list_by_server_as_lazy(resource_group_name, server_name, custom_headers:nil) - response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value! + def list_by_server_as_lazy(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_server_next_async(next_page_link, custom_headers:custom_headers) + list_by_server_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_security_alert_policies.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_security_alert_policies.rb new file mode 100644 index 0000000000..4e12ecf8a7 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_security_alert_policies.rb @@ -0,0 +1,290 @@ +# 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::SQL::Mgmt::V2017_03_01_preview + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class ServerSecurityAlertPolicies + include MsRestAzure + + # + # Creates and initializes a new instance of the ServerSecurityAlertPolicies class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Get a server's security alert policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ServerSecurityAlertPolicy] operation results. + # + def get(resource_group_name, server_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get a server's security alert policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, custom_headers = nil) + get_async(resource_group_name, server_name, custom_headers).value! + end + + # + # Get a server's security alert policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + security_alert_policy_name = 'Default' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Sql/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'securityAlertPolicyName' => security_alert_policy_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerSecurityAlertPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates or updates a threat detection policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [ServerSecurityAlertPolicy] The server security alert + # policy. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ServerSecurityAlertPolicy] operation results. + # + def create_or_update(resource_group_name, server_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [ServerSecurityAlertPolicy] The server security alert + # policy. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerSecurityAlertPolicy.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Creates or updates a threat detection policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [ServerSecurityAlertPolicy] The server security alert + # policy. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ServerSecurityAlertPolicy] operation results. + # + def begin_create_or_update(resource_group_name, server_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a threat detection policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [ServerSecurityAlertPolicy] The server security alert + # policy. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! + end + + # + # Creates or updates a threat detection policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [ServerSecurityAlertPolicy] The server security alert + # policy. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + security_alert_policy_name = 'Default' + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerSecurityAlertPolicy.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'securityAlertPolicyName' => security_alert_policy_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerSecurityAlertPolicy.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 + + end +end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/sql_management_client.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/sql_management_client.rb index 5e4539f389..1511fa7ef6 100644 --- a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/sql_management_client.rb +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/sql_management_client.rb @@ -35,14 +35,77 @@ class SqlManagementClient < MsRestAzure::AzureServiceClient # is generated and included in each request. Default is true. attr_accessor :generate_client_request_id + # @return [ExtendedDatabaseBlobAuditingPolicies] + # extended_database_blob_auditing_policies + attr_reader :extended_database_blob_auditing_policies + + # @return [ExtendedServerBlobAuditingPolicies] + # extended_server_blob_auditing_policies + attr_reader :extended_server_blob_auditing_policies + + # @return [ServerBlobAuditingPolicies] server_blob_auditing_policies + attr_reader :server_blob_auditing_policies + + # @return [DatabaseBlobAuditingPolicies] database_blob_auditing_policies + attr_reader :database_blob_auditing_policies + # @return [DatabaseOperations] database_operations attr_reader :database_operations # @return [Databases] databases attr_reader :databases - # @return [DatabaseRestorePoints] database_restore_points - attr_reader :database_restore_points + # @return [DatabaseVulnerabilityAssessmentRuleBaselines] + # database_vulnerability_assessment_rule_baselines + attr_reader :database_vulnerability_assessment_rule_baselines + + # @return [DatabaseVulnerabilityAssessments] + # database_vulnerability_assessments + attr_reader :database_vulnerability_assessments + + # @return [DataWarehouseUserActivitiesOperations] + # data_warehouse_user_activities_operations + attr_reader :data_warehouse_user_activities_operations + + # @return [JobAgents] job_agents + attr_reader :job_agents + + # @return [JobCredentials] job_credentials + attr_reader :job_credentials + + # @return [JobExecutions] job_executions + attr_reader :job_executions + + # @return [Jobs] jobs + attr_reader :jobs + + # @return [JobStepExecutions] job_step_executions + attr_reader :job_step_executions + + # @return [JobSteps] job_steps + attr_reader :job_steps + + # @return [JobTargetExecutions] job_target_executions + attr_reader :job_target_executions + + # @return [JobTargetGroups] job_target_groups + attr_reader :job_target_groups + + # @return [JobVersions] job_versions + attr_reader :job_versions + + # @return [LongTermRetentionBackups] long_term_retention_backups + attr_reader :long_term_retention_backups + + # @return [BackupLongTermRetentionPolicies] + # backup_long_term_retention_policies + attr_reader :backup_long_term_retention_policies + + # @return [ManagedDatabases] managed_databases + attr_reader :managed_databases + + # @return [RestorePoints] restore_points + attr_reader :restore_points # @return [ServerAutomaticTuningOperations] # server_automatic_tuning_operations @@ -64,9 +127,28 @@ def initialize(credentials = nil, base_url = nil, options = nil) fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil? @credentials = credentials + @extended_database_blob_auditing_policies = ExtendedDatabaseBlobAuditingPolicies.new(self) + @extended_server_blob_auditing_policies = ExtendedServerBlobAuditingPolicies.new(self) + @server_blob_auditing_policies = ServerBlobAuditingPolicies.new(self) + @database_blob_auditing_policies = DatabaseBlobAuditingPolicies.new(self) @database_operations = DatabaseOperations.new(self) @databases = Databases.new(self) - @database_restore_points = DatabaseRestorePoints.new(self) + @database_vulnerability_assessment_rule_baselines = DatabaseVulnerabilityAssessmentRuleBaselines.new(self) + @database_vulnerability_assessments = DatabaseVulnerabilityAssessments.new(self) + @data_warehouse_user_activities_operations = DataWarehouseUserActivitiesOperations.new(self) + @job_agents = JobAgents.new(self) + @job_credentials = JobCredentials.new(self) + @job_executions = JobExecutions.new(self) + @jobs = Jobs.new(self) + @job_step_executions = JobStepExecutions.new(self) + @job_steps = JobSteps.new(self) + @job_target_executions = JobTargetExecutions.new(self) + @job_target_groups = JobTargetGroups.new(self) + @job_versions = JobVersions.new(self) + @long_term_retention_backups = LongTermRetentionBackups.new(self) + @backup_long_term_retention_policies = BackupLongTermRetentionPolicies.new(self) + @managed_databases = ManagedDatabases.new(self) + @restore_points = RestorePoints.new(self) @server_automatic_tuning_operations = ServerAutomaticTuningOperations.new(self) @server_dns_aliases = ServerDnsAliases.new(self) @api_version = '2017-03-01-preview' @@ -122,9 +204,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 +220,9 @@ def make_request_async(method, path, options = {}) # def add_telemetry sdk_information = 'azure_mgmt_sql' - sdk_information = "#{sdk_information}/0.16.0" + if defined? Azure::SQL::Mgmt::V2017_03_01_preview::VERSION + sdk_information = "#{sdk_information}/#{Azure::SQL::Mgmt::V2017_03_01_preview::VERSION}" + end add_user_agent_information(sdk_information) end end diff --git a/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/version.rb b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/version.rb new file mode 100644 index 0000000000..1ef51a0ff0 --- /dev/null +++ b/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/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::SQL::Mgmt::V2017_03_01_preview + VERSION = '0.16.0' +end diff --git a/management/azure_mgmt_sql/lib/azure_mgmt_sql.rb b/management/azure_mgmt_sql/lib/azure_mgmt_sql.rb index 09ab305b8d..b7e3e7f3ca 100644 --- a/management/azure_mgmt_sql/lib/azure_mgmt_sql.rb +++ b/management/azure_mgmt_sql/lib/azure_mgmt_sql.rb @@ -3,6 +3,6 @@ # Licensed under the MIT License. See License.txt in the project root for license information. require '2014-04-01/generated/azure_mgmt_sql' -require '2015-05-01-preview/generated/azure_mgmt_sql' require '2017-03-01-preview/generated/azure_mgmt_sql' +require '2015-05-01-preview/generated/azure_mgmt_sql' require 'profiles/latest/sql_latest_profile_client' diff --git a/management/azure_mgmt_sql/lib/profiles/latest/modules/sql_profile_module.rb b/management/azure_mgmt_sql/lib/profiles/latest/modules/sql_profile_module.rb index a066fb4f60..d3c876e218 100644 --- a/management/azure_mgmt_sql/lib/profiles/latest/modules/sql_profile_module.rb +++ b/management/azure_mgmt_sql/lib/profiles/latest/modules/sql_profile_module.rb @@ -6,11 +6,9 @@ module Azure::SQL::Profiles::Latest module Mgmt - BackupLongTermRetentionPolicies = Azure::SQL::Mgmt::V2014_04_01::BackupLongTermRetentionPolicies BackupLongTermRetentionVaults = Azure::SQL::Mgmt::V2014_04_01::BackupLongTermRetentionVaults RecoverableDatabases = Azure::SQL::Mgmt::V2014_04_01::RecoverableDatabases RestorableDroppedDatabases = Azure::SQL::Mgmt::V2014_04_01::RestorableDroppedDatabases - RestorePoints = Azure::SQL::Mgmt::V2014_04_01::RestorePoints Capabilities = Azure::SQL::Mgmt::V2014_04_01::Capabilities ServerConnectionPolicies = Azure::SQL::Mgmt::V2014_04_01::ServerConnectionPolicies DatabaseThreatDetectionPolicies = Azure::SQL::Mgmt::V2014_04_01::DatabaseThreatDetectionPolicies @@ -20,18 +18,17 @@ module Mgmt Extensions = Azure::SQL::Mgmt::V2014_04_01::Extensions DisasterRecoveryConfigurations = Azure::SQL::Mgmt::V2014_04_01::DisasterRecoveryConfigurations ElasticPools = Azure::SQL::Mgmt::V2014_04_01::ElasticPools - FirewallRules = Azure::SQL::Mgmt::V2014_04_01::FirewallRules GeoBackupPolicies = Azure::SQL::Mgmt::V2014_04_01::GeoBackupPolicies Queries = Azure::SQL::Mgmt::V2014_04_01::Queries QueryStatistics = Azure::SQL::Mgmt::V2014_04_01::QueryStatistics QueryTexts = Azure::SQL::Mgmt::V2014_04_01::QueryTexts + RecommendedElasticPools = Azure::SQL::Mgmt::V2014_04_01::RecommendedElasticPools ReplicationLinks = Azure::SQL::Mgmt::V2014_04_01::ReplicationLinks ServerAzureADAdministrators = Azure::SQL::Mgmt::V2014_04_01::ServerAzureADAdministrators ServerCommunicationLinks = Azure::SQL::Mgmt::V2014_04_01::ServerCommunicationLinks ServiceObjectives = Azure::SQL::Mgmt::V2014_04_01::ServiceObjectives ElasticPoolActivities = Azure::SQL::Mgmt::V2014_04_01::ElasticPoolActivities ElasticPoolDatabaseActivities = Azure::SQL::Mgmt::V2014_04_01::ElasticPoolDatabaseActivities - RecommendedElasticPools = Azure::SQL::Mgmt::V2014_04_01::RecommendedElasticPools ServiceTierAdvisors = Azure::SQL::Mgmt::V2014_04_01::ServiceTierAdvisors TransparentDataEncryptions = Azure::SQL::Mgmt::V2014_04_01::TransparentDataEncryptions TransparentDataEncryptionActivities = Azure::SQL::Mgmt::V2014_04_01::TransparentDataEncryptionActivities @@ -43,9 +40,11 @@ module Mgmt DatabaseAdvisors = Azure::SQL::Mgmt::V2015_05_01_preview::DatabaseAdvisors DatabaseRecommendedActions = Azure::SQL::Mgmt::V2015_05_01_preview::DatabaseRecommendedActions ServerAdvisors = Azure::SQL::Mgmt::V2015_05_01_preview::ServerAdvisors - DatabaseBlobAuditingPolicies = Azure::SQL::Mgmt::V2015_05_01_preview::DatabaseBlobAuditingPolicies + DatabaseAutomaticTuningOperations = Azure::SQL::Mgmt::V2015_05_01_preview::DatabaseAutomaticTuningOperations EncryptionProtectors = Azure::SQL::Mgmt::V2015_05_01_preview::EncryptionProtectors FailoverGroups = Azure::SQL::Mgmt::V2015_05_01_preview::FailoverGroups + FirewallRules = Azure::SQL::Mgmt::V2015_05_01_preview::FirewallRules + ManagedInstances = Azure::SQL::Mgmt::V2015_05_01_preview::ManagedInstances Operations = Azure::SQL::Mgmt::V2015_05_01_preview::Operations ServerKeys = Azure::SQL::Mgmt::V2015_05_01_preview::ServerKeys Servers = Azure::SQL::Mgmt::V2015_05_01_preview::Servers @@ -54,101 +53,115 @@ module Mgmt SyncMembers = Azure::SQL::Mgmt::V2015_05_01_preview::SyncMembers SubscriptionUsages = Azure::SQL::Mgmt::V2015_05_01_preview::SubscriptionUsages VirtualNetworkRules = Azure::SQL::Mgmt::V2015_05_01_preview::VirtualNetworkRules + ExtendedDatabaseBlobAuditingPolicies = Azure::SQL::Mgmt::V2017_03_01_preview::ExtendedDatabaseBlobAuditingPolicies + ExtendedServerBlobAuditingPolicies = Azure::SQL::Mgmt::V2017_03_01_preview::ExtendedServerBlobAuditingPolicies + ServerBlobAuditingPolicies = Azure::SQL::Mgmt::V2017_03_01_preview::ServerBlobAuditingPolicies + DatabaseBlobAuditingPolicies = Azure::SQL::Mgmt::V2017_03_01_preview::DatabaseBlobAuditingPolicies DatabaseOperations = Azure::SQL::Mgmt::V2017_03_01_preview::DatabaseOperations Databases = Azure::SQL::Mgmt::V2017_03_01_preview::Databases - DatabaseRestorePoints = Azure::SQL::Mgmt::V2017_03_01_preview::DatabaseRestorePoints + DatabaseVulnerabilityAssessmentRuleBaselines = Azure::SQL::Mgmt::V2017_03_01_preview::DatabaseVulnerabilityAssessmentRuleBaselines + DatabaseVulnerabilityAssessments = Azure::SQL::Mgmt::V2017_03_01_preview::DatabaseVulnerabilityAssessments + DataWarehouseUserActivitiesOperations = Azure::SQL::Mgmt::V2017_03_01_preview::DataWarehouseUserActivitiesOperations + JobAgents = Azure::SQL::Mgmt::V2017_03_01_preview::JobAgents + JobCredentials = Azure::SQL::Mgmt::V2017_03_01_preview::JobCredentials + JobExecutions = Azure::SQL::Mgmt::V2017_03_01_preview::JobExecutions + Jobs = Azure::SQL::Mgmt::V2017_03_01_preview::Jobs + JobStepExecutions = Azure::SQL::Mgmt::V2017_03_01_preview::JobStepExecutions + JobSteps = Azure::SQL::Mgmt::V2017_03_01_preview::JobSteps + JobTargetExecutions = Azure::SQL::Mgmt::V2017_03_01_preview::JobTargetExecutions + JobTargetGroups = Azure::SQL::Mgmt::V2017_03_01_preview::JobTargetGroups + JobVersions = Azure::SQL::Mgmt::V2017_03_01_preview::JobVersions + LongTermRetentionBackups = Azure::SQL::Mgmt::V2017_03_01_preview::LongTermRetentionBackups + BackupLongTermRetentionPolicies = Azure::SQL::Mgmt::V2017_03_01_preview::BackupLongTermRetentionPolicies + ManagedDatabases = Azure::SQL::Mgmt::V2017_03_01_preview::ManagedDatabases + RestorePoints = Azure::SQL::Mgmt::V2017_03_01_preview::RestorePoints ServerAutomaticTuningOperations = Azure::SQL::Mgmt::V2017_03_01_preview::ServerAutomaticTuningOperations ServerDnsAliases = Azure::SQL::Mgmt::V2017_03_01_preview::ServerDnsAliases module Models - FirewallRuleListResult = Azure::SQL::Mgmt::V2014_04_01::Models::FirewallRuleListResult - DisasterRecoveryConfigurationListResult = Azure::SQL::Mgmt::V2014_04_01::Models::DisasterRecoveryConfigurationListResult - ServerAdministratorListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ServerAdministratorListResult - ServerUsage = Azure::SQL::Mgmt::V2014_04_01::Models::ServerUsage - ServiceTierAdvisorListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ServiceTierAdvisorListResult - ReplicationLinkListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ReplicationLinkListResult - ElasticPoolDatabaseActivityListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDatabaseActivityListResult - RecommendedElasticPoolMetric = Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolMetric - ElasticPoolActivityListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolActivityListResult - ServerUsageListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ServerUsageListResult - RecoverableDatabaseListResult = Azure::SQL::Mgmt::V2014_04_01::Models::RecoverableDatabaseListResult - QueryTextListResult = Azure::SQL::Mgmt::V2014_04_01::Models::QueryTextListResult - RestorableDroppedDatabaseListResult = Azure::SQL::Mgmt::V2014_04_01::Models::RestorableDroppedDatabaseListResult - QueryText = Azure::SQL::Mgmt::V2014_04_01::Models::QueryText - RestorePointListResult = Azure::SQL::Mgmt::V2014_04_01::Models::RestorePointListResult - QueryStatisticListResult = Azure::SQL::Mgmt::V2014_04_01::Models::QueryStatisticListResult - ServiceObjectiveCapability = Azure::SQL::Mgmt::V2014_04_01::Models::ServiceObjectiveCapability + MetricValue = Azure::SQL::Mgmt::V2014_04_01::Models::MetricValue + ServiceObjectiveListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ServiceObjectiveListResult DataMaskingRuleListResult = Azure::SQL::Mgmt::V2014_04_01::Models::DataMaskingRuleListResult - ElasticPoolPerDatabaseMinDtuCapability = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolPerDatabaseMinDtuCapability + QueryText = Azure::SQL::Mgmt::V2014_04_01::Models::QueryText + DatabaseUsageListResult = Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseUsageListResult TransparentDataEncryptionListResult = Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionListResult - ElasticPoolDtuCapability = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDtuCapability + DatabaseUsage = Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseUsage ExtensionListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ExtensionListResult - ServerVersionCapability = Azure::SQL::Mgmt::V2014_04_01::Models::ServerVersionCapability - TopQueriesListResult = Azure::SQL::Mgmt::V2014_04_01::Models::TopQueriesListResult - CheckNameAvailabilityRequest = Azure::SQL::Mgmt::V2014_04_01::Models::CheckNameAvailabilityRequest - TopQueries = Azure::SQL::Mgmt::V2014_04_01::Models::TopQueries - TransparentDataEncryptionActivityListResult = Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivityListResult - QueryStatistic = Azure::SQL::Mgmt::V2014_04_01::Models::QueryStatistic - QueryInterval = Azure::SQL::Mgmt::V2014_04_01::Models::QueryInterval - OperationImpact = Azure::SQL::Mgmt::V2014_04_01::Models::OperationImpact - ElasticPoolListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolListResult + ServerUsageListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ServerUsageListResult ServerCommunicationLinkListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ServerCommunicationLinkListResult - QueryMetric = Azure::SQL::Mgmt::V2014_04_01::Models::QueryMetric - AdvisorListResult = Azure::SQL::Mgmt::V2014_04_01::Models::AdvisorListResult - BackupLongTermRetentionVaultListResult = Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionVaultListResult - RecommendedElasticPoolListResult = Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolListResult - GeoBackupPolicyListResult = Azure::SQL::Mgmt::V2014_04_01::Models::GeoBackupPolicyListResult + ServerUsage = Azure::SQL::Mgmt::V2014_04_01::Models::ServerUsage + DisasterRecoveryConfigurationListResult = Azure::SQL::Mgmt::V2014_04_01::Models::DisasterRecoveryConfigurationListResult MaxSizeCapability = Azure::SQL::Mgmt::V2014_04_01::Models::MaxSizeCapability - ImportExtensionRequest = Azure::SQL::Mgmt::V2014_04_01::Models::ImportExtensionRequest + ServerAdministratorListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ServerAdministratorListResult + EditionCapability = Azure::SQL::Mgmt::V2014_04_01::Models::EditionCapability ElasticPoolPerDatabaseMaxDtuCapability = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolPerDatabaseMaxDtuCapability - DatabaseUsageListResult = Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseUsageListResult + ElasticPoolListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolListResult + ElasticPoolEditionCapability = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolEditionCapability + ReplicationLinkListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ReplicationLinkListResult LocationCapabilities = Azure::SQL::Mgmt::V2014_04_01::Models::LocationCapabilities - DatabaseUsage = Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseUsage + CheckNameAvailabilityResponse = Azure::SQL::Mgmt::V2014_04_01::Models::CheckNameAvailabilityResponse + RecommendedElasticPoolListMetricsResult = Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolListMetricsResult SloUsageMetric = Azure::SQL::Mgmt::V2014_04_01::Models::SloUsageMetric + GeoBackupPolicyListResult = Azure::SQL::Mgmt::V2014_04_01::Models::GeoBackupPolicyListResult + TableAuditingPolicyProperties = Azure::SQL::Mgmt::V2014_04_01::Models::TableAuditingPolicyProperties + ImportExtensionRequest = Azure::SQL::Mgmt::V2014_04_01::Models::ImportExtensionRequest + TransparentDataEncryptionActivityListResult = Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivityListResult + RecommendedElasticPoolListResult = Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolListResult + ElasticPoolDatabaseActivityListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDatabaseActivityListResult + RecommendedElasticPoolMetric = Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolMetric + ElasticPoolActivityListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolActivityListResult ExportRequest = Azure::SQL::Mgmt::V2014_04_01::Models::ExportRequest - DatabaseTableAuditingPolicyListResult = Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseTableAuditingPolicyListResult - MetricValue = Azure::SQL::Mgmt::V2014_04_01::Models::MetricValue - BackupLongTermRetentionPolicyListResult = Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionPolicyListResult + QueryTextListResult = Azure::SQL::Mgmt::V2014_04_01::Models::QueryTextListResult + BackupLongTermRetentionVaultListResult = Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionVaultListResult MetricName = Azure::SQL::Mgmt::V2014_04_01::Models::MetricName - ServiceObjectiveListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ServiceObjectiveListResult + RestorableDroppedDatabaseListResult = Azure::SQL::Mgmt::V2014_04_01::Models::RestorableDroppedDatabaseListResult Metric = Azure::SQL::Mgmt::V2014_04_01::Models::Metric - ElasticPoolEditionCapability = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolEditionCapability + ElasticPoolPerDatabaseMinDtuCapability = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolPerDatabaseMinDtuCapability MetricListResult = Azure::SQL::Mgmt::V2014_04_01::Models::MetricListResult - TableAuditingPolicyProperties = Azure::SQL::Mgmt::V2014_04_01::Models::TableAuditingPolicyProperties + ServerVersionCapability = Azure::SQL::Mgmt::V2014_04_01::Models::ServerVersionCapability MetricAvailability = Azure::SQL::Mgmt::V2014_04_01::Models::MetricAvailability - RecommendedElasticPoolListMetricsResult = Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolListMetricsResult + ServerTableAuditingPolicyListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ServerTableAuditingPolicyListResult MetricDefinition = Azure::SQL::Mgmt::V2014_04_01::Models::MetricDefinition - CheckNameAvailabilityResponse = Azure::SQL::Mgmt::V2014_04_01::Models::CheckNameAvailabilityResponse + OperationImpact = Azure::SQL::Mgmt::V2014_04_01::Models::OperationImpact MetricDefinitionListResult = Azure::SQL::Mgmt::V2014_04_01::Models::MetricDefinitionListResult - EditionCapability = Azure::SQL::Mgmt::V2014_04_01::Models::EditionCapability - ServerTableAuditingPolicyListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ServerTableAuditingPolicyListResult - BackupLongTermRetentionPolicy = Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionPolicy + BackupLongTermRetentionPolicyListResult = Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionPolicyListResult + ServiceObjectiveCapability = Azure::SQL::Mgmt::V2014_04_01::Models::ServiceObjectiveCapability + CheckNameAvailabilityRequest = Azure::SQL::Mgmt::V2014_04_01::Models::CheckNameAvailabilityRequest + QueryMetric = Azure::SQL::Mgmt::V2014_04_01::Models::QueryMetric + ServiceTierAdvisorListResult = Azure::SQL::Mgmt::V2014_04_01::Models::ServiceTierAdvisorListResult + QueryInterval = Azure::SQL::Mgmt::V2014_04_01::Models::QueryInterval + RecoverableDatabaseListResult = Azure::SQL::Mgmt::V2014_04_01::Models::RecoverableDatabaseListResult + QueryStatistic = Azure::SQL::Mgmt::V2014_04_01::Models::QueryStatistic + DatabaseTableAuditingPolicyListResult = Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseTableAuditingPolicyListResult + TopQueries = Azure::SQL::Mgmt::V2014_04_01::Models::TopQueries + ElasticPoolDtuCapability = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDtuCapability + TopQueriesListResult = Azure::SQL::Mgmt::V2014_04_01::Models::TopQueriesListResult + AdvisorListResult = Azure::SQL::Mgmt::V2014_04_01::Models::AdvisorListResult + QueryStatisticListResult = Azure::SQL::Mgmt::V2014_04_01::Models::QueryStatisticListResult BackupLongTermRetentionVault = Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionVault RecoverableDatabase = Azure::SQL::Mgmt::V2014_04_01::Models::RecoverableDatabase RestorableDroppedDatabase = Azure::SQL::Mgmt::V2014_04_01::Models::RestorableDroppedDatabase - RestorePoint = Azure::SQL::Mgmt::V2014_04_01::Models::RestorePoint ServerConnectionPolicy = Azure::SQL::Mgmt::V2014_04_01::Models::ServerConnectionPolicy ServiceTierAdvisor = Azure::SQL::Mgmt::V2014_04_01::Models::ServiceTierAdvisor TransparentDataEncryption = Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryption RecommendedIndex = Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedIndex - TransparentDataEncryptionActivity = Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivity - ElasticPoolDatabaseActivity = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDatabaseActivity - ElasticPoolActivity = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolActivity - RecommendedElasticPool = Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPool DatabaseSecurityAlertPolicy = Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseSecurityAlertPolicy DataMaskingPolicy = Azure::SQL::Mgmt::V2014_04_01::Models::DataMaskingPolicy DataMaskingRule = Azure::SQL::Mgmt::V2014_04_01::Models::DataMaskingRule DisasterRecoveryConfiguration = Azure::SQL::Mgmt::V2014_04_01::Models::DisasterRecoveryConfiguration ElasticPool = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPool ElasticPoolUpdate = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolUpdate - FirewallRule = Azure::SQL::Mgmt::V2014_04_01::Models::FirewallRule GeoBackupPolicy = Azure::SQL::Mgmt::V2014_04_01::Models::GeoBackupPolicy ImportExportResponse = Azure::SQL::Mgmt::V2014_04_01::Models::ImportExportResponse ImportRequest = Azure::SQL::Mgmt::V2014_04_01::Models::ImportRequest + RecommendedElasticPool = Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPool ReplicationLink = Azure::SQL::Mgmt::V2014_04_01::Models::ReplicationLink ServerAzureADAdministrator = Azure::SQL::Mgmt::V2014_04_01::Models::ServerAzureADAdministrator ServerCommunicationLink = Azure::SQL::Mgmt::V2014_04_01::Models::ServerCommunicationLink ServiceObjective = Azure::SQL::Mgmt::V2014_04_01::Models::ServiceObjective + ElasticPoolActivity = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolActivity + ElasticPoolDatabaseActivity = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDatabaseActivity + TransparentDataEncryptionActivity = Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivity DatabaseConnectionPolicy = Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseConnectionPolicy DatabaseTableAuditingPolicy = Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseTableAuditingPolicy ServerTableAuditingPolicy = Azure::SQL::Mgmt::V2014_04_01::Models::ServerTableAuditingPolicy @@ -165,8 +178,6 @@ module Models RecommendedIndexState = Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedIndexState RecommendedIndexType = Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedIndexType ReadScale = Azure::SQL::Mgmt::V2014_04_01::Models::ReadScale - TransparentDataEncryptionActivityStatus = Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivityStatus - ElasticPoolEdition = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolEdition SecurityAlertPolicyState = Azure::SQL::Mgmt::V2014_04_01::Models::SecurityAlertPolicyState SecurityAlertPolicyEmailAccountAdmins = Azure::SQL::Mgmt::V2014_04_01::Models::SecurityAlertPolicyEmailAccountAdmins SecurityAlertPolicyUseServerDefault = Azure::SQL::Mgmt::V2014_04_01::Models::SecurityAlertPolicyUseServerDefault @@ -178,6 +189,7 @@ module Models DisasterRecoveryConfigurationFailoverPolicy = Azure::SQL::Mgmt::V2014_04_01::Models::DisasterRecoveryConfigurationFailoverPolicy DisasterRecoveryConfigurationRole = Azure::SQL::Mgmt::V2014_04_01::Models::DisasterRecoveryConfigurationRole ElasticPoolState = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolState + ElasticPoolEdition = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolEdition GeoBackupPolicyState = Azure::SQL::Mgmt::V2014_04_01::Models::GeoBackupPolicyState StorageKeyType = Azure::SQL::Mgmt::V2014_04_01::Models::StorageKeyType AuthenticationType = Azure::SQL::Mgmt::V2014_04_01::Models::AuthenticationType @@ -192,47 +204,57 @@ module Models ReplicationState = Azure::SQL::Mgmt::V2014_04_01::Models::ReplicationState ServerVersion = Azure::SQL::Mgmt::V2014_04_01::Models::ServerVersion ServerState = Azure::SQL::Mgmt::V2014_04_01::Models::ServerState - ServerKeyListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerKeyListResult + TransparentDataEncryptionActivityStatus = Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivityStatus + OperationDisplay = Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationDisplay + Operation = Azure::SQL::Mgmt::V2015_05_01_preview::Models::Operation + RecommendedActionImplementationInfo = Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionImplementationInfo + OperationListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationListResult + RecommendedActionImpactRecord = Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionImpactRecord + ManagedInstanceUpdate = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstanceUpdate + FirewallRuleList = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FirewallRuleList ResourceIdentity = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ResourceIdentity + SyncGroupSchema = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchema + SyncDatabaseIdListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncDatabaseIdListResult + SyncGroupSchemaTable = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchemaTable + SyncFullSchemaTable = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaTable + SyncGroupSchemaTableColumn = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchemaTableColumn + ManagedInstanceListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstanceListResult + EncryptionProtectorListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::EncryptionProtectorListResult + SyncFullSchemaTableColumn = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaTableColumn + FailoverGroupReadOnlyEndpoint = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupReadOnlyEndpoint RecommendedActionStateInfo = Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionStateInfo + SyncGroupLogProperties = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupLogProperties RecommendedActionErrorInfo = Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionErrorInfo - ServerListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerListResult + FailoverGroupListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupListResult RecommendedActionMetricInfo = Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionMetricInfo + SyncFullSchemaPropertiesListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaPropertiesListResult + FirewallRuleListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FirewallRuleListResult + ServerKeyListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerKeyListResult VirtualNetworkRuleListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::VirtualNetworkRuleListResult - RecommendedActionImpactRecord = Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionImpactRecord - SyncGroupListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupListResult - SyncGroupSchema = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchema - SyncGroupLogProperties = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupLogProperties - FailoverGroupReadWriteEndpoint = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupReadWriteEndpoint SyncGroupLogListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupLogListResult + ServerListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerListResult PartnerInfo = Azure::SQL::Mgmt::V2015_05_01_preview::Models::PartnerInfo ServerUpdate = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerUpdate - FailoverGroupUpdate = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupUpdate + ResourceWithWritableName = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ResourceWithWritableName SubscriptionUsageListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SubscriptionUsageListResult - OperationDisplay = Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationDisplay + SyncGroupListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupListResult SyncAgentListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncAgentListResult - OperationListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationListResult + FailoverGroupReadWriteEndpoint = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupReadWriteEndpoint SyncAgentKeyProperties = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncAgentKeyProperties - SyncFullSchemaPropertiesListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaPropertiesListResult - RecommendedActionImplementationInfo = Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionImplementationInfo + SyncFullSchemaProperties = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaProperties SyncMemberListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncMemberListResult - FailoverGroupReadOnlyEndpoint = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupReadOnlyEndpoint + FailoverGroupUpdate = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupUpdate SyncAgentLinkedDatabaseListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncAgentLinkedDatabaseListResult - FailoverGroupListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupListResult + AutomaticTuningOptions = Azure::SQL::Mgmt::V2015_05_01_preview::Models::AutomaticTuningOptions SyncDatabaseIdProperties = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncDatabaseIdProperties - SyncGroupSchemaTableColumn = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchemaTableColumn - SyncDatabaseIdListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncDatabaseIdListResult - SyncGroupSchemaTable = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchemaTable - SyncFullSchemaTableColumn = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaTableColumn - EncryptionProtectorListResult = Azure::SQL::Mgmt::V2015_05_01_preview::Models::EncryptionProtectorListResult - SyncFullSchemaTable = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaTable - Operation = Azure::SQL::Mgmt::V2015_05_01_preview::Models::Operation - SyncFullSchemaProperties = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaProperties RecommendedAction = Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedAction Advisor = Azure::SQL::Mgmt::V2015_05_01_preview::Models::Advisor - DatabaseBlobAuditingPolicy = Azure::SQL::Mgmt::V2015_05_01_preview::Models::DatabaseBlobAuditingPolicy + DatabaseAutomaticTuning = Azure::SQL::Mgmt::V2015_05_01_preview::Models::DatabaseAutomaticTuning EncryptionProtector = Azure::SQL::Mgmt::V2015_05_01_preview::Models::EncryptionProtector FailoverGroup = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroup + ProxyResourceWithWritableName = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ProxyResourceWithWritableName + FirewallRule = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FirewallRule + ManagedInstance = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstance ServerKey = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerKey Server = Azure::SQL::Mgmt::V2015_05_01_preview::Models::Server SyncAgent = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncAgent @@ -248,13 +270,14 @@ module Models RecommendedActionInitiatedBy = Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionInitiatedBy ImplementationMethod = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ImplementationMethod IsRetryable = Azure::SQL::Mgmt::V2015_05_01_preview::Models::IsRetryable - BlobAuditingPolicyState = Azure::SQL::Mgmt::V2015_05_01_preview::Models::BlobAuditingPolicyState + AutomaticTuningMode = Azure::SQL::Mgmt::V2015_05_01_preview::Models::AutomaticTuningMode + AutomaticTuningDisabledReason = Azure::SQL::Mgmt::V2015_05_01_preview::Models::AutomaticTuningDisabledReason ServerKeyType = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerKeyType ReadWriteEndpointFailoverPolicy = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ReadWriteEndpointFailoverPolicy ReadOnlyEndpointFailoverPolicy = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ReadOnlyEndpointFailoverPolicy FailoverGroupReplicationRole = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupReplicationRole - OperationOrigin = Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationOrigin IdentityType = Azure::SQL::Mgmt::V2015_05_01_preview::Models::IdentityType + OperationOrigin = Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationOrigin SyncAgentState = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncAgentState SyncMemberDbType = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncMemberDbType SyncGroupLogType = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupLogType @@ -263,43 +286,94 @@ module Models SyncDirection = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncDirection SyncMemberState = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncMemberState VirtualNetworkRuleState = Azure::SQL::Mgmt::V2015_05_01_preview::Models::VirtualNetworkRuleState + JobSchedule = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobSchedule + JobCredentialListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobCredentialListResult + VulnerabilityAssessmentRecurringScansProperties = Azure::SQL::Mgmt::V2017_03_01_preview::Models::VulnerabilityAssessmentRecurringScansProperties + ManagedDatabaseUpdate = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabaseUpdate + JobTargetGroupListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTargetGroupListResult + ResourceMoveDefinition = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ResourceMoveDefinition + ServerDnsAliasListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerDnsAliasListResult + RestorePointListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::RestorePointListResult + JobTarget = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTarget + LongTermRetentionBackupListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackupListResult + JobAgentListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgentListResult + CreateDatabaseRestorePointDefinition = Azure::SQL::Mgmt::V2017_03_01_preview::Models::CreateDatabaseRestorePointDefinition + JobAgentUpdate = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgentUpdate DatabaseUpdate = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseUpdate + JobStepListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepListResult + JobVersionListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobVersionListResult + ServerDnsAliasAcquisition = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerDnsAliasAcquisition AutomaticTuningServerOptions = Azure::SQL::Mgmt::V2017_03_01_preview::Models::AutomaticTuningServerOptions - DatabaseOperationListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseOperationListResult - CreateDatabaseRestorePointDefinition = Azure::SQL::Mgmt::V2017_03_01_preview::Models::CreateDatabaseRestorePointDefinition - DatabaseRestorePointListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseRestorePointListResult - ArmSku = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ArmSku + JobExecutionTarget = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionTarget + CompleteDatabaseRestoreDefinition = Azure::SQL::Mgmt::V2017_03_01_preview::Models::CompleteDatabaseRestoreDefinition + JobStepExecutionOptions = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepExecutionOptions + Sku = Azure::SQL::Mgmt::V2017_03_01_preview::Models::Sku + JobExecutionListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionListResult ImportExportDatabaseDefinition = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ImportExportDatabaseDefinition - DatabaseListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseListResult - ServerDnsAliasListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerDnsAliasListResult - ResourceMoveDefinition = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ResourceMoveDefinition Resource = Azure::SQL::Mgmt::V2017_03_01_preview::Models::Resource - ServerDnsAliasAcquisition = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerDnsAliasAcquisition + ManagedDatabaseListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabaseListResult + DatabaseListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseListResult + JobListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobListResult + DatabaseOperationListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseOperationListResult + JobStepAction = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepAction + DatabaseVulnerabilityAssessmentRuleBaselineItem = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseVulnerabilityAssessmentRuleBaselineItem + JobStepOutput = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepOutput ProxyResource = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ProxyResource + ExtendedDatabaseBlobAuditingPolicy = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ExtendedDatabaseBlobAuditingPolicy + ExtendedServerBlobAuditingPolicy = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ExtendedServerBlobAuditingPolicy + ServerBlobAuditingPolicy = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerBlobAuditingPolicy + DatabaseBlobAuditingPolicy = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseBlobAuditingPolicy DatabaseOperation = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseOperation TrackedResource = Azure::SQL::Mgmt::V2017_03_01_preview::Models::TrackedResource Database = Azure::SQL::Mgmt::V2017_03_01_preview::Models::Database ImportExportOperationResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ImportExportOperationResult - DatabaseRestorePoint = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseRestorePoint + DatabaseVulnerabilityAssessmentRuleBaseline = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseVulnerabilityAssessmentRuleBaseline + DatabaseVulnerabilityAssessment = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseVulnerabilityAssessment + DataWarehouseUserActivities = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DataWarehouseUserActivities + JobAgent = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgent + JobCredential = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobCredential + JobExecution = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecution + Job = Azure::SQL::Mgmt::V2017_03_01_preview::Models::Job + JobStep = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStep + JobTargetGroup = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTargetGroup + JobVersion = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobVersion + LongTermRetentionBackup = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackup + BackupLongTermRetentionPolicy = Azure::SQL::Mgmt::V2017_03_01_preview::Models::BackupLongTermRetentionPolicy + ManagedDatabase = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabase + RestorePoint = Azure::SQL::Mgmt::V2017_03_01_preview::Models::RestorePoint ServerAutomaticTuning = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerAutomaticTuning ServerDnsAlias = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerDnsAlias + BlobAuditingPolicyState = Azure::SQL::Mgmt::V2017_03_01_preview::Models::BlobAuditingPolicyState ManagementOperationState = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagementOperationState CreateMode = Azure::SQL::Mgmt::V2017_03_01_preview::Models::CreateMode SampleName = Azure::SQL::Mgmt::V2017_03_01_preview::Models::SampleName - Status = Azure::SQL::Mgmt::V2017_03_01_preview::Models::Status + DatabaseStatus = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseStatus CatalogCollationType = Azure::SQL::Mgmt::V2017_03_01_preview::Models::CatalogCollationType + JobAgentState = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgentState + JobExecutionLifecycle = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionLifecycle + ProvisioningState = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ProvisioningState + JobTargetType = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTargetType + JobScheduleType = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobScheduleType + JobStepActionType = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepActionType + JobStepActionSource = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepActionSource + JobStepOutputType = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepOutputType + JobTargetGroupMembershipType = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTargetGroupMembershipType + ManagedDatabaseStatus = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabaseStatus + ManagedDatabaseCreateMode = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabaseCreateMode RestorePointType = Azure::SQL::Mgmt::V2017_03_01_preview::Models::RestorePointType AutomaticTuningServerMode = Azure::SQL::Mgmt::V2017_03_01_preview::Models::AutomaticTuningServerMode AutomaticTuningOptionModeDesired = Azure::SQL::Mgmt::V2017_03_01_preview::Models::AutomaticTuningOptionModeDesired AutomaticTuningOptionModeActual = Azure::SQL::Mgmt::V2017_03_01_preview::Models::AutomaticTuningOptionModeActual AutomaticTuningServerReason = Azure::SQL::Mgmt::V2017_03_01_preview::Models::AutomaticTuningServerReason + LongTermRetentionDatabaseState = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionDatabaseState + VulnerabilityAssessmentPolicyBaselineName = Azure::SQL::Mgmt::V2017_03_01_preview::Models::VulnerabilityAssessmentPolicyBaselineName end # # SQLManagementClass # class SQLManagementClass - attr_reader :backup_long_term_retention_policies, :backup_long_term_retention_vaults, :recoverable_databases, :restorable_dropped_databases, :restore_points, :capabilities, :server_connection_policies, :database_threat_detection_policies, :data_masking_policies, :data_masking_rules, :transparent_data_encryption_configurations, :extensions, :disaster_recovery_configurations, :elastic_pools, :firewall_rules, :geo_backup_policies, :queries, :query_statistics, :query_texts, :replication_links, :server_azure_adadministrators, :server_communication_links, :service_objectives, :elastic_pool_activities, :elastic_pool_database_activities, :recommended_elastic_pools, :service_tier_advisors, :transparent_data_encryptions, :transparent_data_encryption_activities, :server_table_auditing_policies, :database_table_auditing_policies, :database_connection_policies, :server_usages, :database_usages, :database_advisors, :database_recommended_actions, :server_advisors, :database_blob_auditing_policies, :encryption_protectors, :failover_groups, :operations, :server_keys, :servers, :sync_agents, :sync_groups, :sync_members, :subscription_usages, :virtual_network_rules, :database_operations, :databases, :database_restore_points, :server_automatic_tuning_operations, :server_dns_aliases, :configurable, :base_url, :options, :model_classes + attr_reader :backup_long_term_retention_vaults, :recoverable_databases, :restorable_dropped_databases, :capabilities, :server_connection_policies, :database_threat_detection_policies, :data_masking_policies, :data_masking_rules, :transparent_data_encryption_configurations, :extensions, :disaster_recovery_configurations, :elastic_pools, :geo_backup_policies, :queries, :query_statistics, :query_texts, :recommended_elastic_pools, :replication_links, :server_azure_adadministrators, :server_communication_links, :service_objectives, :elastic_pool_activities, :elastic_pool_database_activities, :service_tier_advisors, :transparent_data_encryptions, :transparent_data_encryption_activities, :server_table_auditing_policies, :database_table_auditing_policies, :database_connection_policies, :server_usages, :database_usages, :database_advisors, :database_recommended_actions, :server_advisors, :database_automatic_tuning_operations, :encryption_protectors, :failover_groups, :firewall_rules, :managed_instances, :operations, :server_keys, :servers, :sync_agents, :sync_groups, :sync_members, :subscription_usages, :virtual_network_rules, :extended_database_blob_auditing_policies, :extended_server_blob_auditing_policies, :server_blob_auditing_policies, :database_blob_auditing_policies, :database_operations, :databases, :database_vulnerability_assessment_rule_baselines, :database_vulnerability_assessments, :data_warehouse_user_activities_operations, :job_agents, :job_credentials, :job_executions, :jobs, :job_step_executions, :job_steps, :job_target_executions, :job_target_groups, :job_versions, :long_term_retention_backups, :backup_long_term_retention_policies, :managed_databases, :restore_points, :server_automatic_tuning_operations, :server_dns_aliases, :configurable, :base_url, :options, :model_classes def initialize(options = {}) if options.is_a?(Hash) && options.length == 0 @@ -319,11 +393,9 @@ def initialize(options = {}) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) - @backup_long_term_retention_policies = @client_0.backup_long_term_retention_policies @backup_long_term_retention_vaults = @client_0.backup_long_term_retention_vaults @recoverable_databases = @client_0.recoverable_databases @restorable_dropped_databases = @client_0.restorable_dropped_databases - @restore_points = @client_0.restore_points @capabilities = @client_0.capabilities @server_connection_policies = @client_0.server_connection_policies @database_threat_detection_policies = @client_0.database_threat_detection_policies @@ -333,18 +405,17 @@ def initialize(options = {}) @extensions = @client_0.extensions @disaster_recovery_configurations = @client_0.disaster_recovery_configurations @elastic_pools = @client_0.elastic_pools - @firewall_rules = @client_0.firewall_rules @geo_backup_policies = @client_0.geo_backup_policies @queries = @client_0.queries @query_statistics = @client_0.query_statistics @query_texts = @client_0.query_texts + @recommended_elastic_pools = @client_0.recommended_elastic_pools @replication_links = @client_0.replication_links @server_azure_adadministrators = @client_0.server_azure_adadministrators @server_communication_links = @client_0.server_communication_links @service_objectives = @client_0.service_objectives @elastic_pool_activities = @client_0.elastic_pool_activities @elastic_pool_database_activities = @client_0.elastic_pool_database_activities - @recommended_elastic_pools = @client_0.recommended_elastic_pools @service_tier_advisors = @client_0.service_tier_advisors @transparent_data_encryptions = @client_0.transparent_data_encryptions @transparent_data_encryption_activities = @client_0.transparent_data_encryption_activities @@ -362,9 +433,11 @@ def initialize(options = {}) @database_advisors = @client_1.database_advisors @database_recommended_actions = @client_1.database_recommended_actions @server_advisors = @client_1.server_advisors - @database_blob_auditing_policies = @client_1.database_blob_auditing_policies + @database_automatic_tuning_operations = @client_1.database_automatic_tuning_operations @encryption_protectors = @client_1.encryption_protectors @failover_groups = @client_1.failover_groups + @firewall_rules = @client_1.firewall_rules + @managed_instances = @client_1.managed_instances @operations = @client_1.operations @server_keys = @client_1.server_keys @servers = @client_1.servers @@ -379,9 +452,28 @@ def initialize(options = {}) @client_2.subscription_id = configurable.subscription_id end add_telemetry(@client_2) + @extended_database_blob_auditing_policies = @client_2.extended_database_blob_auditing_policies + @extended_server_blob_auditing_policies = @client_2.extended_server_blob_auditing_policies + @server_blob_auditing_policies = @client_2.server_blob_auditing_policies + @database_blob_auditing_policies = @client_2.database_blob_auditing_policies @database_operations = @client_2.database_operations @databases = @client_2.databases - @database_restore_points = @client_2.database_restore_points + @database_vulnerability_assessment_rule_baselines = @client_2.database_vulnerability_assessment_rule_baselines + @database_vulnerability_assessments = @client_2.database_vulnerability_assessments + @data_warehouse_user_activities_operations = @client_2.data_warehouse_user_activities_operations + @job_agents = @client_2.job_agents + @job_credentials = @client_2.job_credentials + @job_executions = @client_2.job_executions + @jobs = @client_2.jobs + @job_step_executions = @client_2.job_step_executions + @job_steps = @client_2.job_steps + @job_target_executions = @client_2.job_target_executions + @job_target_groups = @client_2.job_target_groups + @job_versions = @client_2.job_versions + @long_term_retention_backups = @client_2.long_term_retention_backups + @backup_long_term_retention_policies = @client_2.backup_long_term_retention_policies + @managed_databases = @client_2.managed_databases + @restore_points = @client_2.restore_points @server_automatic_tuning_operations = @client_2.server_automatic_tuning_operations @server_dns_aliases = @client_2.server_dns_aliases @@ -408,191 +500,182 @@ def method_missing(method, *args) end class ModelClasses - def firewall_rule_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::FirewallRuleListResult - end - def disaster_recovery_configuration_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::DisasterRecoveryConfigurationListResult - end - def server_administrator_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::ServerAdministratorListResult - end - def server_usage - Azure::SQL::Mgmt::V2014_04_01::Models::ServerUsage - end - def service_tier_advisor_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::ServiceTierAdvisorListResult - end - def replication_link_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::ReplicationLinkListResult - end - def elastic_pool_database_activity_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDatabaseActivityListResult - end - def recommended_elastic_pool_metric - Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolMetric - end - def elastic_pool_activity_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolActivityListResult - end - def server_usage_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::ServerUsageListResult - end - def recoverable_database_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::RecoverableDatabaseListResult + def metric_value + Azure::SQL::Mgmt::V2014_04_01::Models::MetricValue end - def query_text_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::QueryTextListResult + def service_objective_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::ServiceObjectiveListResult end - def restorable_dropped_database_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::RestorableDroppedDatabaseListResult + def data_masking_rule_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::DataMaskingRuleListResult end def query_text Azure::SQL::Mgmt::V2014_04_01::Models::QueryText end - def restore_point_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::RestorePointListResult - end - def query_statistic_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::QueryStatisticListResult - end - def service_objective_capability - Azure::SQL::Mgmt::V2014_04_01::Models::ServiceObjectiveCapability - end - def data_masking_rule_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::DataMaskingRuleListResult - end - def elastic_pool_per_database_min_dtu_capability - Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolPerDatabaseMinDtuCapability + def database_usage_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseUsageListResult end def transparent_data_encryption_list_result Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionListResult end - def elastic_pool_dtu_capability - Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDtuCapability + def database_usage + Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseUsage end def extension_list_result Azure::SQL::Mgmt::V2014_04_01::Models::ExtensionListResult end - def server_version_capability - Azure::SQL::Mgmt::V2014_04_01::Models::ServerVersionCapability + def server_usage_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::ServerUsageListResult end - def top_queries_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::TopQueriesListResult + def server_communication_link_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::ServerCommunicationLinkListResult end - def check_name_availability_request - Azure::SQL::Mgmt::V2014_04_01::Models::CheckNameAvailabilityRequest + def server_usage + Azure::SQL::Mgmt::V2014_04_01::Models::ServerUsage end - def top_queries - Azure::SQL::Mgmt::V2014_04_01::Models::TopQueries + def disaster_recovery_configuration_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::DisasterRecoveryConfigurationListResult end - def transparent_data_encryption_activity_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivityListResult + def max_size_capability + Azure::SQL::Mgmt::V2014_04_01::Models::MaxSizeCapability end - def query_statistic - Azure::SQL::Mgmt::V2014_04_01::Models::QueryStatistic + def server_administrator_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::ServerAdministratorListResult end - def query_interval - Azure::SQL::Mgmt::V2014_04_01::Models::QueryInterval + def edition_capability + Azure::SQL::Mgmt::V2014_04_01::Models::EditionCapability end - def operation_impact - Azure::SQL::Mgmt::V2014_04_01::Models::OperationImpact + def elastic_pool_per_database_max_dtu_capability + Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolPerDatabaseMaxDtuCapability end def elastic_pool_list_result Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolListResult end - def server_communication_link_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::ServerCommunicationLinkListResult + def elastic_pool_edition_capability + Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolEditionCapability end - def query_metric - Azure::SQL::Mgmt::V2014_04_01::Models::QueryMetric + def replication_link_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::ReplicationLinkListResult end - def advisor_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::AdvisorListResult + def location_capabilities + Azure::SQL::Mgmt::V2014_04_01::Models::LocationCapabilities end - def backup_long_term_retention_vault_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionVaultListResult + def check_name_availability_response + Azure::SQL::Mgmt::V2014_04_01::Models::CheckNameAvailabilityResponse end - def recommended_elastic_pool_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolListResult + def recommended_elastic_pool_list_metrics_result + Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolListMetricsResult + end + def slo_usage_metric + Azure::SQL::Mgmt::V2014_04_01::Models::SloUsageMetric end def geo_backup_policy_list_result Azure::SQL::Mgmt::V2014_04_01::Models::GeoBackupPolicyListResult end - def max_size_capability - Azure::SQL::Mgmt::V2014_04_01::Models::MaxSizeCapability + def table_auditing_policy_properties + Azure::SQL::Mgmt::V2014_04_01::Models::TableAuditingPolicyProperties end def import_extension_request Azure::SQL::Mgmt::V2014_04_01::Models::ImportExtensionRequest end - def elastic_pool_per_database_max_dtu_capability - Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolPerDatabaseMaxDtuCapability + def transparent_data_encryption_activity_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivityListResult end - def database_usage_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseUsageListResult + def recommended_elastic_pool_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolListResult end - def location_capabilities - Azure::SQL::Mgmt::V2014_04_01::Models::LocationCapabilities + def elastic_pool_database_activity_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDatabaseActivityListResult end - def database_usage - Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseUsage + def recommended_elastic_pool_metric + Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolMetric end - def slo_usage_metric - Azure::SQL::Mgmt::V2014_04_01::Models::SloUsageMetric + def elastic_pool_activity_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolActivityListResult end def export_request Azure::SQL::Mgmt::V2014_04_01::Models::ExportRequest end - def database_table_auditing_policy_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseTableAuditingPolicyListResult - end - def metric_value - Azure::SQL::Mgmt::V2014_04_01::Models::MetricValue + def query_text_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::QueryTextListResult end - def backup_long_term_retention_policy_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionPolicyListResult + def backup_long_term_retention_vault_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionVaultListResult end def metric_name Azure::SQL::Mgmt::V2014_04_01::Models::MetricName end - def service_objective_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::ServiceObjectiveListResult + def restorable_dropped_database_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::RestorableDroppedDatabaseListResult end def metric Azure::SQL::Mgmt::V2014_04_01::Models::Metric end - def elastic_pool_edition_capability - Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolEditionCapability + def elastic_pool_per_database_min_dtu_capability + Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolPerDatabaseMinDtuCapability end def metric_list_result Azure::SQL::Mgmt::V2014_04_01::Models::MetricListResult end - def table_auditing_policy_properties - Azure::SQL::Mgmt::V2014_04_01::Models::TableAuditingPolicyProperties + def server_version_capability + Azure::SQL::Mgmt::V2014_04_01::Models::ServerVersionCapability end def metric_availability Azure::SQL::Mgmt::V2014_04_01::Models::MetricAvailability end - def recommended_elastic_pool_list_metrics_result - Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPoolListMetricsResult + def server_table_auditing_policy_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::ServerTableAuditingPolicyListResult end def metric_definition Azure::SQL::Mgmt::V2014_04_01::Models::MetricDefinition end - def check_name_availability_response - Azure::SQL::Mgmt::V2014_04_01::Models::CheckNameAvailabilityResponse + def operation_impact + Azure::SQL::Mgmt::V2014_04_01::Models::OperationImpact end def metric_definition_list_result Azure::SQL::Mgmt::V2014_04_01::Models::MetricDefinitionListResult end - def edition_capability - Azure::SQL::Mgmt::V2014_04_01::Models::EditionCapability + def backup_long_term_retention_policy_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionPolicyListResult end - def server_table_auditing_policy_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::ServerTableAuditingPolicyListResult + def service_objective_capability + Azure::SQL::Mgmt::V2014_04_01::Models::ServiceObjectiveCapability end - def backup_long_term_retention_policy - Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionPolicy + def check_name_availability_request + Azure::SQL::Mgmt::V2014_04_01::Models::CheckNameAvailabilityRequest + end + def query_metric + Azure::SQL::Mgmt::V2014_04_01::Models::QueryMetric + end + def service_tier_advisor_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::ServiceTierAdvisorListResult + end + def query_interval + Azure::SQL::Mgmt::V2014_04_01::Models::QueryInterval + end + def recoverable_database_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::RecoverableDatabaseListResult + end + def query_statistic + Azure::SQL::Mgmt::V2014_04_01::Models::QueryStatistic + end + def database_table_auditing_policy_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseTableAuditingPolicyListResult + end + def top_queries + Azure::SQL::Mgmt::V2014_04_01::Models::TopQueries + end + def elastic_pool_dtu_capability + Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDtuCapability + end + def top_queries_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::TopQueriesListResult + end + def advisor_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::AdvisorListResult + end + def query_statistic_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::QueryStatisticListResult end def backup_long_term_retention_vault Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionVault @@ -603,9 +686,6 @@ def recoverable_database def restorable_dropped_database Azure::SQL::Mgmt::V2014_04_01::Models::RestorableDroppedDatabase end - def restore_point - Azure::SQL::Mgmt::V2014_04_01::Models::RestorePoint - end def server_connection_policy Azure::SQL::Mgmt::V2014_04_01::Models::ServerConnectionPolicy end @@ -618,18 +698,6 @@ def transparent_data_encryption def recommended_index Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedIndex end - def transparent_data_encryption_activity - Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivity - end - def elastic_pool_database_activity - Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDatabaseActivity - end - def elastic_pool_activity - Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolActivity - end - def recommended_elastic_pool - Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPool - end def database_security_alert_policy Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseSecurityAlertPolicy end @@ -648,9 +716,6 @@ def elastic_pool def elastic_pool_update Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolUpdate end - def firewall_rule - Azure::SQL::Mgmt::V2014_04_01::Models::FirewallRule - end def geo_backup_policy Azure::SQL::Mgmt::V2014_04_01::Models::GeoBackupPolicy end @@ -660,6 +725,9 @@ def import_export_response def import_request Azure::SQL::Mgmt::V2014_04_01::Models::ImportRequest end + def recommended_elastic_pool + Azure::SQL::Mgmt::V2014_04_01::Models::RecommendedElasticPool + end def replication_link Azure::SQL::Mgmt::V2014_04_01::Models::ReplicationLink end @@ -672,6 +740,15 @@ def server_communication_link def service_objective Azure::SQL::Mgmt::V2014_04_01::Models::ServiceObjective end + def elastic_pool_activity + Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolActivity + end + def elastic_pool_database_activity + Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDatabaseActivity + end + def transparent_data_encryption_activity + Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivity + end def database_connection_policy Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseConnectionPolicy end @@ -720,12 +797,6 @@ def recommended_index_type def read_scale Azure::SQL::Mgmt::V2014_04_01::Models::ReadScale end - def transparent_data_encryption_activity_status - Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivityStatus - end - def elastic_pool_edition - Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolEdition - end def security_alert_policy_state Azure::SQL::Mgmt::V2014_04_01::Models::SecurityAlertPolicyState end @@ -759,6 +830,9 @@ def disaster_recovery_configuration_role def elastic_pool_state Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolState end + def elastic_pool_edition + Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolEdition + end def geo_backup_policy_state Azure::SQL::Mgmt::V2014_04_01::Models::GeoBackupPolicyState end @@ -801,122 +875,143 @@ def server_version def server_state Azure::SQL::Mgmt::V2014_04_01::Models::ServerState end - def server_key_list_result - Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerKeyListResult + def transparent_data_encryption_activity_status + Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivityStatus + end + def operation_display + Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationDisplay + end + def operation + Azure::SQL::Mgmt::V2015_05_01_preview::Models::Operation + end + def recommended_action_implementation_info + Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionImplementationInfo + end + def operation_list_result + Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationListResult + end + def recommended_action_impact_record + Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionImpactRecord + end + def managed_instance_update + Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstanceUpdate + end + def firewall_rule_list + Azure::SQL::Mgmt::V2015_05_01_preview::Models::FirewallRuleList end def resource_identity Azure::SQL::Mgmt::V2015_05_01_preview::Models::ResourceIdentity end + def sync_group_schema + Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchema + end + def sync_database_id_list_result + Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncDatabaseIdListResult + end + def sync_group_schema_table + Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchemaTable + end + def sync_full_schema_table + Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaTable + end + def sync_group_schema_table_column + Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchemaTableColumn + end + def managed_instance_list_result + Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstanceListResult + end + def encryption_protector_list_result + Azure::SQL::Mgmt::V2015_05_01_preview::Models::EncryptionProtectorListResult + end + def sync_full_schema_table_column + Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaTableColumn + end + def failover_group_read_only_endpoint + Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupReadOnlyEndpoint + end def recommended_action_state_info Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionStateInfo end + def sync_group_log_properties + Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupLogProperties + end def recommended_action_error_info Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionErrorInfo end - def server_list_result - Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerListResult + def failover_group_list_result + Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupListResult end def recommended_action_metric_info Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionMetricInfo end - def virtual_network_rule_list_result - Azure::SQL::Mgmt::V2015_05_01_preview::Models::VirtualNetworkRuleListResult - end - def recommended_action_impact_record - Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionImpactRecord - end - def sync_group_list_result - Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupListResult + def sync_full_schema_properties_list_result + Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaPropertiesListResult end - def sync_group_schema - Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchema + def firewall_rule_list_result + Azure::SQL::Mgmt::V2015_05_01_preview::Models::FirewallRuleListResult end - def sync_group_log_properties - Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupLogProperties + def server_key_list_result + Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerKeyListResult end - def failover_group_read_write_endpoint - Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupReadWriteEndpoint + def virtual_network_rule_list_result + Azure::SQL::Mgmt::V2015_05_01_preview::Models::VirtualNetworkRuleListResult end def sync_group_log_list_result Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupLogListResult end + def server_list_result + Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerListResult + end def partner_info Azure::SQL::Mgmt::V2015_05_01_preview::Models::PartnerInfo end def server_update Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerUpdate end - def failover_group_update - Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupUpdate + def resource_with_writable_name + Azure::SQL::Mgmt::V2015_05_01_preview::Models::ResourceWithWritableName end def subscription_usage_list_result Azure::SQL::Mgmt::V2015_05_01_preview::Models::SubscriptionUsageListResult end - def operation_display - Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationDisplay + def sync_group_list_result + Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupListResult end def sync_agent_list_result Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncAgentListResult end - def operation_list_result - Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationListResult + def failover_group_read_write_endpoint + Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupReadWriteEndpoint end def sync_agent_key_properties Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncAgentKeyProperties end - def sync_full_schema_properties_list_result - Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaPropertiesListResult - end - def recommended_action_implementation_info - Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedActionImplementationInfo + def sync_full_schema_properties + Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaProperties end def sync_member_list_result Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncMemberListResult end - def failover_group_read_only_endpoint - Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupReadOnlyEndpoint + def failover_group_update + Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupUpdate end def sync_agent_linked_database_list_result Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncAgentLinkedDatabaseListResult end - def failover_group_list_result - Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupListResult + def automatic_tuning_options + Azure::SQL::Mgmt::V2015_05_01_preview::Models::AutomaticTuningOptions end def sync_database_id_properties Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncDatabaseIdProperties end - def sync_group_schema_table_column - Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchemaTableColumn - end - def sync_database_id_list_result - Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncDatabaseIdListResult - end - def sync_group_schema_table - Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupSchemaTable - end - def sync_full_schema_table_column - Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaTableColumn - end - def encryption_protector_list_result - Azure::SQL::Mgmt::V2015_05_01_preview::Models::EncryptionProtectorListResult - end - def sync_full_schema_table - Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaTable - end - def operation - Azure::SQL::Mgmt::V2015_05_01_preview::Models::Operation - end - def sync_full_schema_properties - Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaProperties - end def recommended_action Azure::SQL::Mgmt::V2015_05_01_preview::Models::RecommendedAction end def advisor Azure::SQL::Mgmt::V2015_05_01_preview::Models::Advisor end - def database_blob_auditing_policy - Azure::SQL::Mgmt::V2015_05_01_preview::Models::DatabaseBlobAuditingPolicy + def database_automatic_tuning + Azure::SQL::Mgmt::V2015_05_01_preview::Models::DatabaseAutomaticTuning end def encryption_protector Azure::SQL::Mgmt::V2015_05_01_preview::Models::EncryptionProtector @@ -924,6 +1019,15 @@ def encryption_protector def failover_group Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroup end + def proxy_resource_with_writable_name + Azure::SQL::Mgmt::V2015_05_01_preview::Models::ProxyResourceWithWritableName + end + def firewall_rule + Azure::SQL::Mgmt::V2015_05_01_preview::Models::FirewallRule + end + def managed_instance + Azure::SQL::Mgmt::V2015_05_01_preview::Models::ManagedInstance + end def server_key Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerKey end @@ -969,8 +1073,11 @@ def implementation_method def is_retryable Azure::SQL::Mgmt::V2015_05_01_preview::Models::IsRetryable end - def blob_auditing_policy_state - Azure::SQL::Mgmt::V2015_05_01_preview::Models::BlobAuditingPolicyState + def automatic_tuning_mode + Azure::SQL::Mgmt::V2015_05_01_preview::Models::AutomaticTuningMode + end + def automatic_tuning_disabled_reason + Azure::SQL::Mgmt::V2015_05_01_preview::Models::AutomaticTuningDisabledReason end def server_key_type Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerKeyType @@ -984,12 +1091,12 @@ def read_only_endpoint_failover_policy def failover_group_replication_role Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupReplicationRole end - def operation_origin - Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationOrigin - end def identity_type Azure::SQL::Mgmt::V2015_05_01_preview::Models::IdentityType end + def operation_origin + Azure::SQL::Mgmt::V2015_05_01_preview::Models::OperationOrigin + end def sync_agent_state Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncAgentState end @@ -1014,45 +1121,117 @@ def sync_member_state def virtual_network_rule_state Azure::SQL::Mgmt::V2015_05_01_preview::Models::VirtualNetworkRuleState end + def job_schedule + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobSchedule + end + def job_credential_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobCredentialListResult + end + def vulnerability_assessment_recurring_scans_properties + Azure::SQL::Mgmt::V2017_03_01_preview::Models::VulnerabilityAssessmentRecurringScansProperties + end + def managed_database_update + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabaseUpdate + end + def job_target_group_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTargetGroupListResult + end + def resource_move_definition + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ResourceMoveDefinition + end + def server_dns_alias_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerDnsAliasListResult + end + def restore_point_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::RestorePointListResult + end + def job_target + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTarget + end + def long_term_retention_backup_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackupListResult + end + def job_agent_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgentListResult + end + def create_database_restore_point_definition + Azure::SQL::Mgmt::V2017_03_01_preview::Models::CreateDatabaseRestorePointDefinition + end + def job_agent_update + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgentUpdate + end def database_update Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseUpdate end + def job_step_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepListResult + end + def job_version_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobVersionListResult + end + def server_dns_alias_acquisition + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerDnsAliasAcquisition + end def automatic_tuning_server_options Azure::SQL::Mgmt::V2017_03_01_preview::Models::AutomaticTuningServerOptions end - def database_operation_list_result - Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseOperationListResult + def job_execution_target + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionTarget end - def create_database_restore_point_definition - Azure::SQL::Mgmt::V2017_03_01_preview::Models::CreateDatabaseRestorePointDefinition + def complete_database_restore_definition + Azure::SQL::Mgmt::V2017_03_01_preview::Models::CompleteDatabaseRestoreDefinition + end + def job_step_execution_options + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepExecutionOptions end - def database_restore_point_list_result - Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseRestorePointListResult + def sku + Azure::SQL::Mgmt::V2017_03_01_preview::Models::Sku end - def arm_sku - Azure::SQL::Mgmt::V2017_03_01_preview::Models::ArmSku + def job_execution_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionListResult end def import_export_database_definition Azure::SQL::Mgmt::V2017_03_01_preview::Models::ImportExportDatabaseDefinition end + def resource + Azure::SQL::Mgmt::V2017_03_01_preview::Models::Resource + end + def managed_database_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabaseListResult + end def database_list_result Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseListResult end - def server_dns_alias_list_result - Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerDnsAliasListResult + def job_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobListResult end - def resource_move_definition - Azure::SQL::Mgmt::V2017_03_01_preview::Models::ResourceMoveDefinition + def database_operation_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseOperationListResult end - def resource - Azure::SQL::Mgmt::V2017_03_01_preview::Models::Resource + def job_step_action + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepAction end - def server_dns_alias_acquisition - Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerDnsAliasAcquisition + def database_vulnerability_assessment_rule_baseline_item + Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseVulnerabilityAssessmentRuleBaselineItem + end + def job_step_output + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepOutput end def proxy_resource Azure::SQL::Mgmt::V2017_03_01_preview::Models::ProxyResource end + def extended_database_blob_auditing_policy + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ExtendedDatabaseBlobAuditingPolicy + end + def extended_server_blob_auditing_policy + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ExtendedServerBlobAuditingPolicy + end + def server_blob_auditing_policy + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerBlobAuditingPolicy + end + def database_blob_auditing_policy + Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseBlobAuditingPolicy + end def database_operation Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseOperation end @@ -1065,8 +1244,47 @@ def database def import_export_operation_result Azure::SQL::Mgmt::V2017_03_01_preview::Models::ImportExportOperationResult end - def database_restore_point - Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseRestorePoint + def database_vulnerability_assessment_rule_baseline + Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseVulnerabilityAssessmentRuleBaseline + end + def database_vulnerability_assessment + Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseVulnerabilityAssessment + end + def data_warehouse_user_activities + Azure::SQL::Mgmt::V2017_03_01_preview::Models::DataWarehouseUserActivities + end + def job_agent + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgent + end + def job_credential + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobCredential + end + def job_execution + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecution + end + def job + Azure::SQL::Mgmt::V2017_03_01_preview::Models::Job + end + def job_step + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStep + end + def job_target_group + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTargetGroup + end + def job_version + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobVersion + end + def long_term_retention_backup + Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackup + end + def backup_long_term_retention_policy + Azure::SQL::Mgmt::V2017_03_01_preview::Models::BackupLongTermRetentionPolicy + end + def managed_database + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabase + end + def restore_point + Azure::SQL::Mgmt::V2017_03_01_preview::Models::RestorePoint end def server_automatic_tuning Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerAutomaticTuning @@ -1074,6 +1292,9 @@ def server_automatic_tuning def server_dns_alias Azure::SQL::Mgmt::V2017_03_01_preview::Models::ServerDnsAlias end + def blob_auditing_policy_state + Azure::SQL::Mgmt::V2017_03_01_preview::Models::BlobAuditingPolicyState + end def management_operation_state Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagementOperationState end @@ -1083,12 +1304,45 @@ def create_mode def sample_name Azure::SQL::Mgmt::V2017_03_01_preview::Models::SampleName end - def status - Azure::SQL::Mgmt::V2017_03_01_preview::Models::Status + def database_status + Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseStatus end def catalog_collation_type Azure::SQL::Mgmt::V2017_03_01_preview::Models::CatalogCollationType end + def job_agent_state + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobAgentState + end + def job_execution_lifecycle + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionLifecycle + end + def provisioning_state + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ProvisioningState + end + def job_target_type + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTargetType + end + def job_schedule_type + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobScheduleType + end + def job_step_action_type + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepActionType + end + def job_step_action_source + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepActionSource + end + def job_step_output_type + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepOutputType + end + def job_target_group_membership_type + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobTargetGroupMembershipType + end + def managed_database_status + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabaseStatus + end + def managed_database_create_mode + Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabaseCreateMode + end def restore_point_type Azure::SQL::Mgmt::V2017_03_01_preview::Models::RestorePointType end @@ -1104,6 +1358,12 @@ def automatic_tuning_option_mode_actual def automatic_tuning_server_reason Azure::SQL::Mgmt::V2017_03_01_preview::Models::AutomaticTuningServerReason end + def long_term_retention_database_state + Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionDatabaseState + end + def vulnerability_assessment_policy_baseline_name + Azure::SQL::Mgmt::V2017_03_01_preview::Models::VulnerabilityAssessmentPolicyBaselineName + end end end end