From c966a3aec3cf4f33160f2d33a0642492fccc0432 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 9 Nov 2018 22:46:22 +0000 Subject: [PATCH 1/3] Generated from 73c3ebb5e203fc53ce5cdb52d31170729775848f Added missing PATCH operation to Api Issue resource --- .../modules/apimanagement_profile_module.rb | 142 +- .../modules/automation_profile_module.rb | 102 +- .../latest/modules/batch_profile_module.rb | 88 +- .../latest/modules/billing_profile_module.rb | 6 +- .../lib/latest/modules/cdn_profile_module.rb | 110 +- .../cognitiveservices_profile_module.rb | 26 +- .../latest/modules/compute_profile_module.rb | 64 +- .../modules/consumption_profile_module.rb | 48 +- .../containerinstance_profile_module.rb | 32 +- .../containerregistry_profile_module.rb | 78 +- .../containerservice_profile_module.rb | 22 +- .../contentmoderator_profile_module.rb | 148 +- .../customerinsights_profile_module.rb | 8 +- .../modules/customsearch_profile_module.rb | 16 +- .../datalakeanalytics_profile_module.rb | 14 +- .../modules/datalakestore_profile_module.rb | 14 +- .../modules/devspaces_profile_module.rb | 14 +- .../modules/devtestlabs_profile_module.rb | 50 +- .../lib/latest/modules/dns_profile_module.rb | 8 +- .../modules/entitysearch_profile_module.rb | 12 +- .../modules/eventgrid_profile_module.rb | 6 +- .../latest/modules/eventhub_profile_module.rb | 6 +- .../lib/latest/modules/face_profile_module.rb | 38 +- .../latest/modules/features_profile_module.rb | 8 +- .../modules/graphrbac_profile_module.rb | 8 +- .../modules/imagesearch_profile_module.rb | 8 +- .../modules/iotcentral_profile_module.rb | 6 +- .../latest/modules/iothub_profile_module.rb | 14 +- .../latest/modules/keyvault_profile_module.rb | 26 +- .../latest/modules/links_profile_module.rb | 14 +- .../latest/modules/locks_profile_module.rb | 8 +- .../latest/modules/logic_profile_module.rb | 56 +- .../modules/machinelearning_profile_module.rb | 8 +- .../managedapplications_profile_module.rb | 8 +- .../managedserviceidentity_profile_module.rb | 8 +- .../marketplaceordering_profile_module.rb | 14 +- .../modules/mediaservices_profile_module.rb | 120 +- .../latest/modules/monitor_profile_module.rb | 42 +- .../latest/modules/network_profile_module.rb | 210 +- .../modules/newssearch_profile_module.rb | 20 +- .../notificationhubs_profile_module.rb | 6 +- .../operationalinsights_profile_module.rb | 26 +- .../latest/modules/policy_profile_module.rb | 14 +- .../modules/policyinsights_profile_module.rb | 42 +- .../modules/powerbiembedded_profile_module.rb | 40 +- .../recoveryservices_profile_module.rb | 14 +- .../recoveryservicesbackup_profile_module.rb | 50 +- ...veryservicessiterecovery_profile_module.rb | 88 +- .../latest/modules/redis_profile_module.rb | 18 +- .../latest/modules/relay_profile_module.rb | 58 +- .../modules/resources_profile_module.rb | 30 +- .../resourcesmanagement_profile_module.rb | 60 +- .../modules/scheduler_profile_module.rb | 30 +- .../latest/modules/search_profile_module.rb | 14 +- .../latest/modules/security_profile_module.rb | 14 +- .../modules/servicebus_profile_module.rb | 66 +- .../modules/servicefabric_profile_module.rb | 56 +- .../latest/modules/signalr_profile_module.rb | 28 +- .../modules/spellcheck_profile_module.rb | 8 +- .../lib/latest/modules/sql_profile_module.rb | 58 +- .../latest/modules/storage_profile_module.rb | 64 +- .../storsimple8000series_profile_module.rb | 44 +- .../modules/streamanalytics_profile_module.rb | 108 +- .../lib/latest/modules/web_profile_module.rb | 234 +- .../modules/websearch_profile_module.rb | 48 +- .../modules/compute_profile_module.rb | 8 +- .../v2017_03_09/modules/dns_profile_module.rb | 14 +- .../modules/features_profile_module.rb | 8 +- .../modules/keyvault_profile_module.rb | 40 +- .../modules/links_profile_module.rb | 14 +- .../modules/network_profile_module.rb | 38 +- .../modules/resources_profile_module.rb | 26 +- .../modules/storage_profile_module.rb | 42 +- .../modules/compute_profile_module.rb | 8 +- .../v2018_03_01/modules/dns_profile_module.rb | 14 +- .../modules/keyvault_profile_module.rb | 40 +- .../modules/locks_profile_module.rb | 8 +- .../modules/network_profile_module.rb | 312 +- .../modules/resources_profile_module.rb | 42 +- .../modules/storage_profile_module.rb | 42 +- .../api_management_client.rb | 18 +- .../api_management_services.rb | 263 +- .../api_operations.rb | 120 +- .../azure_mgmt_api_management/api_products.rb | 36 +- .../azure_mgmt_api_management/apis.rb | 122 +- .../authorization_servers.rb | 97 +- .../azure_mgmt_api_management/backends.rb | 105 +- .../azure_mgmt_api_management/certificates.rb | 80 +- .../azure_mgmt_api_management/group_users.rb | 76 +- .../azure_mgmt_api_management/groups.rb | 105 +- .../identity_providers.rb | 74 +- .../azure_mgmt_api_management/loggers.rb | 95 +- .../models/access_information_contract.rb | 5 - .../access_information_update_parameters.rb | 2 - .../models/additional_region.rb | 7 - .../models/api_collection.rb | 5 - .../models/api_contract.rb | 11 - .../models/api_export_result.rb | 4 - ...ement_service_backup_restore_parameters.rb | 5 - .../api_management_service_base_parameters.rb | 24 - ...vice_check_name_availability_parameters.rb | 2 - ...management_service_get_sso_token_result.rb | 2 - .../api_management_service_list_result.rb | 4 - ...t_service_manage_deployments_parameters.rb | 8 - ...gement_service_name_availability_result.rb | 4 - .../models/api_management_service_resource.rb | 29 - .../api_management_service_sku_properties.rb | 3 - ...ment_service_update_hostname_parameters.rb | 5 - ...t_service_upload_certificate_parameters.rb | 4 - .../authentication_settings_contract.rb | 2 - .../models/authorization_server_collection.rb | 5 - .../models/backend_collection.rb | 5 - .../models/backend_contract.rb | 3 - .../models/backend_response.rb | 4 - .../models/backend_update_parameters.rb | 3 - .../models/certificate_collection.rb | 5 - .../models/certificate_contract.rb | 5 - ...certificate_create_or_update_parameters.rb | 3 - .../models/certificate_information.rb | 4 - .../models/deploy_configuration_parameters.rb | 3 - .../models/error_body_contract.rb | 5 - .../models/error_field_contract.rb | 4 - .../models/error_response.rb | 3 - .../models/generate_sso_url_result.rb | 2 - .../models/group_collection.rb | 5 - .../models/group_contract.rb | 7 - .../models/group_create_parameters.rb | 5 - .../models/group_update_parameters.rb | 5 - .../models/hostname_configuration.rb | 4 - .../models/identity_provider_contract.rb | 6 - .../models/identity_provider_list.rb | 3 - .../identity_provider_update_parameters.rb | 5 - .../models/logger_collection.rb | 5 - .../models/logger_create_parameters.rb | 6 - .../models/logger_response.rb | 7 - .../models/logger_update_parameters.rb | 6 - .../oauth2authentication_settings_contract.rb | 3 - .../oauth2authorization_server_contract.rb | 23 - ...th2authorization_server_update_contract.rb | 22 - .../open_id_connect_provider_collection.rb | 5 - .../openid_connect_provider_contract.rb | 7 - ...openid_connect_provider_create_contract.rb | 6 - ...openid_connect_provider_update_contract.rb | 6 - .../models/operation_collection.rb | 5 - .../models/operation_contract.rb | 11 - .../models/operation_result_contract.rb | 7 - .../models/parameter_contract.rb | 8 - .../models/patch_parameters.rb | 2 - .../models/policy_snippet_contract.rb | 5 - .../models/product_collection.rb | 5 - .../models/product_contract.rb | 9 - .../models/product_update_parameters.rb | 8 - .../models/property_collection.rb | 5 - .../models/property_contract.rb | 7 - .../models/property_create_parameters.rb | 6 - .../models/property_update_parameters.rb | 6 - .../models/quota_counter_collection.rb | 5 - .../models/quota_counter_contract.rb | 7 - .../models/quota_counter_value_contract.rb | 3 - .../models/region_contract.rb | 3 - .../models/region_list_result.rb | 3 - .../models/report_collection.rb | 5 - .../models/report_record_contract.rb | 27 - .../models/representation_contract.rb | 3 - .../models/request_contract.rb | 8 - .../models/result_contract.rb | 5 - .../models/save_configuration_parameter.rb | 3 - .../models/subscription_collection.rb | 5 - .../models/subscription_contract.rb | 14 - .../models/subscription_create_parameters.rb | 7 - ...bscription_key_parameter_names_contract.rb | 3 - .../models/subscription_update_parameters.rb | 9 - ...enant_configuration_sync_state_contract.rb | 8 - .../tenant_long_running_operation_result.rb | 6 - .../models/token_body_parameter_contract.rb | 3 - .../models/user_collection.rb | 5 - .../models/user_contract.rb | 10 - .../models/user_create_parameters.rb | 7 - .../models/user_identity_contract.rb | 3 - .../models/user_update_parameters.rb | 7 - .../models/virtual_network_configuration.rb | 5 - .../open_id_connect_providers.rb | 95 +- .../policy_snippets.rb | 16 +- .../azure_mgmt_api_management/product_apis.rb | 76 +- .../product_groups.rb | 76 +- .../product_subscriptions.rb | 36 +- .../azure_mgmt_api_management/products.rb | 105 +- .../azure_mgmt_api_management/property.rb | 95 +- .../quota_by_counter_keys.rb | 30 +- .../quota_by_period_keys.rb | 30 +- .../azure_mgmt_api_management/regions.rb | 14 +- .../azure_mgmt_api_management/reports.rb | 33 +- .../subscriptions.rb | 124 +- .../tenant_access.rb | 58 +- .../tenant_access_git.rb | 42 +- .../tenant_configuration.rb | 72 +- .../tenant_configuration_sync_state.rb | 14 +- .../azure_mgmt_api_management/user_groups.rb | 36 +- .../user_identities.rb | 19 +- .../user_subscriptions.rb | 36 +- .../azure_mgmt_api_management/users.rb | 122 +- .../azure_mgmt_api_management/version.rb | 8 + .../azure_mgmt_api_management/api_export.rb | 17 +- .../api_management_client.rb | 18 +- .../api_management_operations.rb | 28 +- .../api_management_services.rb | 285 +- .../api_operations.rb | 120 +- .../api_operations_policy.rb | 65 +- .../azure_mgmt_api_management/api_policy.rb | 56 +- .../azure_mgmt_api_management/api_products.rb | 36 +- .../azure_mgmt_api_management/apis.rb | 105 +- .../authorization_servers.rb | 101 +- .../azure_mgmt_api_management/backends.rb | 105 +- .../azure_mgmt_api_management/certificates.rb | 86 +- .../azure_mgmt_api_management/group_users.rb | 76 +- .../azure_mgmt_api_management/groups.rb | 105 +- .../identity_providers.rb | 74 +- .../azure_mgmt_api_management/loggers.rb | 101 +- .../models/access_information_contract.rb | 5 - .../access_information_update_parameters.rb | 2 - .../models/additional_region.rb | 7 - .../models/api_collection.rb | 5 - .../models/api_contract.rb | 11 - .../models/api_entity_base_contract.rb | 5 - .../models/api_export_result.rb | 4 - ...ement_service_backup_restore_parameters.rb | 5 - ...vice_check_name_availability_parameters.rb | 2 - ...management_service_get_sso_token_result.rb | 2 - .../api_management_service_list_result.rb | 4 - ...t_service_manage_deployments_parameters.rb | 8 - ...gement_service_name_availability_result.rb | 4 - .../models/api_management_service_resource.rb | 29 - .../api_management_service_sku_properties.rb | 3 - ...ment_service_update_hostname_parameters.rb | 5 - ...pi_management_service_update_parameters.rb | 24 - ...t_service_upload_certificate_parameters.rb | 4 - .../models/api_update_contract.rb | 11 - .../authentication_settings_contract.rb | 2 - .../models/authorization_server_collection.rb | 5 - ...ackend_authorization_header_credentials.rb | 3 - .../models/backend_base_parameters.rb | 17 - .../models/backend_collection.rb | 5 - .../models/backend_contract.rb | 19 - .../models/backend_credentials_contract.rb | 11 - .../models/backend_proxy_contract.rb | 4 - .../models/backend_response.rb | 19 - .../models/backend_update_parameters.rb | 18 - .../models/certificate_collection.rb | 5 - .../models/certificate_contract.rb | 5 - ...certificate_create_or_update_parameters.rb | 3 - .../models/certificate_information.rb | 4 - .../models/connectivity_status_contract.rb | 6 - .../models/deploy_configuration_parameters.rb | 3 - .../models/error_body_contract.rb | 5 - .../models/error_field_contract.rb | 4 - .../models/error_response.rb | 3 - .../models/generate_sso_url_result.rb | 2 - .../models/group_collection.rb | 5 - .../models/group_contract.rb | 7 - .../models/group_create_parameters.rb | 5 - .../models/group_update_parameters.rb | 5 - .../models/hostname_configuration.rb | 4 - .../models/identity_provider_contract.rb | 6 - .../models/identity_provider_list.rb | 3 - .../identity_provider_update_parameters.rb | 5 - .../models/logger_collection.rb | 5 - .../models/logger_create_parameters.rb | 6 - .../models/logger_response.rb | 7 - .../models/logger_update_parameters.rb | 6 - .../models/network_status_contract.rb | 5 - .../oauth2authentication_settings_contract.rb | 3 - .../oauth2authorization_server_contract.rb | 23 - ...th2authorization_server_update_contract.rb | 22 - .../open_id_connect_provider_collection.rb | 5 - .../openid_connect_provider_contract.rb | 7 - ...openid_connect_provider_create_contract.rb | 6 - ...openid_connect_provider_update_contract.rb | 6 - .../models/operation.rb | 3 - .../models/operation_collection.rb | 5 - .../models/operation_contract.rb | 11 - .../models/operation_display.rb | 5 - .../models/operation_entity_base_contract.rb | 7 - .../models/operation_list_result.rb | 4 - .../models/operation_result_contract.rb | 7 - .../models/operation_update_contract.rb | 11 - .../models/parameter_contract.rb | 8 - .../models/policy_snippet_contract.rb | 5 - .../models/policy_snippets_collection.rb | 3 - .../models/product_collection.rb | 5 - .../models/product_contract.rb | 9 - .../models/product_update_parameters.rb | 8 - .../models/property_collection.rb | 5 - .../models/property_contract.rb | 7 - .../models/property_create_parameters.rb | 6 - .../models/property_update_parameters.rb | 6 - .../models/quota_counter_collection.rb | 5 - .../models/quota_counter_contract.rb | 7 - .../models/quota_counter_value_contract.rb | 3 - .../models/region_contract.rb | 3 - .../models/region_list_result.rb | 3 - .../models/report_collection.rb | 5 - .../models/report_record_contract.rb | 27 - .../models/representation_contract.rb | 3 - .../models/request_contract.rb | 8 - .../models/resource.rb | 16 - .../models/result_contract.rb | 5 - .../models/save_configuration_parameter.rb | 3 - .../models/subscription_collection.rb | 5 - .../models/subscription_contract.rb | 14 - .../models/subscription_create_parameters.rb | 7 - ...bscription_key_parameter_names_contract.rb | 3 - .../models/subscription_update_parameters.rb | 9 - ...enant_configuration_sync_state_contract.rb | 8 - .../models/token_body_parameter_contract.rb | 3 - .../models/user_collection.rb | 5 - .../models/user_contract.rb | 10 - .../models/user_create_parameters.rb | 7 - .../models/user_identity_collection.rb | 3 - .../models/user_identity_contract.rb | 3 - .../models/user_token_parameters.rb | 3 - .../models/user_token_result.rb | 2 - .../models/user_update_parameters.rb | 7 - .../models/virtual_network_configuration.rb | 5 - .../network_status.rb | 14 +- .../open_id_connect_providers.rb | 101 +- .../policy_snippets.rb | 14 +- .../azure_mgmt_api_management/product_apis.rb | 76 +- .../product_groups.rb | 76 +- .../product_policy.rb | 56 +- .../product_subscriptions.rb | 36 +- .../azure_mgmt_api_management/products.rb | 105 +- .../azure_mgmt_api_management/properties.rb | 33 +- .../azure_mgmt_api_management/property.rb | 68 +- .../quota_by_counter_keys.rb | 30 +- .../quota_by_period_keys.rb | 30 +- .../azure_mgmt_api_management/regions.rb | 14 +- .../azure_mgmt_api_management/reports.rb | 33 +- .../subscriptions.rb | 133 +- .../tenant_access.rb | 58 +- .../tenant_access_git.rb | 42 +- .../tenant_configuration.rb | 72 +- .../tenant_configuration_sync_state.rb | 14 +- .../tenant_policy.rb | 47 +- .../azure_mgmt_api_management/user_groups.rb | 36 +- .../user_identities.rb | 17 +- .../user_subscriptions.rb | 36 +- .../azure_mgmt_api_management/users.rb | 141 +- .../azure_mgmt_api_management/version.rb | 8 + .../generated/azure_mgmt_api_management.rb | 294 ++ .../azure_mgmt_api_management/api.rb | 1099 +++++++ .../api_diagnostic.rb | 818 +++++ .../api_diagnostic_logger.rb | 600 ++++ .../azure_mgmt_api_management/api_export.rb | 140 + .../azure_mgmt_api_management/api_issue.rb | 852 +++++ .../api_issue_attachment.rb | 751 +++++ .../api_issue_comment.rb | 748 +++++ .../api_management_client.rb | 363 +++ .../api_management_operations.rb | 220 ++ .../api_management_service.rb | 1885 +++++++++++ .../api_operation.rb | 849 +++++ .../api_operation_policy.rb | 591 ++++ .../azure_mgmt_api_management/api_policy.rb | 556 ++++ .../azure_mgmt_api_management/api_product.rb | 262 ++ .../azure_mgmt_api_management/api_release.rb | 837 +++++ .../api_revisions.rb | 270 ++ .../azure_mgmt_api_management/api_schema.rb | 692 ++++ .../api_version_set.rb | 826 +++++ .../authorization_server.rb | 781 +++++ .../azure_mgmt_api_management/backend.rb | 888 +++++ .../azure_mgmt_api_management/certificate.rb | 697 ++++ .../delegation_settings.rb | 404 +++ .../azure_mgmt_api_management/diagnostic.rb | 774 +++++ .../diagnostic_logger.rb | 577 ++++ .../email_template.rb | 873 +++++ .../azure_mgmt_api_management/group.rb | 801 +++++ .../azure_mgmt_api_management/group_user.rb | 617 ++++ .../identity_provider.rb | 775 +++++ .../azure_mgmt_api_management/logger.rb | 786 +++++ .../models/access_information_contract.rb | 75 + .../access_information_update_parameters.rb | 46 + .../models/additional_location.rb | 122 + .../models/api_collection.rb | 96 + .../models/api_contract.rb | 267 ++ .../models/api_contract_properties.rb | 204 ++ .../models/api_create_or_update_parameter.rb | 291 ++ ...eate_or_update_properties_wsdl_selector.rb | 54 + .../models/api_entity_base_contract.rb | 167 + .../models/api_export_result.rb | 45 + ..._apply_network_configuration_parameters.rb | 47 + ...ement_service_backup_restore_parameters.rb | 79 + .../api_management_service_base_properties.rb | 298 ++ ...vice_check_name_availability_parameters.rb | 45 + ...management_service_get_sso_token_result.rb | 45 + .../models/api_management_service_identity.rb | 69 + .../api_management_service_list_result.rb | 96 + ...gement_service_name_availability_result.rb | 77 + .../models/api_management_service_resource.rb | 407 +++ .../api_management_service_sku_properties.rb | 57 + ...ment_service_update_hostname_parameters.rb | 72 + ...pi_management_service_update_parameters.rb | 397 +++ ...t_service_upload_certificate_parameters.rb | 68 + .../models/api_release_collection.rb | 96 + .../models/api_release_contract.rb | 102 + .../models/api_revision_collection.rb | 96 + .../models/api_revision_contract.rb | 136 + .../models/api_revision_info_contract.rb | 83 + .../api_tag_resource_contract_properties.rb | 203 ++ .../models/api_type.rb | 16 + .../models/api_update_contract.rb | 232 ++ .../models/api_version_set_collection.rb | 94 + .../models/api_version_set_contract.rb | 124 + .../api_version_set_contract_details.rb | 90 + .../models/api_version_set_entity_base.rb | 74 + .../api_version_set_update_parameters.rb | 100 + .../models/apim_resource.rb | 85 + .../models/async_operation_status.rb | 18 + .../authentication_settings_contract.rb | 71 + .../models/authorization_method.rb | 22 + .../models/authorization_server_collection.rb | 104 + .../models/authorization_server_contract.rb | 284 ++ ...ization_server_contract_base_properties.rb | 195 ++ .../authorization_server_update_contract.rb | 284 ++ ...ackend_authorization_header_credentials.rb | 62 + .../models/backend_base_parameters.rb | 123 + .../models/backend_collection.rb | 94 + .../models/backend_contract.rb | 172 + .../models/backend_credentials_contract.rb | 114 + .../models/backend_properties.rb | 46 + .../models/backend_protocol.rb | 16 + .../models/backend_proxy_contract.rb | 70 + .../models/backend_reconnect_contract.rb | 69 + ...ckend_service_fabric_cluster_properties.rb | 110 + .../models/backend_tls_properties.rb | 60 + .../models/backend_update_parameters.rb | 148 + .../models/bearer_token_sending_method.rb | 16 + .../models/bearer_token_sending_methods.rb | 16 + .../models/certificate_collection.rb | 94 + .../models/certificate_configuration.rb | 79 + .../models/certificate_contract.rb | 91 + ...certificate_create_or_update_parameters.rb | 55 + .../models/certificate_information.rb | 66 + .../models/client_authentication_method.rb | 16 + .../models/confirmation.rb | 16 + .../models/connectivity_status_contract.rb | 101 + .../models/connectivity_status_type.rb | 17 + .../models/content_format.rb | 20 + .../models/deploy_configuration_parameters.rb | 56 + .../models/diagnostic_collection.rb | 94 + .../models/diagnostic_contract.rb | 69 + .../models/email_template_collection.rb | 94 + .../models/email_template_contract.rb | 136 + ...template_parameters_contract_properties.rb | 79 + .../email_template_update_parameters.rb | 100 + .../models/error_field_contract.rb | 64 + .../models/error_response.rb | 74 + .../models/error_response_body.rb | 74 + .../models/export_format.rb | 17 + .../models/generate_sso_url_result.rb | 44 + .../models/grant_type.rb | 18 + .../models/group_collection.rb | 94 + .../models/group_contract.rb | 122 + .../models/group_contract_properties.rb | 98 + .../models/group_create_parameters.rb | 83 + .../models/group_type.rb | 17 + .../models/group_update_parameters.rb | 83 + .../models/hostname_configuration.rb | 129 + .../models/hostname_configuration_old.rb | 67 + .../models/hostname_type.rb | 18 + .../identity_provider_base_parameters.rb | 123 + .../models/identity_provider_contract.rb | 178 + .../models/identity_provider_list.rb | 95 + .../models/identity_provider_type.rb | 20 + .../identity_provider_update_parameters.rb | 154 + .../models/issue_attachment_collection.rb | 96 + .../models/issue_attachment_contract.rb | 90 + .../models/issue_collection.rb | 96 + .../models/issue_comment_collection.rb | 96 + .../models/issue_comment_contract.rb | 89 + .../models/issue_contract.rb | 120 + .../models/key_type.rb | 16 + .../models/logger_collection.rb | 104 + .../models/logger_contract.rb | 112 + .../models/logger_type.rb | 16 + .../models/logger_update_contract.rb | 83 + .../models/name_availability_reason.rb | 17 + .../models/network_status_contract.rb | 70 + .../network_status_contract_by_location.rb | 58 + .../models/notification_collection.rb | 94 + .../models/notification_contract.rb | 93 + .../models/notification_name.rb | 21 + .../oauth2authentication_settings_contract.rb | 54 + ...pen_id_authentication_settings_contract.rb | 62 + .../open_id_connect_provider_collection.rb | 94 + .../openid_connect_provider_contract.rb | 113 + ...openid_connect_provider_update_contract.rb | 89 + .../models/operation.rb | 75 + .../models/operation_collection.rb | 96 + .../models/operation_contract.rb | 171 + .../models/operation_display.rb | 75 + .../models/operation_entity_base_contract.rb | 106 + .../models/operation_list_result.rb | 97 + .../models/operation_result_contract.rb | 125 + .../operation_result_log_item_contract.rb | 65 + ...ration_tag_resource_contract_properties.rb | 125 + .../models/operation_update_contract.rb | 147 + .../models/parameter_contract.rb | 101 + .../models/policy_collection.rb | 62 + .../models/policy_content_format.rb | 18 + .../models/policy_contract.rb | 81 + .../models/policy_scope_contract.rb | 19 + .../models/policy_snippet_contract.rb | 78 + .../models/policy_snippets_collection.rb | 52 + .../models/portal_delegation_settings.rb | 103 + .../models/portal_signin_settings.rb | 68 + .../models/portal_signup_settings.rb | 80 + .../models/product_collection.rb | 94 + .../models/product_contract.rb | 156 + .../models/product_entity_base_parameters.rb | 118 + .../models/product_state.rb | 16 + ...roduct_tag_resource_contract_properties.rb | 106 + .../models/product_update_parameters.rb | 132 + .../models/property_collection.rb | 94 + .../models/property_contract.rb | 121 + .../models/property_entity_base_parameters.rb | 66 + .../models/property_update_parameters.rb | 97 + .../models/protocol.rb | 16 + .../models/quota_counter_collection.rb | 72 + .../models/quota_counter_contract.rb | 98 + .../models/quota_counter_value_contract.rb | 54 + ...quota_counter_value_contract_properties.rb | 54 + .../models/recipient_email_collection.rb | 62 + .../models/recipient_email_contract.rb | 68 + .../models/recipient_user_collection.rb | 62 + .../models/recipient_user_contract.rb | 68 + .../models/recipients_contract_properties.rb | 68 + .../models/region_contract.rb | 65 + .../models/region_list_result.rb | 104 + ...stration_delegation_settings_properties.rb | 44 + .../models/report_collection.rb | 104 + .../models/report_record_contract.rb | 311 ++ .../models/representation_contract.rb | 99 + .../models/request_contract.rb | 101 + .../models/request_report_collection.rb | 62 + .../models/request_report_record_contract.rb | 226 ++ .../models/resource.rb | 67 + .../models/response_contract.rb | 92 + .../models/save_configuration_parameter.rb | 57 + .../models/schema_collection.rb | 96 + .../models/schema_contract.rb | 81 + .../models/sku_type.rb | 18 + .../models/soap_api_type.rb | 16 + .../azure_mgmt_api_management/models/state.rb | 19 + .../models/subscription_collection.rb | 94 + .../models/subscription_contract.rb | 228 ++ .../models/subscription_create_parameters.rb | 121 + ...bscription_key_parameter_names_contract.rb | 54 + .../models/subscription_state.rb | 20 + .../models/subscription_update_parameters.rb | 137 + ...riptions_delegation_settings_properties.rb | 45 + .../models/tag_collection.rb | 94 + .../models/tag_contract.rb | 72 + .../models/tag_create_update_parameters.rb | 48 + .../models/tag_description_collection.rb | 94 + .../models/tag_description_contract.rb | 106 + .../tag_description_create_parameters.rb | 68 + .../models/tag_resource_collection.rb | 104 + .../models/tag_resource_contract.rb | 81 + .../tag_tag_resource_contract_properties.rb | 58 + .../models/template_name.rb | 28 + ...enant_configuration_sync_state_contract.rb | 113 + .../models/terms_of_service_properties.rb | 64 + .../models/token_body_parameter_contract.rb | 54 + .../models/user_collection.rb | 94 + .../models/user_contract.rb | 165 + .../models/user_create_parameters.rb | 144 + .../models/user_entity_base_parameters.rb | 78 + .../models/user_identity_collection.rb | 104 + .../models/user_identity_contract.rb | 54 + .../models/user_state.rb | 18 + .../models/user_token_parameters.rb | 61 + .../models/user_token_result.rb | 44 + .../models/user_update_parameters.rb | 131 + .../models/versioning_scheme.rb | 17 + .../models/virtual_network_configuration.rb | 72 + .../models/virtual_network_type.rb | 17 + .../models/x509certificate_name.rb | 54 + .../module_definition.rb | 9 + .../network_status.rb | 243 ++ .../azure_mgmt_api_management/notification.rb | 454 +++ .../notification_recipient_email.rb | 458 +++ .../notification_recipient_user.rb | 470 +++ .../open_id_connect_provider.rb | 774 +++++ .../operation_operations.rb | 306 ++ .../azure_mgmt_api_management/policy.rb | 508 +++ .../policy_snippets.rb | 122 + .../azure_mgmt_api_management/product.rb | 824 +++++ .../azure_mgmt_api_management/product_api.rb | 614 ++++ .../product_group.rb | 603 ++++ .../product_policy.rb | 538 +++ .../product_subscriptions.rb | 302 ++ .../azure_mgmt_api_management/property.rb | 771 +++++ .../quota_by_counter_keys.rb | 256 ++ .../quota_by_period_keys.rb | 255 ++ .../azure_mgmt_api_management/regions.rb | 225 ++ .../azure_mgmt_api_management/reports.rb | 1635 ++++++++++ .../sign_in_settings.rb | 404 +++ .../sign_up_settings.rb | 404 +++ .../azure_mgmt_api_management/subscription.rb | 1025 ++++++ .../azure_mgmt_api_management/tag.rb | 2878 +++++++++++++++++ .../tag_description.rb | 739 +++++ .../azure_mgmt_api_management/tag_resource.rb | 349 ++ .../tenant_access.rb | 387 +++ .../tenant_access_git.rb | 279 ++ .../tenant_configuration.rb | 597 ++++ .../azure_mgmt_api_management/user.rb | 1049 ++++++ .../azure_mgmt_api_management/user_group.rb | 277 ++ .../user_identities.rb | 234 ++ .../user_subscription.rb | 302 ++ .../azure_mgmt_api_management/version.rb | 8 + .../lib/azure_mgmt_api_management.rb | 5 +- .../modules/apimanagement_profile_module.rb | 672 ++-- 621 files changed, 61707 insertions(+), 6531 deletions(-) create mode 100644 management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/version.rb create mode 100644 management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/version.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_diagnostic.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_diagnostic_logger.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_export.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_issue.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_issue_attachment.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_issue_comment.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_management_client.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_management_operations.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_management_service.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_operation.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_operation_policy.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_policy.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_product.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_release.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_revisions.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_schema.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_version_set.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/authorization_server.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/backend.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/certificate.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/delegation_settings.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/diagnostic.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/diagnostic_logger.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/email_template.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/group.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/group_user.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/identity_provider.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/logger.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/access_information_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/access_information_update_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/additional_location.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_contract_properties.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_create_or_update_parameter.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_create_or_update_properties_wsdl_selector.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_entity_base_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_export_result.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_apply_network_configuration_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_backup_restore_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_base_properties.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_check_name_availability_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_get_sso_token_result.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_identity.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_list_result.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_name_availability_result.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_resource.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_sku_properties.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_update_hostname_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_update_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_upload_certificate_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_release_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_release_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_revision_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_revision_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_revision_info_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_tag_resource_contract_properties.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_type.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_update_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_contract_details.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_entity_base.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_update_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/apim_resource.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/async_operation_status.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authentication_settings_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_method.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_contract_base_properties.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_update_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_authorization_header_credentials.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_base_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_credentials_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_properties.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_protocol.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_proxy_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_reconnect_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_service_fabric_cluster_properties.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_tls_properties.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_update_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/bearer_token_sending_method.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/bearer_token_sending_methods.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_configuration.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_create_or_update_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_information.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/client_authentication_method.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/confirmation.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/connectivity_status_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/connectivity_status_type.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/content_format.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/deploy_configuration_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/diagnostic_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/diagnostic_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/email_template_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/email_template_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/email_template_parameters_contract_properties.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/email_template_update_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/error_field_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/error_response.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/error_response_body.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/export_format.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/generate_sso_url_result.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/grant_type.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_contract_properties.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_create_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_type.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_update_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/hostname_configuration.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/hostname_configuration_old.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/hostname_type.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_base_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_list.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_type.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_update_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_attachment_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_attachment_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_comment_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_comment_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/key_type.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/logger_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/logger_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/logger_type.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/logger_update_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/name_availability_reason.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/network_status_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/network_status_contract_by_location.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/notification_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/notification_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/notification_name.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/oauth2authentication_settings_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/open_id_authentication_settings_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/open_id_connect_provider_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/openid_connect_provider_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/openid_connect_provider_update_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_display.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_entity_base_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_list_result.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_result_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_result_log_item_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_tag_resource_contract_properties.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_update_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/parameter_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_content_format.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_scope_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_snippet_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_snippets_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/portal_delegation_settings.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/portal_signin_settings.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/portal_signup_settings.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_entity_base_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_state.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_tag_resource_contract_properties.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_update_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/property_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/property_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/property_entity_base_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/property_update_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/protocol.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_value_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_value_contract_properties.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipient_email_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipient_email_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipient_user_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipient_user_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipients_contract_properties.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/region_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/region_list_result.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/registration_delegation_settings_properties.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/report_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/report_record_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/representation_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/request_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/request_report_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/request_report_record_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/resource.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/response_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/save_configuration_parameter.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/schema_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/schema_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/sku_type.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/soap_api_type.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/state.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_key_parameter_names_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_state.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_update_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscriptions_delegation_settings_properties.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_create_update_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_description_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_description_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_description_create_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_resource_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_resource_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_tag_resource_contract_properties.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/template_name.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tenant_configuration_sync_state_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/terms_of_service_properties.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/token_body_parameter_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_create_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_entity_base_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_identity_collection.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_identity_contract.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_state.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_token_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_token_result.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_update_parameters.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/versioning_scheme.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/virtual_network_configuration.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/virtual_network_type.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/x509certificate_name.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/module_definition.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/network_status.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/notification.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/notification_recipient_email.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/notification_recipient_user.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/open_id_connect_provider.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/operation_operations.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/policy.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/policy_snippets.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product_api.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product_group.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product_policy.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product_subscriptions.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/property.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/quota_by_counter_keys.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/quota_by_period_keys.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/regions.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/sign_in_settings.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/sign_up_settings.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/subscription.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tag.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tag_description.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tag_resource.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tenant_access.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tenant_access_git.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tenant_configuration.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/user.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/user_group.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/user_identities.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/user_subscription.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/version.rb diff --git a/azure_sdk/lib/latest/modules/apimanagement_profile_module.rb b/azure_sdk/lib/latest/modules/apimanagement_profile_module.rb index ddbf58e578..a3952bafaa 100644 --- a/azure_sdk/lib/latest/modules/apimanagement_profile_module.rb +++ b/azure_sdk/lib/latest/modules/apimanagement_profile_module.rb @@ -39,12 +39,12 @@ module Mgmt SignInSettings = Azure::ApiManagement::Mgmt::V2018_06_01_preview::SignInSettings SignUpSettings = Azure::ApiManagement::Mgmt::V2018_06_01_preview::SignUpSettings DelegationSettings = Azure::ApiManagement::Mgmt::V2018_06_01_preview::DelegationSettings - Product = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Product Policy = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Policy - ProductApi = Azure::ApiManagement::Mgmt::V2018_06_01_preview::ProductApi + Product = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Product + ProductGroup = Azure::ApiManagement::Mgmt::V2018_06_01_preview::ProductGroup ProductSubscriptions = Azure::ApiManagement::Mgmt::V2018_06_01_preview::ProductSubscriptions + ProductApi = Azure::ApiManagement::Mgmt::V2018_06_01_preview::ProductApi ProductPolicy = Azure::ApiManagement::Mgmt::V2018_06_01_preview::ProductPolicy - ProductGroup = Azure::ApiManagement::Mgmt::V2018_06_01_preview::ProductGroup Property = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Property QuotaByCounterKeys = Azure::ApiManagement::Mgmt::V2018_06_01_preview::QuotaByCounterKeys QuotaByPeriodKeys = Azure::ApiManagement::Mgmt::V2018_06_01_preview::QuotaByPeriodKeys @@ -116,9 +116,9 @@ module Models TagDescriptionCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TagDescriptionCollection ApiVersionSetContractDetails = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiVersionSetContractDetails ProductEntityBaseParameters = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ProductEntityBaseParameters - OperationTagResourceContractProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::OperationTagResourceContractProperties - TagTagResourceContractProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TagTagResourceContractProperties ApiManagementServiceUpdateHostnameParameters = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiManagementServiceUpdateHostnameParameters + TagTagResourceContractProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TagTagResourceContractProperties + TagResourceCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TagResourceCollection ProductCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ProductCollection OperationDisplay = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::OperationDisplay AuthorizationServerCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AuthorizationServerCollection @@ -152,49 +152,49 @@ module Models IdentityProviderList = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IdentityProviderList RequestContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RequestContract IdentityProviderUpdateParameters = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IdentityProviderUpdateParameters - ApiVersionSetCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiVersionSetCollection + OperationTagResourceContractProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::OperationTagResourceContractProperties + IdentityProviderBaseParameters = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IdentityProviderBaseParameters IssueCommentCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IssueCommentCollection - TagResourceCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TagResourceCollection Operation = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::Operation + HttpMessageDiagnostic = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::HttpMessageDiagnostic + ApiVersionSetCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiVersionSetCollection + LoggerUpdateContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::LoggerUpdateContract LoggerCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::LoggerCollection RequestReportCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RequestReportCollection - IdentityProviderBaseParameters = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IdentityProviderBaseParameters + TenantConfigurationSyncStateContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TenantConfigurationSyncStateContract GenerateSsoUrlResult = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::GenerateSsoUrlResult DiagnosticCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::DiagnosticCollection - HttpMessageDiagnostic = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::HttpMessageDiagnostic + NotificationCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::NotificationCollection RequestReportRecordContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RequestReportRecordContract RecipientsContractProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RecipientsContractProperties - LoggerUpdateContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::LoggerUpdateContract + BackendProxyContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendProxyContract X509CertificateName = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::X509CertificateName OperationResultContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::OperationResultContract - TenantConfigurationSyncStateContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TenantConfigurationSyncStateContract + ReportRecordContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ReportRecordContract RecipientUserCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RecipientUserCollection ReportCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ReportCollection - NotificationCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::NotificationCollection + ConnectivityStatusContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ConnectivityStatusContract RecipientEmailCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RecipientEmailCollection BackendCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendCollection - BackendProxyContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendProxyContract + OperationEntityBaseContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::OperationEntityBaseContract ApiVersionSetUpdateParameters = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiVersionSetUpdateParameters ApiUpdateContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiUpdateContract - ReportRecordContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ReportRecordContract + QuotaCounterValueContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::QuotaCounterValueContract NetworkStatusContractByLocation = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::NetworkStatusContractByLocation NetworkStatusContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::NetworkStatusContract - ConnectivityStatusContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ConnectivityStatusContract + SaveConfigurationParameter = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SaveConfigurationParameter UserCreateParameters = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::UserCreateParameters IssueAttachmentCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IssueAttachmentCollection - OperationEntityBaseContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::OperationEntityBaseContract + QuotaCounterCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::QuotaCounterCollection OpenidConnectProviderUpdateContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::OpenidConnectProviderUpdateContract OpenIdConnectProviderCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::OpenIdConnectProviderCollection - QuotaCounterValueContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::QuotaCounterValueContract + ApiEntityBaseContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiEntityBaseContract DeployConfigurationParameters = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::DeployConfigurationParameters - BackendProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendProperties - SaveConfigurationParameter = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SaveConfigurationParameter QuotaCounterContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::QuotaCounterContract - TermsOfServiceProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TermsOfServiceProperties - QuotaCounterCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::QuotaCounterCollection - TagResourceContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TagResourceContract IssueCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IssueCollection - ApiEntityBaseContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiEntityBaseContract + TagResourceContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TagResourceContract + TermsOfServiceProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TermsOfServiceProperties + BackendProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendProperties QuotaCounterValueContractProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::QuotaCounterValueContractProperties RegistrationDelegationSettingsProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RegistrationDelegationSettingsProperties SubscriptionsDelegationSettingsProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SubscriptionsDelegationSettingsProperties @@ -281,7 +281,7 @@ module Models end class ApiManagementManagementClass - attr_reader :group, :subscription, :policy_snippets, :regions, :api, :api_revisions, :api_release, :api_operation, :api_operation_policy, :api_product, :api_policy, :api_schema, :api_diagnostic, :api_issue, :api_issue_comment, :api_issue_attachment, :authorization_server, :backend, :api_management_operations, :api_management_service, :diagnostic, :email_template, :group_user, :identity_provider, :notification, :notification_recipient_user, :notification_recipient_email, :network_status, :open_id_connect_provider, :sign_in_settings, :sign_up_settings, :delegation_settings, :product, :policy, :product_api, :product_subscriptions, :product_policy, :product_group, :property, :quota_by_counter_keys, :quota_by_period_keys, :reports, :tag_resource, :tag_description, :operation_operations, :tenant_access, :tenant_access_git, :tenant_configuration, :user, :user_subscription, :user_group, :api_version_set, :user_identities, :api_export, :tag, :logger, :certificate, :configurable, :base_url, :options, :model_classes + attr_reader :group, :subscription, :policy_snippets, :regions, :api, :api_revisions, :api_release, :api_operation, :api_operation_policy, :api_product, :api_policy, :api_schema, :api_diagnostic, :api_issue, :api_issue_comment, :api_issue_attachment, :authorization_server, :backend, :api_management_operations, :api_management_service, :diagnostic, :email_template, :group_user, :identity_provider, :notification, :notification_recipient_user, :notification_recipient_email, :network_status, :open_id_connect_provider, :sign_in_settings, :sign_up_settings, :delegation_settings, :policy, :product, :product_group, :product_subscriptions, :product_api, :product_policy, :property, :quota_by_counter_keys, :quota_by_period_keys, :reports, :tag_resource, :tag_description, :operation_operations, :tenant_access, :tenant_access_git, :tenant_configuration, :user, :user_subscription, :user_group, :api_version_set, :user_identities, :api_export, :tag, :logger, :certificate, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -323,12 +323,12 @@ def initialize(configurable, base_url=nil, options=nil) @sign_in_settings = @client_0.sign_in_settings @sign_up_settings = @client_0.sign_up_settings @delegation_settings = @client_0.delegation_settings - @product = @client_0.product @policy = @client_0.policy - @product_api = @client_0.product_api + @product = @client_0.product + @product_group = @client_0.product_group @product_subscriptions = @client_0.product_subscriptions + @product_api = @client_0.product_api @product_policy = @client_0.product_policy - @product_group = @client_0.product_group @property = @client_0.property @quota_by_counter_keys = @client_0.quota_by_counter_keys @quota_by_period_keys = @client_0.quota_by_period_keys @@ -516,14 +516,14 @@ def api_version_set_contract_details def product_entity_base_parameters Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ProductEntityBaseParameters end - def operation_tag_resource_contract_properties - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::OperationTagResourceContractProperties + def api_management_service_update_hostname_parameters + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiManagementServiceUpdateHostnameParameters end def tag_tag_resource_contract_properties Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TagTagResourceContractProperties end - def api_management_service_update_hostname_parameters - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiManagementServiceUpdateHostnameParameters + def tag_resource_collection + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TagResourceCollection end def product_collection Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ProductCollection @@ -624,26 +624,35 @@ def request_contract def identity_provider_update_parameters Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IdentityProviderUpdateParameters end - def api_version_set_collection - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiVersionSetCollection + def operation_tag_resource_contract_properties + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::OperationTagResourceContractProperties + end + def identity_provider_base_parameters + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IdentityProviderBaseParameters end def issue_comment_collection Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IssueCommentCollection end - def tag_resource_collection - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TagResourceCollection - end def operation Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::Operation end + def http_message_diagnostic + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::HttpMessageDiagnostic + end + def api_version_set_collection + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiVersionSetCollection + end + def logger_update_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::LoggerUpdateContract + end def logger_collection Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::LoggerCollection end def request_report_collection Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RequestReportCollection end - def identity_provider_base_parameters - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IdentityProviderBaseParameters + def tenant_configuration_sync_state_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TenantConfigurationSyncStateContract end def generate_sso_url_result Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::GenerateSsoUrlResult @@ -651,8 +660,8 @@ def generate_sso_url_result def diagnostic_collection Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::DiagnosticCollection end - def http_message_diagnostic - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::HttpMessageDiagnostic + def notification_collection + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::NotificationCollection end def request_report_record_contract Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RequestReportRecordContract @@ -660,8 +669,8 @@ def request_report_record_contract def recipients_contract_properties Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RecipientsContractProperties end - def logger_update_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::LoggerUpdateContract + def backend_proxy_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendProxyContract end def x509_certificate_name Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::X509CertificateName @@ -669,8 +678,8 @@ def x509_certificate_name def operation_result_contract Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::OperationResultContract end - def tenant_configuration_sync_state_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TenantConfigurationSyncStateContract + def report_record_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ReportRecordContract end def recipient_user_collection Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RecipientUserCollection @@ -678,8 +687,8 @@ def recipient_user_collection def report_collection Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ReportCollection end - def notification_collection - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::NotificationCollection + def connectivity_status_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ConnectivityStatusContract end def recipient_email_collection Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RecipientEmailCollection @@ -687,8 +696,8 @@ def recipient_email_collection def backend_collection Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendCollection end - def backend_proxy_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendProxyContract + def operation_entity_base_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::OperationEntityBaseContract end def api_version_set_update_parameters Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiVersionSetUpdateParameters @@ -696,8 +705,8 @@ def api_version_set_update_parameters def api_update_contract Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiUpdateContract end - def report_record_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ReportRecordContract + def quota_counter_value_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::QuotaCounterValueContract end def network_status_contract_by_location Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::NetworkStatusContractByLocation @@ -705,8 +714,8 @@ def network_status_contract_by_location def network_status_contract Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::NetworkStatusContract end - def connectivity_status_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ConnectivityStatusContract + def save_configuration_parameter + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SaveConfigurationParameter end def user_create_parameters Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::UserCreateParameters @@ -714,8 +723,8 @@ def user_create_parameters def issue_attachment_collection Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IssueAttachmentCollection end - def operation_entity_base_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::OperationEntityBaseContract + def quota_counter_collection + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::QuotaCounterCollection end def openid_connect_provider_update_contract Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::OpenidConnectProviderUpdateContract @@ -723,35 +732,26 @@ def openid_connect_provider_update_contract def open_id_connect_provider_collection Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::OpenIdConnectProviderCollection end - def quota_counter_value_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::QuotaCounterValueContract + def api_entity_base_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiEntityBaseContract end def deploy_configuration_parameters Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::DeployConfigurationParameters end - def backend_properties - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendProperties - end - def save_configuration_parameter - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SaveConfigurationParameter - end def quota_counter_contract Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::QuotaCounterContract end - def terms_of_service_properties - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TermsOfServiceProperties - end - def quota_counter_collection - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::QuotaCounterCollection + def issue_collection + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IssueCollection end def tag_resource_contract Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TagResourceContract end - def issue_collection - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IssueCollection + def terms_of_service_properties + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TermsOfServiceProperties end - def api_entity_base_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiEntityBaseContract + def backend_properties + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendProperties end def quota_counter_value_contract_properties Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::QuotaCounterValueContractProperties diff --git a/azure_sdk/lib/latest/modules/automation_profile_module.rb b/azure_sdk/lib/latest/modules/automation_profile_module.rb index 1696580ac6..8aff49bf7d 100644 --- a/azure_sdk/lib/latest/modules/automation_profile_module.rb +++ b/azure_sdk/lib/latest/modules/automation_profile_module.rb @@ -7,6 +7,7 @@ module Azure::Profiles::Latest module Automation module Mgmt + CertificateOperations = Azure::Automation::Mgmt::V2015_10_31::CertificateOperations ConnectionOperations = Azure::Automation::Mgmt::V2015_10_31::ConnectionOperations ConnectionTypeOperations = Azure::Automation::Mgmt::V2015_10_31::ConnectionTypeOperations CredentialOperations = Azure::Automation::Mgmt::V2015_10_31::CredentialOperations @@ -38,7 +39,6 @@ module Mgmt AutomationAccountOperations = Azure::Automation::Mgmt::V2015_10_31::AutomationAccountOperations StatisticsOperations = Azure::Automation::Mgmt::V2015_10_31::StatisticsOperations Keys = Azure::Automation::Mgmt::V2015_10_31::Keys - CertificateOperations = Azure::Automation::Mgmt::V2015_10_31::CertificateOperations module Models Job = Azure::Automation::Mgmt::V2015_10_31::Models::Job @@ -142,37 +142,37 @@ module Models RunbookCreateOrUpdateDraftParameters = Azure::Automation::Mgmt::V2015_10_31::Models::RunbookCreateOrUpdateDraftParameters RunbookCreateOrUpdateDraftProperties = Azure::Automation::Mgmt::V2015_10_31::Models::RunbookCreateOrUpdateDraftProperties Credential = Azure::Automation::Mgmt::V2015_10_31::Models::Credential - DscCompilationJob = Azure::Automation::Mgmt::V2015_10_31::Models::DscCompilationJob + Connection = Azure::Automation::Mgmt::V2015_10_31::Models::Connection CertificateCreateOrUpdateParameters = Azure::Automation::Mgmt::V2015_10_31::Models::CertificateCreateOrUpdateParameters DscNode = Azure::Automation::Mgmt::V2015_10_31::Models::DscNode - DscNodeConfiguration = Azure::Automation::Mgmt::V2015_10_31::Models::DscNodeConfiguration + DscCompilationJob = Azure::Automation::Mgmt::V2015_10_31::Models::DscCompilationJob DscConfiguration = Azure::Automation::Mgmt::V2015_10_31::Models::DscConfiguration AutomationAccount = Azure::Automation::Mgmt::V2015_10_31::Models::AutomationAccount - Schedule = Azure::Automation::Mgmt::V2015_10_31::Models::Schedule + DscNodeConfiguration = Azure::Automation::Mgmt::V2015_10_31::Models::DscNodeConfiguration ModuleModel = Azure::Automation::Mgmt::V2015_10_31::Models::ModuleModel Runbook = Azure::Automation::Mgmt::V2015_10_31::Models::Runbook - SkuNameEnum = Azure::Automation::Mgmt::V2015_10_31::Models::SkuNameEnum Certificate = Azure::Automation::Mgmt::V2015_10_31::Models::Certificate + Variable = Azure::Automation::Mgmt::V2015_10_31::Models::Variable Webhook = Azure::Automation::Mgmt::V2015_10_31::Models::Webhook + SkuNameEnum = Azure::Automation::Mgmt::V2015_10_31::Models::SkuNameEnum + Schedule = Azure::Automation::Mgmt::V2015_10_31::Models::Schedule + AutomationKeyName = Azure::Automation::Mgmt::V2015_10_31::Models::AutomationKeyName AutomationKeyPermissions = Azure::Automation::Mgmt::V2015_10_31::Models::AutomationKeyPermissions + JobProvisioningState = Azure::Automation::Mgmt::V2015_10_31::Models::JobProvisioningState AutomationAccountState = Azure::Automation::Mgmt::V2015_10_31::Models::AutomationAccountState - Variable = Azure::Automation::Mgmt::V2015_10_31::Models::Variable JobStreamType = Azure::Automation::Mgmt::V2015_10_31::Models::JobStreamType - Connection = Azure::Automation::Mgmt::V2015_10_31::Models::Connection - JobStatus = Azure::Automation::Mgmt::V2015_10_31::Models::JobStatus - AutomationKeyName = Azure::Automation::Mgmt::V2015_10_31::Models::AutomationKeyName ContentSourceType = Azure::Automation::Mgmt::V2015_10_31::Models::ContentSourceType - JobProvisioningState = Azure::Automation::Mgmt::V2015_10_31::Models::JobProvisioningState - DscConfigurationState = Azure::Automation::Mgmt::V2015_10_31::Models::DscConfigurationState + DscConfigurationProvisioningState = Azure::Automation::Mgmt::V2015_10_31::Models::DscConfigurationProvisioningState + JobStatus = Azure::Automation::Mgmt::V2015_10_31::Models::JobStatus AgentRegistrationKeyName = Azure::Automation::Mgmt::V2015_10_31::Models::AgentRegistrationKeyName GroupTypeEnum = Azure::Automation::Mgmt::V2015_10_31::Models::GroupTypeEnum - DscConfigurationProvisioningState = Azure::Automation::Mgmt::V2015_10_31::Models::DscConfigurationProvisioningState - RunbookTypeEnum = Azure::Automation::Mgmt::V2015_10_31::Models::RunbookTypeEnum + ModuleProvisioningState = Azure::Automation::Mgmt::V2015_10_31::Models::ModuleProvisioningState + DscConfigurationState = Azure::Automation::Mgmt::V2015_10_31::Models::DscConfigurationState RunbookState = Azure::Automation::Mgmt::V2015_10_31::Models::RunbookState RunbookProvisioningState = Azure::Automation::Mgmt::V2015_10_31::Models::RunbookProvisioningState - ModuleProvisioningState = Azure::Automation::Mgmt::V2015_10_31::Models::ModuleProvisioningState - ScheduleFrequency = Azure::Automation::Mgmt::V2015_10_31::Models::ScheduleFrequency ScheduleDay = Azure::Automation::Mgmt::V2015_10_31::Models::ScheduleDay + RunbookTypeEnum = Azure::Automation::Mgmt::V2015_10_31::Models::RunbookTypeEnum + ScheduleFrequency = Azure::Automation::Mgmt::V2015_10_31::Models::ScheduleFrequency Usage = Azure::Automation::Mgmt::V2015_10_31::Models::Usage Sku = Azure::Automation::Mgmt::V2015_10_31::Models::Sku ErrorResponse = Azure::Automation::Mgmt::V2015_10_31::Models::ErrorResponse @@ -182,7 +182,7 @@ module Models end class AutomationManagementClass - attr_reader :connection_operations, :connection_type_operations, :credential_operations, :dsc_compilation_job_operations, :dsc_compilation_job_stream, :dsc_configuration_operations, :agent_registration_information, :dsc_node_operations, :node_reports, :dsc_node_configuration_operations, :hybrid_runbook_worker_group_operations, :job_operations, :job_stream_operations, :job_schedule_operations, :linked_workspace_operations, :operations, :activity_operations, :module_model_operations, :object_data_types, :fields, :runbook_draft_operations, :runbook_operations, :test_job_streams, :test_job_operations, :schedule_operations, :variable_operations, :webhook_operations, :usages, :automation_account_operations, :statistics_operations, :keys, :certificate_operations, :configurable, :base_url, :options, :model_classes + attr_reader :certificate_operations, :connection_operations, :connection_type_operations, :credential_operations, :dsc_compilation_job_operations, :dsc_compilation_job_stream, :dsc_configuration_operations, :agent_registration_information, :dsc_node_operations, :node_reports, :dsc_node_configuration_operations, :hybrid_runbook_worker_group_operations, :job_operations, :job_stream_operations, :job_schedule_operations, :linked_workspace_operations, :operations, :activity_operations, :module_model_operations, :object_data_types, :fields, :runbook_draft_operations, :runbook_operations, :test_job_streams, :test_job_operations, :schedule_operations, :variable_operations, :webhook_operations, :usages, :automation_account_operations, :statistics_operations, :keys, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -192,6 +192,7 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) + @certificate_operations = @client_0.certificate_operations @connection_operations = @client_0.connection_operations @connection_type_operations = @client_0.connection_type_operations @credential_operations = @client_0.credential_operations @@ -223,7 +224,6 @@ def initialize(configurable, base_url=nil, options=nil) @automation_account_operations = @client_0.automation_account_operations @statistics_operations = @client_0.statistics_operations @keys = @client_0.keys - @certificate_operations = @client_0.certificate_operations @model_classes = ModelClasses.new end @@ -545,8 +545,8 @@ def runbook_create_or_update_draft_properties def credential Azure::Automation::Mgmt::V2015_10_31::Models::Credential end - def dsc_compilation_job - Azure::Automation::Mgmt::V2015_10_31::Models::DscCompilationJob + def connection + Azure::Automation::Mgmt::V2015_10_31::Models::Connection end def certificate_create_or_update_parameters Azure::Automation::Mgmt::V2015_10_31::Models::CertificateCreateOrUpdateParameters @@ -554,8 +554,8 @@ def certificate_create_or_update_parameters def dsc_node Azure::Automation::Mgmt::V2015_10_31::Models::DscNode end - def dsc_node_configuration - Azure::Automation::Mgmt::V2015_10_31::Models::DscNodeConfiguration + def dsc_compilation_job + Azure::Automation::Mgmt::V2015_10_31::Models::DscCompilationJob end def dsc_configuration Azure::Automation::Mgmt::V2015_10_31::Models::DscConfiguration @@ -563,8 +563,8 @@ def dsc_configuration def automation_account Azure::Automation::Mgmt::V2015_10_31::Models::AutomationAccount end - def schedule - Azure::Automation::Mgmt::V2015_10_31::Models::Schedule + def dsc_node_configuration + Azure::Automation::Mgmt::V2015_10_31::Models::DscNodeConfiguration end def module_model Azure::Automation::Mgmt::V2015_10_31::Models::ModuleModel @@ -572,44 +572,44 @@ def module_model def runbook Azure::Automation::Mgmt::V2015_10_31::Models::Runbook end - def sku_name_enum - Azure::Automation::Mgmt::V2015_10_31::Models::SkuNameEnum - end def certificate Azure::Automation::Mgmt::V2015_10_31::Models::Certificate end + def variable + Azure::Automation::Mgmt::V2015_10_31::Models::Variable + end def webhook Azure::Automation::Mgmt::V2015_10_31::Models::Webhook end + def sku_name_enum + Azure::Automation::Mgmt::V2015_10_31::Models::SkuNameEnum + end + def schedule + Azure::Automation::Mgmt::V2015_10_31::Models::Schedule + end + def automation_key_name + Azure::Automation::Mgmt::V2015_10_31::Models::AutomationKeyName + end def automation_key_permissions Azure::Automation::Mgmt::V2015_10_31::Models::AutomationKeyPermissions end + def job_provisioning_state + Azure::Automation::Mgmt::V2015_10_31::Models::JobProvisioningState + end def automation_account_state Azure::Automation::Mgmt::V2015_10_31::Models::AutomationAccountState end - def variable - Azure::Automation::Mgmt::V2015_10_31::Models::Variable - end def job_stream_type Azure::Automation::Mgmt::V2015_10_31::Models::JobStreamType end - def connection - Azure::Automation::Mgmt::V2015_10_31::Models::Connection - end - def job_status - Azure::Automation::Mgmt::V2015_10_31::Models::JobStatus - end - def automation_key_name - Azure::Automation::Mgmt::V2015_10_31::Models::AutomationKeyName - end def content_source_type Azure::Automation::Mgmt::V2015_10_31::Models::ContentSourceType end - def job_provisioning_state - Azure::Automation::Mgmt::V2015_10_31::Models::JobProvisioningState + def dsc_configuration_provisioning_state + Azure::Automation::Mgmt::V2015_10_31::Models::DscConfigurationProvisioningState end - def dsc_configuration_state - Azure::Automation::Mgmt::V2015_10_31::Models::DscConfigurationState + def job_status + Azure::Automation::Mgmt::V2015_10_31::Models::JobStatus end def agent_registration_key_name Azure::Automation::Mgmt::V2015_10_31::Models::AgentRegistrationKeyName @@ -617,11 +617,11 @@ def agent_registration_key_name def group_type_enum Azure::Automation::Mgmt::V2015_10_31::Models::GroupTypeEnum end - def dsc_configuration_provisioning_state - Azure::Automation::Mgmt::V2015_10_31::Models::DscConfigurationProvisioningState + def module_provisioning_state + Azure::Automation::Mgmt::V2015_10_31::Models::ModuleProvisioningState end - def runbook_type_enum - Azure::Automation::Mgmt::V2015_10_31::Models::RunbookTypeEnum + def dsc_configuration_state + Azure::Automation::Mgmt::V2015_10_31::Models::DscConfigurationState end def runbook_state Azure::Automation::Mgmt::V2015_10_31::Models::RunbookState @@ -629,15 +629,15 @@ def runbook_state def runbook_provisioning_state Azure::Automation::Mgmt::V2015_10_31::Models::RunbookProvisioningState end - def module_provisioning_state - Azure::Automation::Mgmt::V2015_10_31::Models::ModuleProvisioningState + def schedule_day + Azure::Automation::Mgmt::V2015_10_31::Models::ScheduleDay + end + def runbook_type_enum + Azure::Automation::Mgmt::V2015_10_31::Models::RunbookTypeEnum end def schedule_frequency Azure::Automation::Mgmt::V2015_10_31::Models::ScheduleFrequency end - def schedule_day - Azure::Automation::Mgmt::V2015_10_31::Models::ScheduleDay - end def usage Azure::Automation::Mgmt::V2015_10_31::Models::Usage end diff --git a/azure_sdk/lib/latest/modules/batch_profile_module.rb b/azure_sdk/lib/latest/modules/batch_profile_module.rb index 903356eb48..49ca2fc344 100644 --- a/azure_sdk/lib/latest/modules/batch_profile_module.rb +++ b/azure_sdk/lib/latest/modules/batch_profile_module.rb @@ -9,13 +9,14 @@ module Batch module Mgmt Location = Azure::Batch::Mgmt::V2017_09_01::Location Operations = Azure::Batch::Mgmt::V2017_09_01::Operations + CertificateOperations = Azure::Batch::Mgmt::V2017_09_01::CertificateOperations BatchAccountOperations = Azure::Batch::Mgmt::V2017_09_01::BatchAccountOperations ApplicationPackageOperations = Azure::Batch::Mgmt::V2017_09_01::ApplicationPackageOperations ApplicationOperations = Azure::Batch::Mgmt::V2017_09_01::ApplicationOperations PoolOperations = Azure::Batch::Mgmt::V2017_09_01::PoolOperations - CertificateOperations = Azure::Batch::Mgmt::V2017_09_01::CertificateOperations module Models + CheckNameAvailabilityParameters = Azure::Batch::Mgmt::V2017_09_01::Models::CheckNameAvailabilityParameters TaskSchedulingPolicy = Azure::Batch::Mgmt::V2017_09_01::Models::TaskSchedulingPolicy CloudServiceConfiguration = Azure::Batch::Mgmt::V2017_09_01::Models::CloudServiceConfiguration LinuxUserConfiguration = Azure::Batch::Mgmt::V2017_09_01::Models::LinuxUserConfiguration @@ -51,23 +52,23 @@ module Models PackageState = Azure::Batch::Mgmt::V2017_09_01::Models::PackageState PoolAllocationMode = Azure::Batch::Mgmt::V2017_09_01::Models::PoolAllocationMode AccountKeyType = Azure::Batch::Mgmt::V2017_09_01::Models::AccountKeyType - PoolProvisioningState = Azure::Batch::Mgmt::V2017_09_01::Models::PoolProvisioningState Certificate = Azure::Batch::Mgmt::V2017_09_01::Models::Certificate + CertificateCreateOrUpdateParameters = Azure::Batch::Mgmt::V2017_09_01::Models::CertificateCreateOrUpdateParameters CertificateProvisioningState = Azure::Batch::Mgmt::V2017_09_01::Models::CertificateProvisioningState - StorageAccountType = Azure::Batch::Mgmt::V2017_09_01::Models::StorageAccountType + PoolProvisioningState = Azure::Batch::Mgmt::V2017_09_01::Models::PoolProvisioningState AllocationState = Azure::Batch::Mgmt::V2017_09_01::Models::AllocationState CertificateFormat = Azure::Batch::Mgmt::V2017_09_01::Models::CertificateFormat - InboundEndpointProtocol = Azure::Batch::Mgmt::V2017_09_01::Models::InboundEndpointProtocol + StorageAccountType = Azure::Batch::Mgmt::V2017_09_01::Models::StorageAccountType ComputeNodeDeallocationOption = Azure::Batch::Mgmt::V2017_09_01::Models::ComputeNodeDeallocationOption - CertificateCreateOrUpdateParameters = Azure::Batch::Mgmt::V2017_09_01::Models::CertificateCreateOrUpdateParameters + InterNodeCommunicationState = Azure::Batch::Mgmt::V2017_09_01::Models::InterNodeCommunicationState CachingType = Azure::Batch::Mgmt::V2017_09_01::Models::CachingType NetworkSecurityGroupRuleAccess = Azure::Batch::Mgmt::V2017_09_01::Models::NetworkSecurityGroupRuleAccess ComputeNodeFillType = Azure::Batch::Mgmt::V2017_09_01::Models::ComputeNodeFillType - InterNodeCommunicationState = Azure::Batch::Mgmt::V2017_09_01::Models::InterNodeCommunicationState - AutoUserScope = Azure::Batch::Mgmt::V2017_09_01::Models::AutoUserScope + ElevationLevel = Azure::Batch::Mgmt::V2017_09_01::Models::ElevationLevel + InboundEndpointProtocol = Azure::Batch::Mgmt::V2017_09_01::Models::InboundEndpointProtocol CertificateStoreLocation = Azure::Batch::Mgmt::V2017_09_01::Models::CertificateStoreLocation CertificateVisibility = Azure::Batch::Mgmt::V2017_09_01::Models::CertificateVisibility - ElevationLevel = Azure::Batch::Mgmt::V2017_09_01::Models::ElevationLevel + AutoUserScope = Azure::Batch::Mgmt::V2017_09_01::Models::AutoUserScope NameAvailabilityReason = Azure::Batch::Mgmt::V2017_09_01::Models::NameAvailabilityReason Resource = Azure::Batch::Mgmt::V2017_09_01::Models::Resource OperationDisplay = Azure::Batch::Mgmt::V2017_09_01::Models::OperationDisplay @@ -86,19 +87,18 @@ module Models BatchAccountUpdateParameters = Azure::Batch::Mgmt::V2017_09_01::Models::BatchAccountUpdateParameters BatchAccountRegenerateKeyParameters = Azure::Batch::Mgmt::V2017_09_01::Models::BatchAccountRegenerateKeyParameters ActivateApplicationPackageParameters = Azure::Batch::Mgmt::V2017_09_01::Models::ActivateApplicationPackageParameters - AutoScaleRunError = Azure::Batch::Mgmt::V2017_09_01::Models::AutoScaleRunError ProxyResource = Azure::Batch::Mgmt::V2017_09_01::Models::ProxyResource - ListApplicationsResult = Azure::Batch::Mgmt::V2017_09_01::Models::ListApplicationsResult ApplicationPackage = Azure::Batch::Mgmt::V2017_09_01::Models::ApplicationPackage - NetworkSecurityGroupRule = Azure::Batch::Mgmt::V2017_09_01::Models::NetworkSecurityGroupRule + AutoScaleRunError = Azure::Batch::Mgmt::V2017_09_01::Models::AutoScaleRunError + ListApplicationsResult = Azure::Batch::Mgmt::V2017_09_01::Models::ListApplicationsResult + AutoScaleRun = Azure::Batch::Mgmt::V2017_09_01::Models::AutoScaleRun BatchLocationQuota = Azure::Batch::Mgmt::V2017_09_01::Models::BatchLocationQuota + NetworkSecurityGroupRule = Azure::Batch::Mgmt::V2017_09_01::Models::NetworkSecurityGroupRule DeleteCertificateError = Azure::Batch::Mgmt::V2017_09_01::Models::DeleteCertificateError - AutoScaleRun = Azure::Batch::Mgmt::V2017_09_01::Models::AutoScaleRun - CheckNameAvailabilityParameters = Azure::Batch::Mgmt::V2017_09_01::Models::CheckNameAvailabilityParameters end class BatchManagementClass - attr_reader :location, :operations, :batch_account_operations, :application_package_operations, :application_operations, :pool_operations, :certificate_operations, :configurable, :base_url, :options, :model_classes + attr_reader :location, :operations, :certificate_operations, :batch_account_operations, :application_package_operations, :application_operations, :pool_operations, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -110,11 +110,11 @@ def initialize(configurable, base_url=nil, options=nil) add_telemetry(@client_0) @location = @client_0.location @operations = @client_0.operations + @certificate_operations = @client_0.certificate_operations @batch_account_operations = @client_0.batch_account_operations @application_package_operations = @client_0.application_package_operations @application_operations = @client_0.application_operations @pool_operations = @client_0.pool_operations - @certificate_operations = @client_0.certificate_operations @model_classes = ModelClasses.new end @@ -133,6 +133,9 @@ def method_missing(method, *args) end class ModelClasses + def check_name_availability_parameters + Azure::Batch::Mgmt::V2017_09_01::Models::CheckNameAvailabilityParameters + end def task_scheduling_policy Azure::Batch::Mgmt::V2017_09_01::Models::TaskSchedulingPolicy end @@ -238,17 +241,17 @@ def pool_allocation_mode def account_key_type Azure::Batch::Mgmt::V2017_09_01::Models::AccountKeyType end - def pool_provisioning_state - Azure::Batch::Mgmt::V2017_09_01::Models::PoolProvisioningState - end def certificate Azure::Batch::Mgmt::V2017_09_01::Models::Certificate end + def certificate_create_or_update_parameters + Azure::Batch::Mgmt::V2017_09_01::Models::CertificateCreateOrUpdateParameters + end def certificate_provisioning_state Azure::Batch::Mgmt::V2017_09_01::Models::CertificateProvisioningState end - def storage_account_type - Azure::Batch::Mgmt::V2017_09_01::Models::StorageAccountType + def pool_provisioning_state + Azure::Batch::Mgmt::V2017_09_01::Models::PoolProvisioningState end def allocation_state Azure::Batch::Mgmt::V2017_09_01::Models::AllocationState @@ -256,14 +259,14 @@ def allocation_state def certificate_format Azure::Batch::Mgmt::V2017_09_01::Models::CertificateFormat end - def inbound_endpoint_protocol - Azure::Batch::Mgmt::V2017_09_01::Models::InboundEndpointProtocol + def storage_account_type + Azure::Batch::Mgmt::V2017_09_01::Models::StorageAccountType end def compute_node_deallocation_option Azure::Batch::Mgmt::V2017_09_01::Models::ComputeNodeDeallocationOption end - def certificate_create_or_update_parameters - Azure::Batch::Mgmt::V2017_09_01::Models::CertificateCreateOrUpdateParameters + def inter_node_communication_state + Azure::Batch::Mgmt::V2017_09_01::Models::InterNodeCommunicationState end def caching_type Azure::Batch::Mgmt::V2017_09_01::Models::CachingType @@ -274,11 +277,11 @@ def network_security_group_rule_access def compute_node_fill_type Azure::Batch::Mgmt::V2017_09_01::Models::ComputeNodeFillType end - def inter_node_communication_state - Azure::Batch::Mgmt::V2017_09_01::Models::InterNodeCommunicationState + def elevation_level + Azure::Batch::Mgmt::V2017_09_01::Models::ElevationLevel end - def auto_user_scope - Azure::Batch::Mgmt::V2017_09_01::Models::AutoUserScope + def inbound_endpoint_protocol + Azure::Batch::Mgmt::V2017_09_01::Models::InboundEndpointProtocol end def certificate_store_location Azure::Batch::Mgmt::V2017_09_01::Models::CertificateStoreLocation @@ -286,8 +289,8 @@ def certificate_store_location def certificate_visibility Azure::Batch::Mgmt::V2017_09_01::Models::CertificateVisibility end - def elevation_level - Azure::Batch::Mgmt::V2017_09_01::Models::ElevationLevel + def auto_user_scope + Azure::Batch::Mgmt::V2017_09_01::Models::AutoUserScope end def name_availability_reason Azure::Batch::Mgmt::V2017_09_01::Models::NameAvailabilityReason @@ -343,33 +346,30 @@ def batch_account_regenerate_key_parameters def activate_application_package_parameters Azure::Batch::Mgmt::V2017_09_01::Models::ActivateApplicationPackageParameters end - def auto_scale_run_error - Azure::Batch::Mgmt::V2017_09_01::Models::AutoScaleRunError - end def proxy_resource Azure::Batch::Mgmt::V2017_09_01::Models::ProxyResource end - def list_applications_result - Azure::Batch::Mgmt::V2017_09_01::Models::ListApplicationsResult - end def application_package Azure::Batch::Mgmt::V2017_09_01::Models::ApplicationPackage end - def network_security_group_rule - Azure::Batch::Mgmt::V2017_09_01::Models::NetworkSecurityGroupRule + def auto_scale_run_error + Azure::Batch::Mgmt::V2017_09_01::Models::AutoScaleRunError + end + def list_applications_result + Azure::Batch::Mgmt::V2017_09_01::Models::ListApplicationsResult + end + def auto_scale_run + Azure::Batch::Mgmt::V2017_09_01::Models::AutoScaleRun end def batch_location_quota Azure::Batch::Mgmt::V2017_09_01::Models::BatchLocationQuota end + def network_security_group_rule + Azure::Batch::Mgmt::V2017_09_01::Models::NetworkSecurityGroupRule + end def delete_certificate_error Azure::Batch::Mgmt::V2017_09_01::Models::DeleteCertificateError end - def auto_scale_run - Azure::Batch::Mgmt::V2017_09_01::Models::AutoScaleRun - end - def check_name_availability_parameters - Azure::Batch::Mgmt::V2017_09_01::Models::CheckNameAvailabilityParameters - end end end end diff --git a/azure_sdk/lib/latest/modules/billing_profile_module.rb b/azure_sdk/lib/latest/modules/billing_profile_module.rb index 91abf658cd..a9b798eeee 100644 --- a/azure_sdk/lib/latest/modules/billing_profile_module.rb +++ b/azure_sdk/lib/latest/modules/billing_profile_module.rb @@ -7,10 +7,10 @@ module Azure::Profiles::Latest module Billing module Mgmt + Operations = Azure::Billing::Mgmt::V2018_03_01_preview::Operations EnrollmentAccounts = Azure::Billing::Mgmt::V2018_03_01_preview::EnrollmentAccounts BillingPeriods = Azure::Billing::Mgmt::V2018_03_01_preview::BillingPeriods Invoices = Azure::Billing::Mgmt::V2018_03_01_preview::Invoices - Operations = Azure::Billing::Mgmt::V2018_03_01_preview::Operations module Models ErrorDetails = Azure::Billing::Mgmt::V2018_03_01_preview::Models::ErrorDetails @@ -29,7 +29,7 @@ module Models end class BillingManagementClass - attr_reader :enrollment_accounts, :billing_periods, :invoices, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :enrollment_accounts, :billing_periods, :invoices, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -39,10 +39,10 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) + @operations = @client_0.operations @enrollment_accounts = @client_0.enrollment_accounts @billing_periods = @client_0.billing_periods @invoices = @client_0.invoices - @operations = @client_0.operations @model_classes = ModelClasses.new end diff --git a/azure_sdk/lib/latest/modules/cdn_profile_module.rb b/azure_sdk/lib/latest/modules/cdn_profile_module.rb index ccb1bcc48e..40d53f49c8 100644 --- a/azure_sdk/lib/latest/modules/cdn_profile_module.rb +++ b/azure_sdk/lib/latest/modules/cdn_profile_module.rb @@ -7,15 +7,16 @@ module Azure::Profiles::Latest module CDN module Mgmt + Operations = Azure::CDN::Mgmt::V2017_10_12::Operations Endpoints = Azure::CDN::Mgmt::V2017_10_12::Endpoints Profiles = Azure::CDN::Mgmt::V2017_10_12::Profiles Origins = Azure::CDN::Mgmt::V2017_10_12::Origins CustomDomains = Azure::CDN::Mgmt::V2017_10_12::CustomDomains ResourceUsageOperations = Azure::CDN::Mgmt::V2017_10_12::ResourceUsageOperations EdgeNodes = Azure::CDN::Mgmt::V2017_10_12::EdgeNodes - Operations = Azure::CDN::Mgmt::V2017_10_12::Operations module Models + CheckNameAvailabilityInput = Azure::CDN::Mgmt::V2017_10_12::Models::CheckNameAvailabilityInput DeliveryRuleCondition = Azure::CDN::Mgmt::V2017_10_12::Models::DeliveryRuleCondition CheckNameAvailabilityOutput = Azure::CDN::Mgmt::V2017_10_12::Models::CheckNameAvailabilityOutput UrlPathConditionParameters = Azure::CDN::Mgmt::V2017_10_12::Models::UrlPathConditionParameters @@ -33,32 +34,32 @@ module Models DeliveryRuleUrlPathCondition = Azure::CDN::Mgmt::V2017_10_12::Models::DeliveryRuleUrlPathCondition DeliveryRuleUrlFileExtensionCondition = Azure::CDN::Mgmt::V2017_10_12::Models::DeliveryRuleUrlFileExtensionCondition DeliveryRuleCacheExpirationAction = Azure::CDN::Mgmt::V2017_10_12::Models::DeliveryRuleCacheExpirationAction - ValidateCustomDomainInput = Azure::CDN::Mgmt::V2017_10_12::Models::ValidateCustomDomainInput - IpAddressGroup = Azure::CDN::Mgmt::V2017_10_12::Models::IpAddressGroup - ProxyResource = Azure::CDN::Mgmt::V2017_10_12::Models::ProxyResource Origin = Azure::CDN::Mgmt::V2017_10_12::Models::Origin + PurgeParameters = Azure::CDN::Mgmt::V2017_10_12::Models::PurgeParameters + ValidateCustomDomainOutput = Azure::CDN::Mgmt::V2017_10_12::Models::ValidateCustomDomainOutput + EdgeNode = Azure::CDN::Mgmt::V2017_10_12::Models::EdgeNode ProfileResourceState = Azure::CDN::Mgmt::V2017_10_12::Models::ProfileResourceState OptimizationType = Azure::CDN::Mgmt::V2017_10_12::Models::OptimizationType - EdgeNode = Azure::CDN::Mgmt::V2017_10_12::Models::EdgeNode + EndpointResourceState = Azure::CDN::Mgmt::V2017_10_12::Models::EndpointResourceState QueryStringCachingBehavior = Azure::CDN::Mgmt::V2017_10_12::Models::QueryStringCachingBehavior TrackedResource = Azure::CDN::Mgmt::V2017_10_12::Models::TrackedResource - EndpointResourceState = Azure::CDN::Mgmt::V2017_10_12::Models::EndpointResourceState - CustomDomainResourceState = Azure::CDN::Mgmt::V2017_10_12::Models::CustomDomainResourceState - GeoFilterActions = Azure::CDN::Mgmt::V2017_10_12::Models::GeoFilterActions OriginResourceState = Azure::CDN::Mgmt::V2017_10_12::Models::OriginResourceState - CustomHttpsProvisioningState = Azure::CDN::Mgmt::V2017_10_12::Models::CustomHttpsProvisioningState + ProxyResource = Azure::CDN::Mgmt::V2017_10_12::Models::ProxyResource + GeoFilterActions = Azure::CDN::Mgmt::V2017_10_12::Models::GeoFilterActions CustomHttpsProvisioningSubstate = Azure::CDN::Mgmt::V2017_10_12::Models::CustomHttpsProvisioningSubstate + CustomDomainResourceState = Azure::CDN::Mgmt::V2017_10_12::Models::CustomDomainResourceState + CustomHttpsProvisioningState = Azure::CDN::Mgmt::V2017_10_12::Models::CustomHttpsProvisioningState CustomDomain = Azure::CDN::Mgmt::V2017_10_12::Models::CustomDomain Resource = Azure::CDN::Mgmt::V2017_10_12::Models::Resource OperationDisplay = Azure::CDN::Mgmt::V2017_10_12::Models::OperationDisplay - Operation = Azure::CDN::Mgmt::V2017_10_12::Models::Operation ResourceType = Azure::CDN::Mgmt::V2017_10_12::Models::ResourceType + Operation = Azure::CDN::Mgmt::V2017_10_12::Models::Operation SkuName = Azure::CDN::Mgmt::V2017_10_12::Models::SkuName OriginUpdateParameters = Azure::CDN::Mgmt::V2017_10_12::Models::OriginUpdateParameters OriginListResult = Azure::CDN::Mgmt::V2017_10_12::Models::OriginListResult ProfileListResult = Azure::CDN::Mgmt::V2017_10_12::Models::ProfileListResult - PurgeParameters = Azure::CDN::Mgmt::V2017_10_12::Models::PurgeParameters Sku = Azure::CDN::Mgmt::V2017_10_12::Models::Sku + SsoUri = Azure::CDN::Mgmt::V2017_10_12::Models::SsoUri LoadParameters = Azure::CDN::Mgmt::V2017_10_12::Models::LoadParameters ErrorResponse = Azure::CDN::Mgmt::V2017_10_12::Models::ErrorResponse DeepCreatedOrigin = Azure::CDN::Mgmt::V2017_10_12::Models::DeepCreatedOrigin @@ -68,17 +69,16 @@ module Models DeliveryRuleAction = Azure::CDN::Mgmt::V2017_10_12::Models::DeliveryRuleAction ProfileUpdateParameters = Azure::CDN::Mgmt::V2017_10_12::Models::ProfileUpdateParameters DeliveryRule = Azure::CDN::Mgmt::V2017_10_12::Models::DeliveryRule - SsoUri = Azure::CDN::Mgmt::V2017_10_12::Models::SsoUri - CustomDomainParameters = Azure::CDN::Mgmt::V2017_10_12::Models::CustomDomainParameters EndpointUpdateParameters = Azure::CDN::Mgmt::V2017_10_12::Models::EndpointUpdateParameters - CustomDomainListResult = Azure::CDN::Mgmt::V2017_10_12::Models::CustomDomainListResult + CustomDomainParameters = Azure::CDN::Mgmt::V2017_10_12::Models::CustomDomainParameters EdgenodeResult = Azure::CDN::Mgmt::V2017_10_12::Models::EdgenodeResult - ValidateCustomDomainOutput = Azure::CDN::Mgmt::V2017_10_12::Models::ValidateCustomDomainOutput - CheckNameAvailabilityInput = Azure::CDN::Mgmt::V2017_10_12::Models::CheckNameAvailabilityInput + ValidateCustomDomainInput = Azure::CDN::Mgmt::V2017_10_12::Models::ValidateCustomDomainInput + IpAddressGroup = Azure::CDN::Mgmt::V2017_10_12::Models::IpAddressGroup + CustomDomainListResult = Azure::CDN::Mgmt::V2017_10_12::Models::CustomDomainListResult end class CDNManagementClass - attr_reader :endpoints, :profiles, :origins, :custom_domains, :resource_usage_operations, :edge_nodes, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :endpoints, :profiles, :origins, :custom_domains, :resource_usage_operations, :edge_nodes, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -88,13 +88,13 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) + @operations = @client_0.operations @endpoints = @client_0.endpoints @profiles = @client_0.profiles @origins = @client_0.origins @custom_domains = @client_0.custom_domains @resource_usage_operations = @client_0.resource_usage_operations @edge_nodes = @client_0.edge_nodes - @operations = @client_0.operations @model_classes = ModelClasses.new end @@ -113,6 +113,9 @@ def method_missing(method, *args) end class ModelClasses + def check_name_availability_input + Azure::CDN::Mgmt::V2017_10_12::Models::CheckNameAvailabilityInput + end def delivery_rule_condition Azure::CDN::Mgmt::V2017_10_12::Models::DeliveryRuleCondition end @@ -164,17 +167,17 @@ def delivery_rule_url_file_extension_condition def delivery_rule_cache_expiration_action Azure::CDN::Mgmt::V2017_10_12::Models::DeliveryRuleCacheExpirationAction end - def validate_custom_domain_input - Azure::CDN::Mgmt::V2017_10_12::Models::ValidateCustomDomainInput + def origin + Azure::CDN::Mgmt::V2017_10_12::Models::Origin end - def ip_address_group - Azure::CDN::Mgmt::V2017_10_12::Models::IpAddressGroup + def purge_parameters + Azure::CDN::Mgmt::V2017_10_12::Models::PurgeParameters end - def proxy_resource - Azure::CDN::Mgmt::V2017_10_12::Models::ProxyResource + def validate_custom_domain_output + Azure::CDN::Mgmt::V2017_10_12::Models::ValidateCustomDomainOutput end - def origin - Azure::CDN::Mgmt::V2017_10_12::Models::Origin + def edge_node + Azure::CDN::Mgmt::V2017_10_12::Models::EdgeNode end def profile_resource_state Azure::CDN::Mgmt::V2017_10_12::Models::ProfileResourceState @@ -182,8 +185,8 @@ def profile_resource_state def optimization_type Azure::CDN::Mgmt::V2017_10_12::Models::OptimizationType end - def edge_node - Azure::CDN::Mgmt::V2017_10_12::Models::EdgeNode + def endpoint_resource_state + Azure::CDN::Mgmt::V2017_10_12::Models::EndpointResourceState end def query_string_caching_behavior Azure::CDN::Mgmt::V2017_10_12::Models::QueryStringCachingBehavior @@ -191,24 +194,24 @@ def query_string_caching_behavior def tracked_resource Azure::CDN::Mgmt::V2017_10_12::Models::TrackedResource end - def endpoint_resource_state - Azure::CDN::Mgmt::V2017_10_12::Models::EndpointResourceState + def origin_resource_state + Azure::CDN::Mgmt::V2017_10_12::Models::OriginResourceState end - def custom_domain_resource_state - Azure::CDN::Mgmt::V2017_10_12::Models::CustomDomainResourceState + def proxy_resource + Azure::CDN::Mgmt::V2017_10_12::Models::ProxyResource end def geo_filter_actions Azure::CDN::Mgmt::V2017_10_12::Models::GeoFilterActions end - def origin_resource_state - Azure::CDN::Mgmt::V2017_10_12::Models::OriginResourceState + def custom_https_provisioning_substate + Azure::CDN::Mgmt::V2017_10_12::Models::CustomHttpsProvisioningSubstate + end + def custom_domain_resource_state + Azure::CDN::Mgmt::V2017_10_12::Models::CustomDomainResourceState end def custom_https_provisioning_state Azure::CDN::Mgmt::V2017_10_12::Models::CustomHttpsProvisioningState end - def custom_https_provisioning_substate - Azure::CDN::Mgmt::V2017_10_12::Models::CustomHttpsProvisioningSubstate - end def custom_domain Azure::CDN::Mgmt::V2017_10_12::Models::CustomDomain end @@ -218,12 +221,12 @@ def resource def operation_display Azure::CDN::Mgmt::V2017_10_12::Models::OperationDisplay end - def operation - Azure::CDN::Mgmt::V2017_10_12::Models::Operation - end def resource_type Azure::CDN::Mgmt::V2017_10_12::Models::ResourceType end + def operation + Azure::CDN::Mgmt::V2017_10_12::Models::Operation + end def sku_name Azure::CDN::Mgmt::V2017_10_12::Models::SkuName end @@ -236,12 +239,12 @@ def origin_list_result def profile_list_result Azure::CDN::Mgmt::V2017_10_12::Models::ProfileListResult end - def purge_parameters - Azure::CDN::Mgmt::V2017_10_12::Models::PurgeParameters - end def sku Azure::CDN::Mgmt::V2017_10_12::Models::Sku end + def sso_uri + Azure::CDN::Mgmt::V2017_10_12::Models::SsoUri + end def load_parameters Azure::CDN::Mgmt::V2017_10_12::Models::LoadParameters end @@ -269,26 +272,23 @@ def profile_update_parameters def delivery_rule Azure::CDN::Mgmt::V2017_10_12::Models::DeliveryRule end - def sso_uri - Azure::CDN::Mgmt::V2017_10_12::Models::SsoUri - end - def custom_domain_parameters - Azure::CDN::Mgmt::V2017_10_12::Models::CustomDomainParameters - end def endpoint_update_parameters Azure::CDN::Mgmt::V2017_10_12::Models::EndpointUpdateParameters end - def custom_domain_list_result - Azure::CDN::Mgmt::V2017_10_12::Models::CustomDomainListResult + def custom_domain_parameters + Azure::CDN::Mgmt::V2017_10_12::Models::CustomDomainParameters end def edgenode_result Azure::CDN::Mgmt::V2017_10_12::Models::EdgenodeResult end - def validate_custom_domain_output - Azure::CDN::Mgmt::V2017_10_12::Models::ValidateCustomDomainOutput + def validate_custom_domain_input + Azure::CDN::Mgmt::V2017_10_12::Models::ValidateCustomDomainInput end - def check_name_availability_input - Azure::CDN::Mgmt::V2017_10_12::Models::CheckNameAvailabilityInput + def ip_address_group + Azure::CDN::Mgmt::V2017_10_12::Models::IpAddressGroup + end + def custom_domain_list_result + Azure::CDN::Mgmt::V2017_10_12::Models::CustomDomainListResult end end end diff --git a/azure_sdk/lib/latest/modules/cognitiveservices_profile_module.rb b/azure_sdk/lib/latest/modules/cognitiveservices_profile_module.rb index b1b5038e19..244abd4cfc 100644 --- a/azure_sdk/lib/latest/modules/cognitiveservices_profile_module.rb +++ b/azure_sdk/lib/latest/modules/cognitiveservices_profile_module.rb @@ -7,10 +7,10 @@ module Azure::Profiles::Latest module CognitiveServices module Mgmt + Operations = Azure::CognitiveServices::Mgmt::V2017_04_18::Operations ResourceSkus = Azure::CognitiveServices::Mgmt::V2017_04_18::ResourceSkus Accounts = Azure::CognitiveServices::Mgmt::V2017_04_18::Accounts CheckSkuAvailability = Azure::CognitiveServices::Mgmt::V2017_04_18::CheckSkuAvailability - Operations = Azure::CognitiveServices::Mgmt::V2017_04_18::Operations module Models SkuTier = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::SkuTier @@ -29,10 +29,10 @@ module Models CognitiveServicesAccountListResult = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::CognitiveServicesAccountListResult OperationEntity = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::OperationEntity RegenerateKeyParameters = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::RegenerateKeyParameters - Sku = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::Sku + OperationEntityListResult = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::OperationEntityListResult CognitiveServicesAccountEnumerateSkusResult = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::CognitiveServicesAccountEnumerateSkusResult CheckSkuAvailabilityParameter = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::CheckSkuAvailabilityParameter - OperationEntityListResult = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::OperationEntityListResult + Sku = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::Sku CheckSkuAvailabilityResult = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::CheckSkuAvailabilityResult CognitiveServicesAccountCreateParameters = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::CognitiveServicesAccountCreateParameters CheckSkuAvailabilityResultList = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::CheckSkuAvailabilityResultList @@ -43,13 +43,13 @@ module Models UsagesResult = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::UsagesResult CognitiveServicesResourceAndSku = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::CognitiveServicesResourceAndSku KeyName = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::KeyName - UnitType = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::UnitType Error = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::Error QuotaUsageStatus = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::QuotaUsageStatus + UnitType = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::UnitType end class CognitiveServicesManagementClass - attr_reader :resource_skus, :accounts, :check_sku_availability, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :resource_skus, :accounts, :check_sku_availability, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -59,10 +59,10 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) + @operations = @client_0.operations @resource_skus = @client_0.resource_skus @accounts = @client_0.accounts @check_sku_availability = @client_0.check_sku_availability - @operations = @client_0.operations @model_classes = ModelClasses.new end @@ -129,8 +129,8 @@ def operation_entity def regenerate_key_parameters Azure::CognitiveServices::Mgmt::V2017_04_18::Models::RegenerateKeyParameters end - def sku - Azure::CognitiveServices::Mgmt::V2017_04_18::Models::Sku + def operation_entity_list_result + Azure::CognitiveServices::Mgmt::V2017_04_18::Models::OperationEntityListResult end def cognitive_services_account_enumerate_skus_result Azure::CognitiveServices::Mgmt::V2017_04_18::Models::CognitiveServicesAccountEnumerateSkusResult @@ -138,8 +138,8 @@ def cognitive_services_account_enumerate_skus_result def check_sku_availability_parameter Azure::CognitiveServices::Mgmt::V2017_04_18::Models::CheckSkuAvailabilityParameter end - def operation_entity_list_result - Azure::CognitiveServices::Mgmt::V2017_04_18::Models::OperationEntityListResult + def sku + Azure::CognitiveServices::Mgmt::V2017_04_18::Models::Sku end def check_sku_availability_result Azure::CognitiveServices::Mgmt::V2017_04_18::Models::CheckSkuAvailabilityResult @@ -171,15 +171,15 @@ def cognitive_services_resource_and_sku def key_name Azure::CognitiveServices::Mgmt::V2017_04_18::Models::KeyName end - def unit_type - Azure::CognitiveServices::Mgmt::V2017_04_18::Models::UnitType - end def error Azure::CognitiveServices::Mgmt::V2017_04_18::Models::Error end def quota_usage_status Azure::CognitiveServices::Mgmt::V2017_04_18::Models::QuotaUsageStatus end + def unit_type + Azure::CognitiveServices::Mgmt::V2017_04_18::Models::UnitType + end end end end diff --git a/azure_sdk/lib/latest/modules/compute_profile_module.rb b/azure_sdk/lib/latest/modules/compute_profile_module.rb index 93f561162e..2314d80603 100644 --- a/azure_sdk/lib/latest/modules/compute_profile_module.rb +++ b/azure_sdk/lib/latest/modules/compute_profile_module.rb @@ -30,6 +30,7 @@ module Mgmt GalleryImageVersions = Azure::Compute::Mgmt::V2018_06_01::GalleryImageVersions module Models + ResourceSkuLocationInfo = Azure::Compute::Mgmt::V2017_09_01::Models::ResourceSkuLocationInfo ResourceSkuCapabilities = Azure::Compute::Mgmt::V2017_09_01::Models::ResourceSkuCapabilities ResourceSkuCapacityScaleType = Azure::Compute::Mgmt::V2017_09_01::Models::ResourceSkuCapacityScaleType ResourceSkuRestrictions = Azure::Compute::Mgmt::V2017_09_01::Models::ResourceSkuRestrictions @@ -40,7 +41,6 @@ module Models ResourceSkuRestrictionsReasonCode = Azure::Compute::Mgmt::V2017_09_01::Models::ResourceSkuRestrictionsReasonCode ResourceSkuCapacity = Azure::Compute::Mgmt::V2017_09_01::Models::ResourceSkuCapacity ResourceSkuCosts = Azure::Compute::Mgmt::V2017_09_01::Models::ResourceSkuCosts - ResourceSkuLocationInfo = Azure::Compute::Mgmt::V2017_09_01::Models::ResourceSkuLocationInfo OperationStatusResponse = Azure::Compute::Mgmt::V2017_12_01::Models::OperationStatusResponse ComputeLongRunningOperationProperties = Azure::Compute::Mgmt::V2017_12_01::Models::ComputeLongRunningOperationProperties ComputeOperationValue = Azure::Compute::Mgmt::V2018_06_01::Models::ComputeOperationValue @@ -112,7 +112,7 @@ module Models KeyVaultKeyReference = Azure::Compute::Mgmt::V2018_06_01::Models::KeyVaultKeyReference Sku = Azure::Compute::Mgmt::V2018_06_01::Models::Sku VirtualHardDisk = Azure::Compute::Mgmt::V2018_06_01::Models::VirtualHardDisk - SshConfiguration = Azure::Compute::Mgmt::V2018_06_01::Models::SshConfiguration + NetworkProfile = Azure::Compute::Mgmt::V2018_06_01::Models::NetworkProfile KeyVaultAndSecretReference = Azure::Compute::Mgmt::V2018_06_01::Models::KeyVaultAndSecretReference DiagnosticsProfile = Azure::Compute::Mgmt::V2018_06_01::Models::DiagnosticsProfile SourceVault = Azure::Compute::Mgmt::V2018_06_01::Models::SourceVault @@ -217,7 +217,7 @@ module Models VirtualMachineScaleSetPublicIPAddressConfiguration = Azure::Compute::Mgmt::V2018_06_01::Models::VirtualMachineScaleSetPublicIPAddressConfiguration GalleryImageVersionPublishingProfile = Azure::Compute::Mgmt::V2018_06_01::Models::GalleryImageVersionPublishingProfile VirtualMachineScaleSetUpdatePublicIPAddressConfiguration = Azure::Compute::Mgmt::V2018_06_01::Models::VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - NetworkProfile = Azure::Compute::Mgmt::V2018_06_01::Models::NetworkProfile + GalleryDataDiskImage = Azure::Compute::Mgmt::V2018_06_01::Models::GalleryDataDiskImage GalleryImageVersion = Azure::Compute::Mgmt::V2018_06_01::Models::GalleryImageVersion VirtualMachineScaleSetDataDisk = Azure::Compute::Mgmt::V2018_06_01::Models::VirtualMachineScaleSetDataDisk StorageProfile = Azure::Compute::Mgmt::V2018_06_01::Models::StorageProfile @@ -226,31 +226,31 @@ module Models VirtualMachineScaleSetUpdateStorageProfile = Azure::Compute::Mgmt::V2018_06_01::Models::VirtualMachineScaleSetUpdateStorageProfile VirtualMachineSizeTypes = Azure::Compute::Mgmt::V2018_06_01::Models::VirtualMachineSizeTypes RunCommandDocument = Azure::Compute::Mgmt::V2018_06_01::Models::RunCommandDocument - DiskCreateOptionTypes = Azure::Compute::Mgmt::V2018_06_01::Models::DiskCreateOptionTypes + SshConfiguration = Azure::Compute::Mgmt::V2018_06_01::Models::SshConfiguration VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings = Azure::Compute::Mgmt::V2018_06_01::Models::VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings OperatingSystemTypes = Azure::Compute::Mgmt::V2018_06_01::Models::OperatingSystemTypes Gallery = Azure::Compute::Mgmt::V2018_06_01::Models::Gallery GalleryImage = Azure::Compute::Mgmt::V2018_06_01::Models::GalleryImage - ProtocolTypes = Azure::Compute::Mgmt::V2018_06_01::Models::ProtocolTypes + DiskCreateOptionTypes = Azure::Compute::Mgmt::V2018_06_01::Models::DiskCreateOptionTypes GalleryOSDiskImage = Azure::Compute::Mgmt::V2018_06_01::Models::GalleryOSDiskImage - GalleryDataDiskImage = Azure::Compute::Mgmt::V2018_06_01::Models::GalleryDataDiskImage + PassNames = Azure::Compute::Mgmt::V2018_06_01::Models::PassNames ComponentNames = Azure::Compute::Mgmt::V2018_06_01::Models::ComponentNames AvailabilitySetSkuTypes = Azure::Compute::Mgmt::V2018_06_01::Models::AvailabilitySetSkuTypes Snapshot = Azure::Compute::Mgmt::V2018_06_01::Models::Snapshot ResourceIdentityType = Azure::Compute::Mgmt::V2018_06_01::Models::ResourceIdentityType StorageAccountTypes = Azure::Compute::Mgmt::V2018_06_01::Models::StorageAccountTypes - PassNames = Azure::Compute::Mgmt::V2018_06_01::Models::PassNames + UpgradeMode = Azure::Compute::Mgmt::V2018_06_01::Models::UpgradeMode OperatingSystemStateTypes = Azure::Compute::Mgmt::V2018_06_01::Models::OperatingSystemStateTypes SettingNames = Azure::Compute::Mgmt::V2018_06_01::Models::SettingNames - RollingUpgradeActionType = Azure::Compute::Mgmt::V2018_06_01::Models::RollingUpgradeActionType + ProtocolTypes = Azure::Compute::Mgmt::V2018_06_01::Models::ProtocolTypes CachingTypes = Azure::Compute::Mgmt::V2018_06_01::Models::CachingTypes MaintenanceOperationResultCodeTypes = Azure::Compute::Mgmt::V2018_06_01::Models::MaintenanceOperationResultCodeTypes - UpgradeMode = Azure::Compute::Mgmt::V2018_06_01::Models::UpgradeMode + VirtualMachineScaleSetSkuScaleType = Azure::Compute::Mgmt::V2018_06_01::Models::VirtualMachineScaleSetSkuScaleType RollingUpgradeStatusCode = Azure::Compute::Mgmt::V2018_06_01::Models::RollingUpgradeStatusCode + RollingUpgradeActionType = Azure::Compute::Mgmt::V2018_06_01::Models::RollingUpgradeActionType DiskCreateOption = Azure::Compute::Mgmt::V2018_06_01::Models::DiskCreateOption AccessLevel = Azure::Compute::Mgmt::V2018_06_01::Models::AccessLevel IPVersion = Azure::Compute::Mgmt::V2018_06_01::Models::IPVersion - VirtualMachineScaleSetSkuScaleType = Azure::Compute::Mgmt::V2018_06_01::Models::VirtualMachineScaleSetSkuScaleType DiffDiskOptions = Azure::Compute::Mgmt::V2018_06_01::Models::DiffDiskOptions AggregatedReplicationState = Azure::Compute::Mgmt::V2018_06_01::Models::AggregatedReplicationState ReplicationState = Azure::Compute::Mgmt::V2018_06_01::Models::ReplicationState @@ -335,6 +335,9 @@ def method_missing(method, *args) end class ModelClasses + def resource_sku_location_info + Azure::Compute::Mgmt::V2017_09_01::Models::ResourceSkuLocationInfo + end def resource_sku_capabilities Azure::Compute::Mgmt::V2017_09_01::Models::ResourceSkuCapabilities end @@ -365,9 +368,6 @@ def resource_sku_capacity def resource_sku_costs Azure::Compute::Mgmt::V2017_09_01::Models::ResourceSkuCosts end - def resource_sku_location_info - Azure::Compute::Mgmt::V2017_09_01::Models::ResourceSkuLocationInfo - end def operation_status_response Azure::Compute::Mgmt::V2017_12_01::Models::OperationStatusResponse end @@ -581,8 +581,8 @@ def sku def virtual_hard_disk Azure::Compute::Mgmt::V2018_06_01::Models::VirtualHardDisk end - def ssh_configuration - Azure::Compute::Mgmt::V2018_06_01::Models::SshConfiguration + def network_profile + Azure::Compute::Mgmt::V2018_06_01::Models::NetworkProfile end def key_vault_and_secret_reference Azure::Compute::Mgmt::V2018_06_01::Models::KeyVaultAndSecretReference @@ -896,8 +896,8 @@ def gallery_image_version_publishing_profile def virtual_machine_scale_set_update_public_ipaddress_configuration Azure::Compute::Mgmt::V2018_06_01::Models::VirtualMachineScaleSetUpdatePublicIPAddressConfiguration end - def network_profile - Azure::Compute::Mgmt::V2018_06_01::Models::NetworkProfile + def gallery_data_disk_image + Azure::Compute::Mgmt::V2018_06_01::Models::GalleryDataDiskImage end def gallery_image_version Azure::Compute::Mgmt::V2018_06_01::Models::GalleryImageVersion @@ -923,8 +923,8 @@ def virtual_machine_size_types def run_command_document Azure::Compute::Mgmt::V2018_06_01::Models::RunCommandDocument end - def disk_create_option_types - Azure::Compute::Mgmt::V2018_06_01::Models::DiskCreateOptionTypes + def ssh_configuration + Azure::Compute::Mgmt::V2018_06_01::Models::SshConfiguration end def virtual_machine_scale_set_public_ipaddress_configuration_dns_settings Azure::Compute::Mgmt::V2018_06_01::Models::VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings @@ -938,14 +938,14 @@ def gallery def gallery_image Azure::Compute::Mgmt::V2018_06_01::Models::GalleryImage end - def protocol_types - Azure::Compute::Mgmt::V2018_06_01::Models::ProtocolTypes + def disk_create_option_types + Azure::Compute::Mgmt::V2018_06_01::Models::DiskCreateOptionTypes end def gallery_osdisk_image Azure::Compute::Mgmt::V2018_06_01::Models::GalleryOSDiskImage end - def gallery_data_disk_image - Azure::Compute::Mgmt::V2018_06_01::Models::GalleryDataDiskImage + def pass_names + Azure::Compute::Mgmt::V2018_06_01::Models::PassNames end def component_names Azure::Compute::Mgmt::V2018_06_01::Models::ComponentNames @@ -962,8 +962,8 @@ def resource_identity_type def storage_account_types Azure::Compute::Mgmt::V2018_06_01::Models::StorageAccountTypes end - def pass_names - Azure::Compute::Mgmt::V2018_06_01::Models::PassNames + def upgrade_mode + Azure::Compute::Mgmt::V2018_06_01::Models::UpgradeMode end def operating_system_state_types Azure::Compute::Mgmt::V2018_06_01::Models::OperatingSystemStateTypes @@ -971,8 +971,8 @@ def operating_system_state_types def setting_names Azure::Compute::Mgmt::V2018_06_01::Models::SettingNames end - def rolling_upgrade_action_type - Azure::Compute::Mgmt::V2018_06_01::Models::RollingUpgradeActionType + def protocol_types + Azure::Compute::Mgmt::V2018_06_01::Models::ProtocolTypes end def caching_types Azure::Compute::Mgmt::V2018_06_01::Models::CachingTypes @@ -980,12 +980,15 @@ def caching_types def maintenance_operation_result_code_types Azure::Compute::Mgmt::V2018_06_01::Models::MaintenanceOperationResultCodeTypes end - def upgrade_mode - Azure::Compute::Mgmt::V2018_06_01::Models::UpgradeMode + def virtual_machine_scale_set_sku_scale_type + Azure::Compute::Mgmt::V2018_06_01::Models::VirtualMachineScaleSetSkuScaleType end def rolling_upgrade_status_code Azure::Compute::Mgmt::V2018_06_01::Models::RollingUpgradeStatusCode end + def rolling_upgrade_action_type + Azure::Compute::Mgmt::V2018_06_01::Models::RollingUpgradeActionType + end def disk_create_option Azure::Compute::Mgmt::V2018_06_01::Models::DiskCreateOption end @@ -995,9 +998,6 @@ def access_level def ipversion Azure::Compute::Mgmt::V2018_06_01::Models::IPVersion end - def virtual_machine_scale_set_sku_scale_type - Azure::Compute::Mgmt::V2018_06_01::Models::VirtualMachineScaleSetSkuScaleType - end def diff_disk_options Azure::Compute::Mgmt::V2018_06_01::Models::DiffDiskOptions end diff --git a/azure_sdk/lib/latest/modules/consumption_profile_module.rb b/azure_sdk/lib/latest/modules/consumption_profile_module.rb index 486307ead2..e949d37505 100644 --- a/azure_sdk/lib/latest/modules/consumption_profile_module.rb +++ b/azure_sdk/lib/latest/modules/consumption_profile_module.rb @@ -7,6 +7,7 @@ module Azure::Profiles::Latest module Consumption module Mgmt + Budgets = Azure::Consumption::Mgmt::V2018_06_30::Budgets PriceSheet = Azure::Consumption::Mgmt::V2018_06_30::PriceSheet CostTags = Azure::Consumption::Mgmt::V2018_06_30::CostTags Forecasts = Azure::Consumption::Mgmt::V2018_06_30::Forecasts @@ -18,7 +19,6 @@ module Mgmt ReservationsSummaries = Azure::Consumption::Mgmt::V2018_06_30::ReservationsSummaries ReservationsDetails = Azure::Consumption::Mgmt::V2018_06_30::ReservationsDetails ReservationRecommendations = Azure::Consumption::Mgmt::V2018_06_30::ReservationRecommendations - Budgets = Azure::Consumption::Mgmt::V2018_06_30::Budgets module Models MeterDetails = Azure::Consumption::Mgmt::V2018_06_30::Models::MeterDetails @@ -36,16 +36,16 @@ module Models QueryOptions = Azure::Consumption::Mgmt::V2018_06_30::Models::QueryOptions PriceSheetProperties = Azure::Consumption::Mgmt::V2018_06_30::Models::PriceSheetProperties ReservationRecommendationsListResult = Azure::Consumption::Mgmt::V2018_06_30::Models::ReservationRecommendationsListResult + ReservationSummariesListResult = Azure::Consumption::Mgmt::V2018_06_30::Models::ReservationSummariesListResult ForecastPropertiesConfidenceLevelsItem = Azure::Consumption::Mgmt::V2018_06_30::Models::ForecastPropertiesConfidenceLevelsItem - ResourceAttributes = Azure::Consumption::Mgmt::V2018_06_30::Models::ResourceAttributes ReservationDetailsListResult = Azure::Consumption::Mgmt::V2018_06_30::Models::ReservationDetailsListResult - ReservationSummariesListResult = Azure::Consumption::Mgmt::V2018_06_30::Models::ReservationSummariesListResult ForecastsListResult = Azure::Consumption::Mgmt::V2018_06_30::Models::ForecastsListResult UsageDetail = Azure::Consumption::Mgmt::V2018_06_30::Models::UsageDetail Marketplace = Azure::Consumption::Mgmt::V2018_06_30::Models::Marketplace Balance = Azure::Consumption::Mgmt::V2018_06_30::Models::Balance + ResourceAttributes = Azure::Consumption::Mgmt::V2018_06_30::Models::ResourceAttributes ReservationSummary = Azure::Consumption::Mgmt::V2018_06_30::Models::ReservationSummary - ReservationDetail = Azure::Consumption::Mgmt::V2018_06_30::Models::ReservationDetail + TagsResult = Azure::Consumption::Mgmt::V2018_06_30::Models::TagsResult Budget = Azure::Consumption::Mgmt::V2018_06_30::Models::Budget CostTag = Azure::Consumption::Mgmt::V2018_06_30::Models::CostTag PriceSheetResult = Azure::Consumption::Mgmt::V2018_06_30::Models::PriceSheetResult @@ -55,13 +55,13 @@ module Models ErrorDetails = Azure::Consumption::Mgmt::V2018_06_30::Models::ErrorDetails TimeGrainType = Azure::Consumption::Mgmt::V2018_06_30::Models::TimeGrainType Grain = Azure::Consumption::Mgmt::V2018_06_30::Models::Grain - TagsResult = Azure::Consumption::Mgmt::V2018_06_30::Models::TagsResult + ChargeType = Azure::Consumption::Mgmt::V2018_06_30::Models::ChargeType Resource = Azure::Consumption::Mgmt::V2018_06_30::Models::Resource Bound = Azure::Consumption::Mgmt::V2018_06_30::Models::Bound - ChargeType = Azure::Consumption::Mgmt::V2018_06_30::Models::ChargeType - OperatorType = Azure::Consumption::Mgmt::V2018_06_30::Models::OperatorType Datagrain = Azure::Consumption::Mgmt::V2018_06_30::Models::Datagrain + OperatorType = Azure::Consumption::Mgmt::V2018_06_30::Models::OperatorType OperationDisplay = Azure::Consumption::Mgmt::V2018_06_30::Models::OperationDisplay + ReservationDetail = Azure::Consumption::Mgmt::V2018_06_30::Models::ReservationDetail Operation = Azure::Consumption::Mgmt::V2018_06_30::Models::Operation OperationListResult = Azure::Consumption::Mgmt::V2018_06_30::Models::OperationListResult Tag = Azure::Consumption::Mgmt::V2018_06_30::Models::Tag @@ -70,7 +70,7 @@ module Models end class ConsumptionManagementClass - attr_reader :price_sheet, :cost_tags, :forecasts, :operations, :tags, :usage_details, :marketplaces, :balances, :reservations_summaries, :reservations_details, :reservation_recommendations, :budgets, :configurable, :base_url, :options, :model_classes + attr_reader :budgets, :price_sheet, :cost_tags, :forecasts, :operations, :tags, :usage_details, :marketplaces, :balances, :reservations_summaries, :reservations_details, :reservation_recommendations, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -80,6 +80,7 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) + @budgets = @client_0.budgets @price_sheet = @client_0.price_sheet @cost_tags = @client_0.cost_tags @forecasts = @client_0.forecasts @@ -91,7 +92,6 @@ def initialize(configurable, base_url=nil, options=nil) @reservations_summaries = @client_0.reservations_summaries @reservations_details = @client_0.reservations_details @reservation_recommendations = @client_0.reservation_recommendations - @budgets = @client_0.budgets @model_classes = ModelClasses.new end @@ -155,18 +155,15 @@ def price_sheet_properties def reservation_recommendations_list_result Azure::Consumption::Mgmt::V2018_06_30::Models::ReservationRecommendationsListResult end + def reservation_summaries_list_result + Azure::Consumption::Mgmt::V2018_06_30::Models::ReservationSummariesListResult + end def forecast_properties_confidence_levels_item Azure::Consumption::Mgmt::V2018_06_30::Models::ForecastPropertiesConfidenceLevelsItem end - def resource_attributes - Azure::Consumption::Mgmt::V2018_06_30::Models::ResourceAttributes - end def reservation_details_list_result Azure::Consumption::Mgmt::V2018_06_30::Models::ReservationDetailsListResult end - def reservation_summaries_list_result - Azure::Consumption::Mgmt::V2018_06_30::Models::ReservationSummariesListResult - end def forecasts_list_result Azure::Consumption::Mgmt::V2018_06_30::Models::ForecastsListResult end @@ -179,11 +176,14 @@ def marketplace def balance Azure::Consumption::Mgmt::V2018_06_30::Models::Balance end + def resource_attributes + Azure::Consumption::Mgmt::V2018_06_30::Models::ResourceAttributes + end def reservation_summary Azure::Consumption::Mgmt::V2018_06_30::Models::ReservationSummary end - def reservation_detail - Azure::Consumption::Mgmt::V2018_06_30::Models::ReservationDetail + def tags_result + Azure::Consumption::Mgmt::V2018_06_30::Models::TagsResult end def budget Azure::Consumption::Mgmt::V2018_06_30::Models::Budget @@ -212,8 +212,8 @@ def time_grain_type def grain Azure::Consumption::Mgmt::V2018_06_30::Models::Grain end - def tags_result - Azure::Consumption::Mgmt::V2018_06_30::Models::TagsResult + def charge_type + Azure::Consumption::Mgmt::V2018_06_30::Models::ChargeType end def resource Azure::Consumption::Mgmt::V2018_06_30::Models::Resource @@ -221,18 +221,18 @@ def resource def bound Azure::Consumption::Mgmt::V2018_06_30::Models::Bound end - def charge_type - Azure::Consumption::Mgmt::V2018_06_30::Models::ChargeType + def datagrain + Azure::Consumption::Mgmt::V2018_06_30::Models::Datagrain end def operator_type Azure::Consumption::Mgmt::V2018_06_30::Models::OperatorType end - def datagrain - Azure::Consumption::Mgmt::V2018_06_30::Models::Datagrain - end def operation_display Azure::Consumption::Mgmt::V2018_06_30::Models::OperationDisplay end + def reservation_detail + Azure::Consumption::Mgmt::V2018_06_30::Models::ReservationDetail + end def operation Azure::Consumption::Mgmt::V2018_06_30::Models::Operation end diff --git a/azure_sdk/lib/latest/modules/containerinstance_profile_module.rb b/azure_sdk/lib/latest/modules/containerinstance_profile_module.rb index f8ff75d715..e9551b067d 100644 --- a/azure_sdk/lib/latest/modules/containerinstance_profile_module.rb +++ b/azure_sdk/lib/latest/modules/containerinstance_profile_module.rb @@ -8,15 +8,16 @@ module Azure::Profiles::Latest module ContainerInstance module Mgmt Operations = Azure::ContainerInstance::Mgmt::V2018_06_01::Operations + ContainerGroupUsage = Azure::ContainerInstance::Mgmt::V2018_06_01::ContainerGroupUsage ContainerOperations = Azure::ContainerInstance::Mgmt::V2018_06_01::ContainerOperations ContainerGroups = Azure::ContainerInstance::Mgmt::V2018_06_01::ContainerGroups - ContainerGroupUsage = Azure::ContainerInstance::Mgmt::V2018_06_01::ContainerGroupUsage module Models Port = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::Port IpAddress = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::IpAddress EnvironmentVariable = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::EnvironmentVariable ContainerGroupPropertiesInstanceView = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::ContainerGroupPropertiesInstanceView + Event = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::Event ResourceRequests = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::ResourceRequests ContainerGroupDiagnostics = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::ContainerGroupDiagnostics ResourceRequirements = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::ResourceRequirements @@ -25,13 +26,12 @@ module Models Container = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::Container GitRepoVolume = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::GitRepoVolume ImageRegistryCredential = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::ImageRegistryCredential - ContainerState = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::ContainerState OperationDisplay = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::OperationDisplay - Event = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::Event - Operation = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::Operation ResourceLimits = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::ResourceLimits - OperationListResult = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::OperationListResult + Operation = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::Operation ContainerGroupListResult = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::ContainerGroupListResult + OperationListResult = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::OperationListResult + ContainerState = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::ContainerState Volume = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::Volume ContainerProbe = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::ContainerProbe ContainerPropertiesInstanceView = Azure::ContainerInstance::Mgmt::V2018_06_01::Models::ContainerPropertiesInstanceView @@ -56,7 +56,7 @@ module Models end class ContainerInstanceManagementClass - attr_reader :operations, :container_operations, :container_groups, :container_group_usage, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :container_group_usage, :container_operations, :container_groups, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -67,9 +67,9 @@ def initialize(configurable, base_url=nil, options=nil) end add_telemetry(@client_0) @operations = @client_0.operations + @container_group_usage = @client_0.container_group_usage @container_operations = @client_0.container_operations @container_groups = @client_0.container_groups - @container_group_usage = @client_0.container_group_usage @model_classes = ModelClasses.new end @@ -100,6 +100,9 @@ def environment_variable def container_group_properties_instance_view Azure::ContainerInstance::Mgmt::V2018_06_01::Models::ContainerGroupPropertiesInstanceView end + def event + Azure::ContainerInstance::Mgmt::V2018_06_01::Models::Event + end def resource_requests Azure::ContainerInstance::Mgmt::V2018_06_01::Models::ResourceRequests end @@ -124,26 +127,23 @@ def git_repo_volume def image_registry_credential Azure::ContainerInstance::Mgmt::V2018_06_01::Models::ImageRegistryCredential end - def container_state - Azure::ContainerInstance::Mgmt::V2018_06_01::Models::ContainerState - end def operation_display Azure::ContainerInstance::Mgmt::V2018_06_01::Models::OperationDisplay end - def event - Azure::ContainerInstance::Mgmt::V2018_06_01::Models::Event + def resource_limits + Azure::ContainerInstance::Mgmt::V2018_06_01::Models::ResourceLimits end def operation Azure::ContainerInstance::Mgmt::V2018_06_01::Models::Operation end - def resource_limits - Azure::ContainerInstance::Mgmt::V2018_06_01::Models::ResourceLimits + def container_group_list_result + Azure::ContainerInstance::Mgmt::V2018_06_01::Models::ContainerGroupListResult end def operation_list_result Azure::ContainerInstance::Mgmt::V2018_06_01::Models::OperationListResult end - def container_group_list_result - Azure::ContainerInstance::Mgmt::V2018_06_01::Models::ContainerGroupListResult + def container_state + Azure::ContainerInstance::Mgmt::V2018_06_01::Models::ContainerState end def volume Azure::ContainerInstance::Mgmt::V2018_06_01::Models::Volume diff --git a/azure_sdk/lib/latest/modules/containerregistry_profile_module.rb b/azure_sdk/lib/latest/modules/containerregistry_profile_module.rb index 2226b78471..72b50cb8ca 100644 --- a/azure_sdk/lib/latest/modules/containerregistry_profile_module.rb +++ b/azure_sdk/lib/latest/modules/containerregistry_profile_module.rb @@ -7,12 +7,13 @@ module Azure::Profiles::Latest module ContainerRegistry module Mgmt + Operations = Azure::ContainerRegistry::Mgmt::V2017_10_01::Operations Registries = Azure::ContainerRegistry::Mgmt::V2017_10_01::Registries Replications = Azure::ContainerRegistry::Mgmt::V2017_10_01::Replications Webhooks = Azure::ContainerRegistry::Mgmt::V2017_10_01::Webhooks - Operations = Azure::ContainerRegistry::Mgmt::V2017_10_01::Operations module Models + RegistryUpdateParameters = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::RegistryUpdateParameters WebhookCreateParameters = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::WebhookCreateParameters RegistryPassword = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::RegistryPassword RegenerateCredentialParameters = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::RegenerateCredentialParameters @@ -24,27 +25,27 @@ module Models EventListResult = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::EventListResult RegistryListResult = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::RegistryListResult RegistryUsage = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::RegistryUsage - Request = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::Request Actor = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::Actor OperationServiceSpecificationDefinition = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::OperationServiceSpecificationDefinition RegistryListCredentialsResult = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::RegistryListCredentialsResult + EventContent = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::EventContent + Request = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::Request EventRequestMessage = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::EventRequestMessage - QuarantinePolicy = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::QuarantinePolicy WebhookUpdateParameters = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::WebhookUpdateParameters EventResponseMessage = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::EventResponseMessage - Registry = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::Registry - EventContent = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::EventContent + QuarantinePolicy = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::QuarantinePolicy + ImportMode = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::ImportMode WebhookListResult = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::WebhookListResult Replication = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::Replication - ImportMode = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::ImportMode - PasswordName = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::PasswordName - ProvisioningState = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::ProvisioningState - Event = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::Event - RegistryUpdateParameters = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::RegistryUpdateParameters RegistryUsageUnit = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::RegistryUsageUnit + Registry = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::Registry + ProvisioningState = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::ProvisioningState + StorageAccountProperties = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::StorageAccountProperties + PasswordName = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::PasswordName + WebhookStatus = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::WebhookStatus PolicyStatus = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::PolicyStatus TrustPolicyType = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::TrustPolicyType - WebhookStatus = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::WebhookStatus + Event = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::Event WebhookAction = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::WebhookAction SkuTier = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::SkuTier Webhook = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::Webhook @@ -63,12 +64,11 @@ module Models OperationDefinition = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::OperationDefinition ReplicationUpdateParameters = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::ReplicationUpdateParameters ReplicationListResult = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::ReplicationListResult - StorageAccountProperties = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::StorageAccountProperties Source = Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::Source end class ContainerRegistryManagementClass - attr_reader :registries, :replications, :webhooks, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :registries, :replications, :webhooks, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -78,10 +78,10 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) + @operations = @client_0.operations @registries = @client_0.registries @replications = @client_0.replications @webhooks = @client_0.webhooks - @operations = @client_0.operations @model_classes = ModelClasses.new end @@ -100,6 +100,9 @@ def method_missing(method, *args) end class ModelClasses + def registry_update_parameters + Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::RegistryUpdateParameters + end def webhook_create_parameters Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::WebhookCreateParameters end @@ -133,9 +136,6 @@ def registry_list_result def registry_usage Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::RegistryUsage end - def request - Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::Request - end def actor Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::Actor end @@ -145,23 +145,26 @@ def operation_service_specification_definition def registry_list_credentials_result Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::RegistryListCredentialsResult end + def event_content + Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::EventContent + end + def request + Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::Request + end def event_request_message Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::EventRequestMessage end - def quarantine_policy - Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::QuarantinePolicy - end def webhook_update_parameters Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::WebhookUpdateParameters end def event_response_message Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::EventResponseMessage end - def registry - Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::Registry + def quarantine_policy + Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::QuarantinePolicy end - def event_content - Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::EventContent + def import_mode + Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::ImportMode end def webhook_list_result Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::WebhookListResult @@ -169,23 +172,23 @@ def webhook_list_result def replication Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::Replication end - def import_mode - Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::ImportMode + def registry_usage_unit + Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::RegistryUsageUnit end - def password_name - Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::PasswordName + def registry + Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::Registry end def provisioning_state Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::ProvisioningState end - def event - Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::Event + def storage_account_properties + Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::StorageAccountProperties end - def registry_update_parameters - Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::RegistryUpdateParameters + def password_name + Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::PasswordName end - def registry_usage_unit - Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::RegistryUsageUnit + def webhook_status + Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::WebhookStatus end def policy_status Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::PolicyStatus @@ -193,8 +196,8 @@ def policy_status def trust_policy_type Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::TrustPolicyType end - def webhook_status - Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::WebhookStatus + def event + Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::Event end def webhook_action Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::WebhookAction @@ -250,9 +253,6 @@ def replication_update_parameters def replication_list_result Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::ReplicationListResult end - def storage_account_properties - Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::StorageAccountProperties - end def source Azure::ContainerRegistry::Mgmt::V2017_10_01::Models::Source end diff --git a/azure_sdk/lib/latest/modules/containerservice_profile_module.rb b/azure_sdk/lib/latest/modules/containerservice_profile_module.rb index 5cc055f7e6..2c8f74f0a2 100644 --- a/azure_sdk/lib/latest/modules/containerservice_profile_module.rb +++ b/azure_sdk/lib/latest/modules/containerservice_profile_module.rb @@ -7,8 +7,8 @@ module Azure::Profiles::Latest module ContainerService module Mgmt - ManagedClusters = Azure::ContainerService::Mgmt::V2018_03_31::ManagedClusters Operations = Azure::ContainerService::Mgmt::V2018_03_31::Operations + ManagedClusters = Azure::ContainerService::Mgmt::V2018_03_31::ManagedClusters ContainerServices = Azure::ContainerService::Mgmt::V2017_09_30::ContainerServices module Models @@ -23,8 +23,8 @@ module Models ContainerServiceSshPublicKey = Azure::ContainerService::Mgmt::V2018_03_31::Models::ContainerServiceSshPublicKey ContainerServiceSshConfiguration = Azure::ContainerService::Mgmt::V2018_03_31::Models::ContainerServiceSshConfiguration ContainerServiceServicePrincipalProfile = Azure::ContainerService::Mgmt::V2018_03_31::Models::ContainerServiceServicePrincipalProfile - OperationListResult = Azure::ContainerService::Mgmt::V2018_03_31::Models::OperationListResult ContainerServiceLinuxProfile = Azure::ContainerService::Mgmt::V2018_03_31::Models::ContainerServiceLinuxProfile + OperationListResult = Azure::ContainerService::Mgmt::V2018_03_31::Models::OperationListResult ContainerServiceVMDiagnostics = Azure::ContainerService::Mgmt::V2018_03_31::Models::ContainerServiceVMDiagnostics ContainerServiceDiagnosticsProfile = Azure::ContainerService::Mgmt::V2018_03_31::Models::ContainerServiceDiagnosticsProfile ContainerServiceMasterProfile = Azure::ContainerService::Mgmt::V2018_03_31::Models::ContainerServiceMasterProfile @@ -45,13 +45,13 @@ module Models ManagedClusterPoolUpgradeProfile = Azure::ContainerService::Mgmt::V2018_03_31::Models::ManagedClusterPoolUpgradeProfile NetworkPlugin = Azure::ContainerService::Mgmt::V2018_03_31::Models::NetworkPlugin NetworkPolicy = Azure::ContainerService::Mgmt::V2018_03_31::Models::NetworkPolicy + OrchestratorVersionProfile = Azure::ContainerService::Mgmt::V2017_09_30::Models::OrchestratorVersionProfile OrchestratorVersionProfileListResult = Azure::ContainerService::Mgmt::V2017_09_30::Models::OrchestratorVersionProfileListResult OrchestratorProfile = Azure::ContainerService::Mgmt::V2017_09_30::Models::OrchestratorProfile - OrchestratorVersionProfile = Azure::ContainerService::Mgmt::V2017_09_30::Models::OrchestratorVersionProfile end class ContainerServiceManagementClass - attr_reader :managed_clusters, :operations, :container_services, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :managed_clusters, :container_services, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -67,8 +67,8 @@ def initialize(configurable, base_url=nil, options=nil) @client_1.subscription_id = configurable.subscription_id end add_telemetry(@client_1) - @managed_clusters = @client_1.managed_clusters @operations = @client_1.operations + @managed_clusters = @client_1.managed_clusters @client_2 = Azure::ContainerService::Mgmt::V2017_09_30::ContainerServiceClient.new(configurable.credentials, base_url, options) if(@client_2.respond_to?(:subscription_id)) @@ -131,12 +131,12 @@ def container_service_ssh_configuration def container_service_service_principal_profile Azure::ContainerService::Mgmt::V2018_03_31::Models::ContainerServiceServicePrincipalProfile end - def operation_list_result - Azure::ContainerService::Mgmt::V2018_03_31::Models::OperationListResult - end def container_service_linux_profile Azure::ContainerService::Mgmt::V2018_03_31::Models::ContainerServiceLinuxProfile end + def operation_list_result + Azure::ContainerService::Mgmt::V2018_03_31::Models::OperationListResult + end def container_service_vmdiagnostics Azure::ContainerService::Mgmt::V2018_03_31::Models::ContainerServiceVMDiagnostics end @@ -197,15 +197,15 @@ def network_plugin def network_policy Azure::ContainerService::Mgmt::V2018_03_31::Models::NetworkPolicy end + def orchestrator_version_profile + Azure::ContainerService::Mgmt::V2017_09_30::Models::OrchestratorVersionProfile + end def orchestrator_version_profile_list_result Azure::ContainerService::Mgmt::V2017_09_30::Models::OrchestratorVersionProfileListResult end def orchestrator_profile Azure::ContainerService::Mgmt::V2017_09_30::Models::OrchestratorProfile end - def orchestrator_version_profile - Azure::ContainerService::Mgmt::V2017_09_30::Models::OrchestratorVersionProfile - end end end end diff --git a/azure_sdk/lib/latest/modules/contentmoderator_profile_module.rb b/azure_sdk/lib/latest/modules/contentmoderator_profile_module.rb index 41e9d5ac28..17754cfe34 100644 --- a/azure_sdk/lib/latest/modules/contentmoderator_profile_module.rb +++ b/azure_sdk/lib/latest/modules/contentmoderator_profile_module.rb @@ -15,6 +15,7 @@ module ContentModerator Reviews = Azure::CognitiveServices::ContentModerator::V1_0::Reviews module Models + JobListResult = Azure::CognitiveServices::ContentModerator::V1_0::Models::JobListResult Face = Azure::CognitiveServices::ContentModerator::V1_0::Models::Face Error = Azure::CognitiveServices::ContentModerator::V1_0::Models::Error RefreshIndex = Azure::CognitiveServices::ContentModerator::V1_0::Models::RefreshIndex @@ -38,45 +39,44 @@ module Models JobId = Azure::CognitiveServices::ContentModerator::V1_0::Models::JobId Image = Azure::CognitiveServices::ContentModerator::V1_0::Models::Image ImageListMetadata = Azure::CognitiveServices::ContentModerator::V1_0::Models::ImageListMetadata - Job = Azure::CognitiveServices::ContentModerator::V1_0::Models::Job Tag = Azure::CognitiveServices::ContentModerator::V1_0::Models::Tag TranscriptModerationBodyItemTermsItem = Azure::CognitiveServices::ContentModerator::V1_0::Models::TranscriptModerationBodyItemTermsItem - MatchResponse = Azure::CognitiveServices::ContentModerator::V1_0::Models::MatchResponse - Frame = Azure::CognitiveServices::ContentModerator::V1_0::Models::Frame APIError = Azure::CognitiveServices::ContentModerator::V1_0::Models::APIError - TermListMetadata = Azure::CognitiveServices::ContentModerator::V1_0::Models::TermListMetadata - CreateVideoReviewsBodyItemVideoFramesItemMetadataItem = Azure::CognitiveServices::ContentModerator::V1_0::Models::CreateVideoReviewsBodyItemVideoFramesItemMetadataItem - RefreshIndexAdvancedInfoItem = Azure::CognitiveServices::ContentModerator::V1_0::Models::RefreshIndexAdvancedInfoItem + MatchResponse = Azure::CognitiveServices::ContentModerator::V1_0::Models::MatchResponse TranscriptModerationBodyItem = Azure::CognitiveServices::ContentModerator::V1_0::Models::TranscriptModerationBodyItem - PII = Azure::CognitiveServices::ContentModerator::V1_0::Models::PII + RefreshIndexAdvancedInfoItem = Azure::CognitiveServices::ContentModerator::V1_0::Models::RefreshIndexAdvancedInfoItem + TermListMetadata = Azure::CognitiveServices::ContentModerator::V1_0::Models::TermListMetadata + Job = Azure::CognitiveServices::ContentModerator::V1_0::Models::Job CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem = Azure::CognitiveServices::ContentModerator::V1_0::Models::CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem - ClassificationCategory3 = Azure::CognitiveServices::ContentModerator::V1_0::Models::ClassificationCategory3 - CreateVideoReviewsBodyItem = Azure::CognitiveServices::ContentModerator::V1_0::Models::CreateVideoReviewsBodyItem SSN = Azure::CognitiveServices::ContentModerator::V1_0::Models::SSN - CreateVideoReviewsBodyItemVideoFramesItem = Azure::CognitiveServices::ContentModerator::V1_0::Models::CreateVideoReviewsBodyItemVideoFramesItem - BodyMetadata = Azure::CognitiveServices::ContentModerator::V1_0::Models::BodyMetadata + Frame = Azure::CognitiveServices::ContentModerator::V1_0::Models::Frame CreateVideoReviewsBodyItemMetadataItem = Azure::CognitiveServices::ContentModerator::V1_0::Models::CreateVideoReviewsBodyItemMetadataItem - FoundFaces = Azure::CognitiveServices::ContentModerator::V1_0::Models::FoundFaces - ImageList = Azure::CognitiveServices::ContentModerator::V1_0::Models::ImageList + ClassificationCategory3 = Azure::CognitiveServices::ContentModerator::V1_0::Models::ClassificationCategory3 + CreateVideoReviewsBodyItemVideoFramesItemMetadataItem = Azure::CognitiveServices::ContentModerator::V1_0::Models::CreateVideoReviewsBodyItemVideoFramesItemMetadataItem Match = Azure::CognitiveServices::ContentModerator::V1_0::Models::Match - KeyValuePair = Azure::CognitiveServices::ContentModerator::V1_0::Models::KeyValuePair - VideoFrameBodyItemReviewerResultTagsItem = Azure::CognitiveServices::ContentModerator::V1_0::Models::VideoFrameBodyItemReviewerResultTagsItem + CreateVideoReviewsBodyItemVideoFramesItem = Azure::CognitiveServices::ContentModerator::V1_0::Models::CreateVideoReviewsBodyItemVideoFramesItem + PII = Azure::CognitiveServices::ContentModerator::V1_0::Models::PII + ImageList = Azure::CognitiveServices::ContentModerator::V1_0::Models::ImageList + FoundFaces = Azure::CognitiveServices::ContentModerator::V1_0::Models::FoundFaces + CreateVideoReviewsBodyItem = Azure::CognitiveServices::ContentModerator::V1_0::Models::CreateVideoReviewsBodyItem Body = Azure::CognitiveServices::ContentModerator::V1_0::Models::Body + BodyMetadata = Azure::CognitiveServices::ContentModerator::V1_0::Models::BodyMetadata Status = Azure::CognitiveServices::ContentModerator::V1_0::Models::Status - DetectedLanguage = Azure::CognitiveServices::ContentModerator::V1_0::Models::DetectedLanguage Screen = Azure::CognitiveServices::ContentModerator::V1_0::Models::Screen - VideoFrameBodyItemMetadataItem = Azure::CognitiveServices::ContentModerator::V1_0::Models::VideoFrameBodyItemMetadataItem - CreateReviewBodyItemMetadataItem = Azure::CognitiveServices::ContentModerator::V1_0::Models::CreateReviewBodyItemMetadataItem + KeyValuePair = Azure::CognitiveServices::ContentModerator::V1_0::Models::KeyValuePair + VideoFrameBodyItemReviewerResultTagsItem = Azure::CognitiveServices::ContentModerator::V1_0::Models::VideoFrameBodyItemReviewerResultTagsItem VideoFrameBodyItem = Azure::CognitiveServices::ContentModerator::V1_0::Models::VideoFrameBodyItem - ImageUrl = Azure::CognitiveServices::ContentModerator::V1_0::Models::ImageUrl - Phone = Azure::CognitiveServices::ContentModerator::V1_0::Models::Phone + VideoFrameBodyItemMetadataItem = Azure::CognitiveServices::ContentModerator::V1_0::Models::VideoFrameBodyItemMetadataItem + DetectedLanguage = Azure::CognitiveServices::ContentModerator::V1_0::Models::DetectedLanguage OCR = Azure::CognitiveServices::ContentModerator::V1_0::Models::OCR + ImageUrl = Azure::CognitiveServices::ContentModerator::V1_0::Models::ImageUrl + CreateReviewBodyItemMetadataItem = Azure::CognitiveServices::ContentModerator::V1_0::Models::CreateReviewBodyItemMetadataItem + Content = Azure::CognitiveServices::ContentModerator::V1_0::Models::Content CreateReviewBodyItem = Azure::CognitiveServices::ContentModerator::V1_0::Models::CreateReviewBodyItem ClassificationCategory1 = Azure::CognitiveServices::ContentModerator::V1_0::Models::ClassificationCategory1 - Content = Azure::CognitiveServices::ContentModerator::V1_0::Models::Content TermList = Azure::CognitiveServices::ContentModerator::V1_0::Models::TermList AzureRegionBaseUrl = Azure::CognitiveServices::ContentModerator::V1_0::Models::AzureRegionBaseUrl - JobListResult = Azure::CognitiveServices::ContentModerator::V1_0::Models::JobListResult + Phone = Azure::CognitiveServices::ContentModerator::V1_0::Models::Phone end class ContentModeratorDataClass @@ -115,6 +115,9 @@ def method_missing(method, *args) end class ModelClasses + def job_list_result + Azure::CognitiveServices::ContentModerator::V1_0::Models::JobListResult + end def face Azure::CognitiveServices::ContentModerator::V1_0::Models::Face end @@ -184,122 +187,119 @@ def image def image_list_metadata Azure::CognitiveServices::ContentModerator::V1_0::Models::ImageListMetadata end - def job - Azure::CognitiveServices::ContentModerator::V1_0::Models::Job - end def tag Azure::CognitiveServices::ContentModerator::V1_0::Models::Tag end def transcript_moderation_body_item_terms_item Azure::CognitiveServices::ContentModerator::V1_0::Models::TranscriptModerationBodyItemTermsItem end - def match_response - Azure::CognitiveServices::ContentModerator::V1_0::Models::MatchResponse - end - def frame - Azure::CognitiveServices::ContentModerator::V1_0::Models::Frame - end def apierror Azure::CognitiveServices::ContentModerator::V1_0::Models::APIError end - def term_list_metadata - Azure::CognitiveServices::ContentModerator::V1_0::Models::TermListMetadata + def match_response + Azure::CognitiveServices::ContentModerator::V1_0::Models::MatchResponse end - def create_video_reviews_body_item_video_frames_item_metadata_item - Azure::CognitiveServices::ContentModerator::V1_0::Models::CreateVideoReviewsBodyItemVideoFramesItemMetadataItem + def transcript_moderation_body_item + Azure::CognitiveServices::ContentModerator::V1_0::Models::TranscriptModerationBodyItem end def refresh_index_advanced_info_item Azure::CognitiveServices::ContentModerator::V1_0::Models::RefreshIndexAdvancedInfoItem end - def transcript_moderation_body_item - Azure::CognitiveServices::ContentModerator::V1_0::Models::TranscriptModerationBodyItem + def term_list_metadata + Azure::CognitiveServices::ContentModerator::V1_0::Models::TermListMetadata end - def pii - Azure::CognitiveServices::ContentModerator::V1_0::Models::PII + def job + Azure::CognitiveServices::ContentModerator::V1_0::Models::Job end def create_video_reviews_body_item_video_frames_item_reviewer_result_tags_item Azure::CognitiveServices::ContentModerator::V1_0::Models::CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem end - def classification_category3 - Azure::CognitiveServices::ContentModerator::V1_0::Models::ClassificationCategory3 - end - def create_video_reviews_body_item - Azure::CognitiveServices::ContentModerator::V1_0::Models::CreateVideoReviewsBodyItem - end def ssn Azure::CognitiveServices::ContentModerator::V1_0::Models::SSN end - def create_video_reviews_body_item_video_frames_item - Azure::CognitiveServices::ContentModerator::V1_0::Models::CreateVideoReviewsBodyItemVideoFramesItem - end - def body_metadata - Azure::CognitiveServices::ContentModerator::V1_0::Models::BodyMetadata + def frame + Azure::CognitiveServices::ContentModerator::V1_0::Models::Frame end def create_video_reviews_body_item_metadata_item Azure::CognitiveServices::ContentModerator::V1_0::Models::CreateVideoReviewsBodyItemMetadataItem end - def found_faces - Azure::CognitiveServices::ContentModerator::V1_0::Models::FoundFaces + def classification_category3 + Azure::CognitiveServices::ContentModerator::V1_0::Models::ClassificationCategory3 end - def image_list - Azure::CognitiveServices::ContentModerator::V1_0::Models::ImageList + def create_video_reviews_body_item_video_frames_item_metadata_item + Azure::CognitiveServices::ContentModerator::V1_0::Models::CreateVideoReviewsBodyItemVideoFramesItemMetadataItem end def match Azure::CognitiveServices::ContentModerator::V1_0::Models::Match end - def key_value_pair - Azure::CognitiveServices::ContentModerator::V1_0::Models::KeyValuePair + def create_video_reviews_body_item_video_frames_item + Azure::CognitiveServices::ContentModerator::V1_0::Models::CreateVideoReviewsBodyItemVideoFramesItem end - def video_frame_body_item_reviewer_result_tags_item - Azure::CognitiveServices::ContentModerator::V1_0::Models::VideoFrameBodyItemReviewerResultTagsItem + def pii + Azure::CognitiveServices::ContentModerator::V1_0::Models::PII + end + def image_list + Azure::CognitiveServices::ContentModerator::V1_0::Models::ImageList + end + def found_faces + Azure::CognitiveServices::ContentModerator::V1_0::Models::FoundFaces + end + def create_video_reviews_body_item + Azure::CognitiveServices::ContentModerator::V1_0::Models::CreateVideoReviewsBodyItem end def body Azure::CognitiveServices::ContentModerator::V1_0::Models::Body end + def body_metadata + Azure::CognitiveServices::ContentModerator::V1_0::Models::BodyMetadata + end def status Azure::CognitiveServices::ContentModerator::V1_0::Models::Status end - def detected_language - Azure::CognitiveServices::ContentModerator::V1_0::Models::DetectedLanguage - end def screen Azure::CognitiveServices::ContentModerator::V1_0::Models::Screen end - def video_frame_body_item_metadata_item - Azure::CognitiveServices::ContentModerator::V1_0::Models::VideoFrameBodyItemMetadataItem + def key_value_pair + Azure::CognitiveServices::ContentModerator::V1_0::Models::KeyValuePair end - def create_review_body_item_metadata_item - Azure::CognitiveServices::ContentModerator::V1_0::Models::CreateReviewBodyItemMetadataItem + def video_frame_body_item_reviewer_result_tags_item + Azure::CognitiveServices::ContentModerator::V1_0::Models::VideoFrameBodyItemReviewerResultTagsItem end def video_frame_body_item Azure::CognitiveServices::ContentModerator::V1_0::Models::VideoFrameBodyItem end - def image_url - Azure::CognitiveServices::ContentModerator::V1_0::Models::ImageUrl + def video_frame_body_item_metadata_item + Azure::CognitiveServices::ContentModerator::V1_0::Models::VideoFrameBodyItemMetadataItem end - def phone - Azure::CognitiveServices::ContentModerator::V1_0::Models::Phone + def detected_language + Azure::CognitiveServices::ContentModerator::V1_0::Models::DetectedLanguage end def ocr Azure::CognitiveServices::ContentModerator::V1_0::Models::OCR end + def image_url + Azure::CognitiveServices::ContentModerator::V1_0::Models::ImageUrl + end + def create_review_body_item_metadata_item + Azure::CognitiveServices::ContentModerator::V1_0::Models::CreateReviewBodyItemMetadataItem + end + def content + Azure::CognitiveServices::ContentModerator::V1_0::Models::Content + end def create_review_body_item Azure::CognitiveServices::ContentModerator::V1_0::Models::CreateReviewBodyItem end def classification_category1 Azure::CognitiveServices::ContentModerator::V1_0::Models::ClassificationCategory1 end - def content - Azure::CognitiveServices::ContentModerator::V1_0::Models::Content - end def term_list Azure::CognitiveServices::ContentModerator::V1_0::Models::TermList end def azure_region_base_url Azure::CognitiveServices::ContentModerator::V1_0::Models::AzureRegionBaseUrl end - def job_list_result - Azure::CognitiveServices::ContentModerator::V1_0::Models::JobListResult + def phone + Azure::CognitiveServices::ContentModerator::V1_0::Models::Phone end end end diff --git a/azure_sdk/lib/latest/modules/customerinsights_profile_module.rb b/azure_sdk/lib/latest/modules/customerinsights_profile_module.rb index 10d2b61abb..fcd9b15aeb 100644 --- a/azure_sdk/lib/latest/modules/customerinsights_profile_module.rb +++ b/azure_sdk/lib/latest/modules/customerinsights_profile_module.rb @@ -124,8 +124,8 @@ module Models LinkTypes = Azure::CustomerInsights::Mgmt::V2017_04_26::Models::LinkTypes InstanceOperationType = Azure::CustomerInsights::Mgmt::V2017_04_26::Models::InstanceOperationType CardinalityTypes = Azure::CustomerInsights::Mgmt::V2017_04_26::Models::CardinalityTypes - RoleTypes = Azure::CustomerInsights::Mgmt::V2017_04_26::Models::RoleTypes Status = Azure::CustomerInsights::Mgmt::V2017_04_26::Models::Status + RoleTypes = Azure::CustomerInsights::Mgmt::V2017_04_26::Models::RoleTypes ProfileListResult = Azure::CustomerInsights::Mgmt::V2017_04_26::Models::ProfileListResult PredictionModelLifeCycle = Azure::CustomerInsights::Mgmt::V2017_04_26::Models::PredictionModelLifeCycle CanonicalPropertyValueType = Azure::CustomerInsights::Mgmt::V2017_04_26::Models::CanonicalPropertyValueType @@ -472,12 +472,12 @@ def instance_operation_type def cardinality_types Azure::CustomerInsights::Mgmt::V2017_04_26::Models::CardinalityTypes end - def role_types - Azure::CustomerInsights::Mgmt::V2017_04_26::Models::RoleTypes - end def status Azure::CustomerInsights::Mgmt::V2017_04_26::Models::Status end + def role_types + Azure::CustomerInsights::Mgmt::V2017_04_26::Models::RoleTypes + end def profile_list_result Azure::CustomerInsights::Mgmt::V2017_04_26::Models::ProfileListResult end diff --git a/azure_sdk/lib/latest/modules/customsearch_profile_module.rb b/azure_sdk/lib/latest/modules/customsearch_profile_module.rb index 676237e086..db6ce9c49a 100644 --- a/azure_sdk/lib/latest/modules/customsearch_profile_module.rb +++ b/azure_sdk/lib/latest/modules/customsearch_profile_module.rb @@ -9,6 +9,7 @@ module CustomSearch CustomInstance = Azure::CognitiveServices::CustomSearch::V1_0::CustomInstance module Models + Thing = Azure::CognitiveServices::CustomSearch::V1_0::Models::Thing CreativeWork = Azure::CognitiveServices::CustomSearch::V1_0::Models::CreativeWork ErrorCode = Azure::CognitiveServices::CustomSearch::V1_0::Models::ErrorCode ErrorSubCode = Azure::CognitiveServices::CustomSearch::V1_0::Models::ErrorSubCode @@ -24,10 +25,9 @@ module Models WebWebAnswer = Azure::CognitiveServices::CustomSearch::V1_0::Models::WebWebAnswer SearchResponse = Azure::CognitiveServices::CustomSearch::V1_0::Models::SearchResponse SearchResultsAnswer = Azure::CognitiveServices::CustomSearch::V1_0::Models::SearchResultsAnswer - Identifiable = Azure::CognitiveServices::CustomSearch::V1_0::Models::Identifiable Error = Azure::CognitiveServices::CustomSearch::V1_0::Models::Error + Identifiable = Azure::CognitiveServices::CustomSearch::V1_0::Models::Identifiable Answer = Azure::CognitiveServices::CustomSearch::V1_0::Models::Answer - Thing = Azure::CognitiveServices::CustomSearch::V1_0::Models::Thing end class CustomSearchDataClass @@ -60,6 +60,9 @@ def method_missing(method, *args) end class ModelClasses + def thing + Azure::CognitiveServices::CustomSearch::V1_0::Models::Thing + end def creative_work Azure::CognitiveServices::CustomSearch::V1_0::Models::CreativeWork end @@ -105,18 +108,15 @@ def search_response def search_results_answer Azure::CognitiveServices::CustomSearch::V1_0::Models::SearchResultsAnswer end - def identifiable - Azure::CognitiveServices::CustomSearch::V1_0::Models::Identifiable - end def error Azure::CognitiveServices::CustomSearch::V1_0::Models::Error end + def identifiable + Azure::CognitiveServices::CustomSearch::V1_0::Models::Identifiable + end def answer Azure::CognitiveServices::CustomSearch::V1_0::Models::Answer end - def thing - Azure::CognitiveServices::CustomSearch::V1_0::Models::Thing - end end end end diff --git a/azure_sdk/lib/latest/modules/datalakeanalytics_profile_module.rb b/azure_sdk/lib/latest/modules/datalakeanalytics_profile_module.rb index 0ce4e95697..037d042fee 100644 --- a/azure_sdk/lib/latest/modules/datalakeanalytics_profile_module.rb +++ b/azure_sdk/lib/latest/modules/datalakeanalytics_profile_module.rb @@ -7,15 +7,16 @@ module Azure::Profiles::Latest module DataLakeAnalytics module Mgmt + ComputePolicies = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::ComputePolicies FirewallRules = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::FirewallRules Locations = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::Locations Operations = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::Operations Accounts = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::Accounts StorageAccounts = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::StorageAccounts DataLakeStoreAccounts = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::DataLakeStoreAccounts - ComputePolicies = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::ComputePolicies module Models + CheckNameAvailabilityParameters = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::Models::CheckNameAvailabilityParameters SubscriptionState = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::Models::SubscriptionState CapabilityInformation = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::Models::CapabilityInformation NameAvailabilityInformation = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::Models::NameAvailabilityInformation @@ -63,11 +64,10 @@ module Models TierType = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::Models::TierType DataLakeAnalyticsAccountStatus = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::Models::DataLakeAnalyticsAccountStatus OperationOrigin = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::Models::OperationOrigin - CheckNameAvailabilityParameters = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::Models::CheckNameAvailabilityParameters end class DataLakeAnalyticsManagementClass - attr_reader :firewall_rules, :locations, :operations, :accounts, :storage_accounts, :data_lake_store_accounts, :compute_policies, :configurable, :base_url, :options, :model_classes + attr_reader :compute_policies, :firewall_rules, :locations, :operations, :accounts, :storage_accounts, :data_lake_store_accounts, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -77,13 +77,13 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) + @compute_policies = @client_0.compute_policies @firewall_rules = @client_0.firewall_rules @locations = @client_0.locations @operations = @client_0.operations @accounts = @client_0.accounts @storage_accounts = @client_0.storage_accounts @data_lake_store_accounts = @client_0.data_lake_store_accounts - @compute_policies = @client_0.compute_policies @model_classes = ModelClasses.new end @@ -102,6 +102,9 @@ def method_missing(method, *args) end class ModelClasses + def check_name_availability_parameters + Azure::DataLakeAnalytics::Mgmt::V2016_11_01::Models::CheckNameAvailabilityParameters + end def subscription_state Azure::DataLakeAnalytics::Mgmt::V2016_11_01::Models::SubscriptionState end @@ -243,9 +246,6 @@ def data_lake_analytics_account_status def operation_origin Azure::DataLakeAnalytics::Mgmt::V2016_11_01::Models::OperationOrigin end - def check_name_availability_parameters - Azure::DataLakeAnalytics::Mgmt::V2016_11_01::Models::CheckNameAvailabilityParameters - end end end end diff --git a/azure_sdk/lib/latest/modules/datalakestore_profile_module.rb b/azure_sdk/lib/latest/modules/datalakestore_profile_module.rb index 0db64e864c..b6ee064f5c 100644 --- a/azure_sdk/lib/latest/modules/datalakestore_profile_module.rb +++ b/azure_sdk/lib/latest/modules/datalakestore_profile_module.rb @@ -7,14 +7,15 @@ module Azure::Profiles::Latest module DataLakeStore module Mgmt + Operations = Azure::DataLakeStore::Mgmt::V2016_11_01::Operations FirewallRules = Azure::DataLakeStore::Mgmt::V2016_11_01::FirewallRules Locations = Azure::DataLakeStore::Mgmt::V2016_11_01::Locations VirtualNetworkRules = Azure::DataLakeStore::Mgmt::V2016_11_01::VirtualNetworkRules TrustedIdProviders = Azure::DataLakeStore::Mgmt::V2016_11_01::TrustedIdProviders Accounts = Azure::DataLakeStore::Mgmt::V2016_11_01::Accounts - Operations = Azure::DataLakeStore::Mgmt::V2016_11_01::Operations module Models + CheckNameAvailabilityParameters = Azure::DataLakeStore::Mgmt::V2016_11_01::Models::CheckNameAvailabilityParameters SubscriptionState = Azure::DataLakeStore::Mgmt::V2016_11_01::Models::SubscriptionState EncryptionIdentity = Azure::DataLakeStore::Mgmt::V2016_11_01::Models::EncryptionIdentity CreateVirtualNetworkRuleWithAccountParameters = Azure::DataLakeStore::Mgmt::V2016_11_01::Models::CreateVirtualNetworkRuleWithAccountParameters @@ -61,11 +62,10 @@ module Models FirewallAllowAzureIpsState = Azure::DataLakeStore::Mgmt::V2016_11_01::Models::FirewallAllowAzureIpsState TierType = Azure::DataLakeStore::Mgmt::V2016_11_01::Models::TierType OperationOrigin = Azure::DataLakeStore::Mgmt::V2016_11_01::Models::OperationOrigin - CheckNameAvailabilityParameters = Azure::DataLakeStore::Mgmt::V2016_11_01::Models::CheckNameAvailabilityParameters end class DataLakeStoreManagementClass - attr_reader :firewall_rules, :locations, :virtual_network_rules, :trusted_id_providers, :accounts, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :firewall_rules, :locations, :virtual_network_rules, :trusted_id_providers, :accounts, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -75,12 +75,12 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) + @operations = @client_0.operations @firewall_rules = @client_0.firewall_rules @locations = @client_0.locations @virtual_network_rules = @client_0.virtual_network_rules @trusted_id_providers = @client_0.trusted_id_providers @accounts = @client_0.accounts - @operations = @client_0.operations @model_classes = ModelClasses.new end @@ -99,6 +99,9 @@ def method_missing(method, *args) end class ModelClasses + def check_name_availability_parameters + Azure::DataLakeStore::Mgmt::V2016_11_01::Models::CheckNameAvailabilityParameters + end def subscription_state Azure::DataLakeStore::Mgmt::V2016_11_01::Models::SubscriptionState end @@ -237,9 +240,6 @@ def tier_type def operation_origin Azure::DataLakeStore::Mgmt::V2016_11_01::Models::OperationOrigin end - def check_name_availability_parameters - Azure::DataLakeStore::Mgmt::V2016_11_01::Models::CheckNameAvailabilityParameters - end end end end diff --git a/azure_sdk/lib/latest/modules/devspaces_profile_module.rb b/azure_sdk/lib/latest/modules/devspaces_profile_module.rb index 324fc3abc2..afba20fc66 100644 --- a/azure_sdk/lib/latest/modules/devspaces_profile_module.rb +++ b/azure_sdk/lib/latest/modules/devspaces_profile_module.rb @@ -7,10 +7,11 @@ module Azure::Profiles::Latest module DevSpaces module Mgmt - Controllers = Azure::DevSpaces::Mgmt::V2018_06_01_preview::Controllers Operations = Azure::DevSpaces::Mgmt::V2018_06_01_preview::Operations + Controllers = Azure::DevSpaces::Mgmt::V2018_06_01_preview::Controllers module Models + ResourceProviderOperationDisplay = Azure::DevSpaces::Mgmt::V2018_06_01_preview::Models::ResourceProviderOperationDisplay OrchestratorSpecificConnectionDetails = Azure::DevSpaces::Mgmt::V2018_06_01_preview::Models::OrchestratorSpecificConnectionDetails ResourceProviderOperationDefinition = Azure::DevSpaces::Mgmt::V2018_06_01_preview::Models::ResourceProviderOperationDefinition ResourceProviderOperationList = Azure::DevSpaces::Mgmt::V2018_06_01_preview::Models::ResourceProviderOperationList @@ -27,11 +28,10 @@ module Models TrackedResource = Azure::DevSpaces::Mgmt::V2018_06_01_preview::Models::TrackedResource ControllerConnectionDetailsList = Azure::DevSpaces::Mgmt::V2018_06_01_preview::Models::ControllerConnectionDetailsList ControllerUpdateParameters = Azure::DevSpaces::Mgmt::V2018_06_01_preview::Models::ControllerUpdateParameters - ResourceProviderOperationDisplay = Azure::DevSpaces::Mgmt::V2018_06_01_preview::Models::ResourceProviderOperationDisplay end class DevSpacesManagementClass - attr_reader :controllers, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :controllers, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -41,8 +41,8 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) - @controllers = @client_0.controllers @operations = @client_0.operations + @controllers = @client_0.controllers @model_classes = ModelClasses.new end @@ -61,6 +61,9 @@ def method_missing(method, *args) end class ModelClasses + def resource_provider_operation_display + Azure::DevSpaces::Mgmt::V2018_06_01_preview::Models::ResourceProviderOperationDisplay + end def orchestrator_specific_connection_details Azure::DevSpaces::Mgmt::V2018_06_01_preview::Models::OrchestratorSpecificConnectionDetails end @@ -109,9 +112,6 @@ def controller_connection_details_list def controller_update_parameters Azure::DevSpaces::Mgmt::V2018_06_01_preview::Models::ControllerUpdateParameters end - def resource_provider_operation_display - Azure::DevSpaces::Mgmt::V2018_06_01_preview::Models::ResourceProviderOperationDisplay - end end end end diff --git a/azure_sdk/lib/latest/modules/devtestlabs_profile_module.rb b/azure_sdk/lib/latest/modules/devtestlabs_profile_module.rb index 44bc416a6b..0e485a72a9 100644 --- a/azure_sdk/lib/latest/modules/devtestlabs_profile_module.rb +++ b/azure_sdk/lib/latest/modules/devtestlabs_profile_module.rb @@ -9,29 +9,30 @@ module DevTestLabs module Mgmt VirtualMachines = Azure::DevTestLabs::Mgmt::V2016_05_15::VirtualMachines Disks = Azure::DevTestLabs::Mgmt::V2016_05_15::Disks - Operations = Azure::DevTestLabs::Mgmt::V2016_05_15::Operations + ProviderOperations = Azure::DevTestLabs::Mgmt::V2016_05_15::ProviderOperations Labs = Azure::DevTestLabs::Mgmt::V2016_05_15::Labs GlobalSchedules = Azure::DevTestLabs::Mgmt::V2016_05_15::GlobalSchedules + Operations = Azure::DevTestLabs::Mgmt::V2016_05_15::Operations ArtifactSources = Azure::DevTestLabs::Mgmt::V2016_05_15::ArtifactSources ArmTemplates = Azure::DevTestLabs::Mgmt::V2016_05_15::ArmTemplates Artifacts = Azure::DevTestLabs::Mgmt::V2016_05_15::Artifacts Costs = Azure::DevTestLabs::Mgmt::V2016_05_15::Costs CustomImages = Azure::DevTestLabs::Mgmt::V2016_05_15::CustomImages Formulas = Azure::DevTestLabs::Mgmt::V2016_05_15::Formulas - GalleryImages = Azure::DevTestLabs::Mgmt::V2016_05_15::GalleryImages - ProviderOperations = Azure::DevTestLabs::Mgmt::V2016_05_15::ProviderOperations - PolicySets = Azure::DevTestLabs::Mgmt::V2016_05_15::PolicySets NotificationChannels = Azure::DevTestLabs::Mgmt::V2016_05_15::NotificationChannels - ServiceRunners = Azure::DevTestLabs::Mgmt::V2016_05_15::ServiceRunners - Environments = Azure::DevTestLabs::Mgmt::V2016_05_15::Environments + PolicySets = Azure::DevTestLabs::Mgmt::V2016_05_15::PolicySets + GalleryImages = Azure::DevTestLabs::Mgmt::V2016_05_15::GalleryImages + Users = Azure::DevTestLabs::Mgmt::V2016_05_15::Users + Schedules = Azure::DevTestLabs::Mgmt::V2016_05_15::Schedules Secrets = Azure::DevTestLabs::Mgmt::V2016_05_15::Secrets VirtualMachineSchedules = Azure::DevTestLabs::Mgmt::V2016_05_15::VirtualMachineSchedules - Schedules = Azure::DevTestLabs::Mgmt::V2016_05_15::Schedules - Users = Azure::DevTestLabs::Mgmt::V2016_05_15::Users + Environments = Azure::DevTestLabs::Mgmt::V2016_05_15::Environments + ServiceRunners = Azure::DevTestLabs::Mgmt::V2016_05_15::ServiceRunners VirtualNetworks = Azure::DevTestLabs::Mgmt::V2016_05_15::VirtualNetworks Policies = Azure::DevTestLabs::Mgmt::V2016_05_15::Policies module Models + GenerateArmTemplateRequest = Azure::DevTestLabs::Mgmt::V2016_05_15::Models::GenerateArmTemplateRequest ComputeVmInstanceViewStatus = Azure::DevTestLabs::Mgmt::V2016_05_15::Models::ComputeVmInstanceViewStatus GenerateUploadUriParameter = Azure::DevTestLabs::Mgmt::V2016_05_15::Models::GenerateUploadUriParameter ComputeVmProperties = Azure::DevTestLabs::Mgmt::V2016_05_15::Models::ComputeVmProperties @@ -152,8 +153,8 @@ module Models PolicyEvaluatorType = Azure::DevTestLabs::Mgmt::V2016_05_15::Models::PolicyEvaluatorType PolicyStatus = Azure::DevTestLabs::Mgmt::V2016_05_15::Models::PolicyStatus HttpStatusCode = Azure::DevTestLabs::Mgmt::V2016_05_15::Models::HttpStatusCode - UserIdentity = Azure::DevTestLabs::Mgmt::V2016_05_15::Models::UserIdentity Event = Azure::DevTestLabs::Mgmt::V2016_05_15::Models::Event + UserIdentity = Azure::DevTestLabs::Mgmt::V2016_05_15::Models::UserIdentity Policy = Azure::DevTestLabs::Mgmt::V2016_05_15::Models::Policy Schedule = Azure::DevTestLabs::Mgmt::V2016_05_15::Models::Schedule Port = Azure::DevTestLabs::Mgmt::V2016_05_15::Models::Port @@ -187,11 +188,10 @@ module Models GalleryImageReferenceFragment = Azure::DevTestLabs::Mgmt::V2016_05_15::Models::GalleryImageReferenceFragment ParameterInfo = Azure::DevTestLabs::Mgmt::V2016_05_15::Models::ParameterInfo ComputeDataDisk = Azure::DevTestLabs::Mgmt::V2016_05_15::Models::ComputeDataDisk - GenerateArmTemplateRequest = Azure::DevTestLabs::Mgmt::V2016_05_15::Models::GenerateArmTemplateRequest end class DevTestLabsManagementClass - attr_reader :virtual_machines, :disks, :operations, :labs, :global_schedules, :artifact_sources, :arm_templates, :artifacts, :costs, :custom_images, :formulas, :gallery_images, :provider_operations, :policy_sets, :notification_channels, :service_runners, :environments, :secrets, :virtual_machine_schedules, :schedules, :users, :virtual_networks, :policies, :configurable, :base_url, :options, :model_classes + attr_reader :virtual_machines, :disks, :provider_operations, :labs, :global_schedules, :operations, :artifact_sources, :arm_templates, :artifacts, :costs, :custom_images, :formulas, :notification_channels, :policy_sets, :gallery_images, :users, :schedules, :secrets, :virtual_machine_schedules, :environments, :service_runners, :virtual_networks, :policies, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -203,25 +203,25 @@ def initialize(configurable, base_url=nil, options=nil) add_telemetry(@client_0) @virtual_machines = @client_0.virtual_machines @disks = @client_0.disks - @operations = @client_0.operations + @provider_operations = @client_0.provider_operations @labs = @client_0.labs @global_schedules = @client_0.global_schedules + @operations = @client_0.operations @artifact_sources = @client_0.artifact_sources @arm_templates = @client_0.arm_templates @artifacts = @client_0.artifacts @costs = @client_0.costs @custom_images = @client_0.custom_images @formulas = @client_0.formulas - @gallery_images = @client_0.gallery_images - @provider_operations = @client_0.provider_operations - @policy_sets = @client_0.policy_sets @notification_channels = @client_0.notification_channels - @service_runners = @client_0.service_runners - @environments = @client_0.environments + @policy_sets = @client_0.policy_sets + @gallery_images = @client_0.gallery_images + @users = @client_0.users + @schedules = @client_0.schedules @secrets = @client_0.secrets @virtual_machine_schedules = @client_0.virtual_machine_schedules - @schedules = @client_0.schedules - @users = @client_0.users + @environments = @client_0.environments + @service_runners = @client_0.service_runners @virtual_networks = @client_0.virtual_networks @policies = @client_0.policies @@ -242,6 +242,9 @@ def method_missing(method, *args) end class ModelClasses + def generate_arm_template_request + Azure::DevTestLabs::Mgmt::V2016_05_15::Models::GenerateArmTemplateRequest + end def compute_vm_instance_view_status Azure::DevTestLabs::Mgmt::V2016_05_15::Models::ComputeVmInstanceViewStatus end @@ -602,12 +605,12 @@ def policy_status def http_status_code Azure::DevTestLabs::Mgmt::V2016_05_15::Models::HttpStatusCode end - def user_identity - Azure::DevTestLabs::Mgmt::V2016_05_15::Models::UserIdentity - end def event Azure::DevTestLabs::Mgmt::V2016_05_15::Models::Event end + def user_identity + Azure::DevTestLabs::Mgmt::V2016_05_15::Models::UserIdentity + end def policy Azure::DevTestLabs::Mgmt::V2016_05_15::Models::Policy end @@ -707,9 +710,6 @@ def parameter_info def compute_data_disk Azure::DevTestLabs::Mgmt::V2016_05_15::Models::ComputeDataDisk end - def generate_arm_template_request - Azure::DevTestLabs::Mgmt::V2016_05_15::Models::GenerateArmTemplateRequest - end end end end diff --git a/azure_sdk/lib/latest/modules/dns_profile_module.rb b/azure_sdk/lib/latest/modules/dns_profile_module.rb index c46b8b1058..9112329e1d 100644 --- a/azure_sdk/lib/latest/modules/dns_profile_module.rb +++ b/azure_sdk/lib/latest/modules/dns_profile_module.rb @@ -11,6 +11,7 @@ module Mgmt Zones = Azure::Dns::Mgmt::V2018_03_01_preview::Zones module Models + CaaRecord = Azure::Dns::Mgmt::V2018_03_01_preview::Models::CaaRecord ZoneType = Azure::Dns::Mgmt::V2018_03_01_preview::Models::ZoneType Resource = Azure::Dns::Mgmt::V2018_03_01_preview::Models::Resource SubResource = Azure::Dns::Mgmt::V2018_03_01_preview::Models::SubResource @@ -33,7 +34,6 @@ module Models AzureEntityResource = Azure::Dns::Mgmt::V2018_03_01_preview::Models::AzureEntityResource RecordType = Azure::Dns::Mgmt::V2018_03_01_preview::Models::RecordType ZoneUpdate = Azure::Dns::Mgmt::V2018_03_01_preview::Models::ZoneUpdate - CaaRecord = Azure::Dns::Mgmt::V2018_03_01_preview::Models::CaaRecord end class DnsManagementClass @@ -67,6 +67,9 @@ def method_missing(method, *args) end class ModelClasses + def caa_record + Azure::Dns::Mgmt::V2018_03_01_preview::Models::CaaRecord + end def zone_type Azure::Dns::Mgmt::V2018_03_01_preview::Models::ZoneType end @@ -133,9 +136,6 @@ def record_type def zone_update Azure::Dns::Mgmt::V2018_03_01_preview::Models::ZoneUpdate end - def caa_record - Azure::Dns::Mgmt::V2018_03_01_preview::Models::CaaRecord - end end end end diff --git a/azure_sdk/lib/latest/modules/entitysearch_profile_module.rb b/azure_sdk/lib/latest/modules/entitysearch_profile_module.rb index 236ba7464b..4d46d6f60b 100644 --- a/azure_sdk/lib/latest/modules/entitysearch_profile_module.rb +++ b/azure_sdk/lib/latest/modules/entitysearch_profile_module.rb @@ -33,7 +33,7 @@ module Models ContractualRulesAttribution = Azure::CognitiveServices::EntitySearch::V1_0::Models::ContractualRulesAttribution MediaObject = Azure::CognitiveServices::EntitySearch::V1_0::Models::MediaObject Error = Azure::CognitiveServices::EntitySearch::V1_0::Models::Error - CivicStructure = Azure::CognitiveServices::EntitySearch::V1_0::Models::CivicStructure + LocalBusiness = Azure::CognitiveServices::EntitySearch::V1_0::Models::LocalBusiness TouristAttraction = Azure::CognitiveServices::EntitySearch::V1_0::Models::TouristAttraction Airport = Azure::CognitiveServices::EntitySearch::V1_0::Models::Airport License = Azure::CognitiveServices::EntitySearch::V1_0::Models::License @@ -52,7 +52,7 @@ module Models EntityScenario = Azure::CognitiveServices::EntitySearch::V1_0::Models::EntityScenario AnswerType = Azure::CognitiveServices::EntitySearch::V1_0::Models::AnswerType ResponseFormat = Azure::CognitiveServices::EntitySearch::V1_0::Models::ResponseFormat - LocalBusiness = Azure::CognitiveServices::EntitySearch::V1_0::Models::LocalBusiness + CivicStructure = Azure::CognitiveServices::EntitySearch::V1_0::Models::CivicStructure EntityType = Azure::CognitiveServices::EntitySearch::V1_0::Models::EntityType ErrorResponse = Azure::CognitiveServices::EntitySearch::V1_0::Models::ErrorResponse end @@ -159,8 +159,8 @@ def media_object def error Azure::CognitiveServices::EntitySearch::V1_0::Models::Error end - def civic_structure - Azure::CognitiveServices::EntitySearch::V1_0::Models::CivicStructure + def local_business + Azure::CognitiveServices::EntitySearch::V1_0::Models::LocalBusiness end def tourist_attraction Azure::CognitiveServices::EntitySearch::V1_0::Models::TouristAttraction @@ -216,8 +216,8 @@ def answer_type def response_format Azure::CognitiveServices::EntitySearch::V1_0::Models::ResponseFormat end - def local_business - Azure::CognitiveServices::EntitySearch::V1_0::Models::LocalBusiness + def civic_structure + Azure::CognitiveServices::EntitySearch::V1_0::Models::CivicStructure end def entity_type Azure::CognitiveServices::EntitySearch::V1_0::Models::EntityType diff --git a/azure_sdk/lib/latest/modules/eventgrid_profile_module.rb b/azure_sdk/lib/latest/modules/eventgrid_profile_module.rb index ada63bfa52..a7810bfcc2 100644 --- a/azure_sdk/lib/latest/modules/eventgrid_profile_module.rb +++ b/azure_sdk/lib/latest/modules/eventgrid_profile_module.rb @@ -187,12 +187,12 @@ def job_state end end module Mgmt + Operations = Azure::EventGrid::Mgmt::V2018_09_15_preview::Operations Domains = Azure::EventGrid::Mgmt::V2018_09_15_preview::Domains DomainTopics = Azure::EventGrid::Mgmt::V2018_09_15_preview::DomainTopics EventSubscriptions = Azure::EventGrid::Mgmt::V2018_09_15_preview::EventSubscriptions Topics = Azure::EventGrid::Mgmt::V2018_09_15_preview::Topics TopicTypes = Azure::EventGrid::Mgmt::V2018_09_15_preview::TopicTypes - Operations = Azure::EventGrid::Mgmt::V2018_09_15_preview::Operations module Models TopicSharedAccessKeys = Azure::EventGrid::Mgmt::V2018_09_15_preview::Models::TopicSharedAccessKeys @@ -256,7 +256,7 @@ module Models end class EventGridManagementClass - attr_reader :domains, :domain_topics, :event_subscriptions, :topics, :topic_types, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :domains, :domain_topics, :event_subscriptions, :topics, :topic_types, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -266,12 +266,12 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) + @operations = @client_0.operations @domains = @client_0.domains @domain_topics = @client_0.domain_topics @event_subscriptions = @client_0.event_subscriptions @topics = @client_0.topics @topic_types = @client_0.topic_types - @operations = @client_0.operations @model_classes = ModelClasses.new end diff --git a/azure_sdk/lib/latest/modules/eventhub_profile_module.rb b/azure_sdk/lib/latest/modules/eventhub_profile_module.rb index 617801ec88..26e2d3813e 100644 --- a/azure_sdk/lib/latest/modules/eventhub_profile_module.rb +++ b/azure_sdk/lib/latest/modules/eventhub_profile_module.rb @@ -7,10 +7,10 @@ module Azure::Profiles::Latest module EventHub module Mgmt + Operations = Azure::EventHub::Mgmt::V2018_01_01_preview::Operations Clusters = Azure::EventHub::Mgmt::V2018_01_01_preview::Clusters Namespaces = Azure::EventHub::Mgmt::V2018_01_01_preview::Namespaces Configuration = Azure::EventHub::Mgmt::V2018_01_01_preview::Configuration - Operations = Azure::EventHub::Mgmt::V2018_01_01_preview::Operations module Models SkuName = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::SkuName @@ -36,7 +36,7 @@ module Models end class EventHubManagementClass - attr_reader :clusters, :namespaces, :configuration, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :clusters, :namespaces, :configuration, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -46,10 +46,10 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) + @operations = @client_0.operations @clusters = @client_0.clusters @namespaces = @client_0.namespaces @configuration = @client_0.configuration - @operations = @client_0.operations @model_classes = ModelClasses.new end diff --git a/azure_sdk/lib/latest/modules/face_profile_module.rb b/azure_sdk/lib/latest/modules/face_profile_module.rb index 04e2a7245f..2f91f0850b 100644 --- a/azure_sdk/lib/latest/modules/face_profile_module.rb +++ b/azure_sdk/lib/latest/modules/face_profile_module.rb @@ -12,7 +12,8 @@ module Face PersonGroupOperations = Azure::CognitiveServices::Face::V1_0::PersonGroupOperations module Models - Gender = Azure::CognitiveServices::Face::V1_0::Models::Gender + GlassesType = Azure::CognitiveServices::Face::V1_0::Models::GlassesType + HairColorType = Azure::CognitiveServices::Face::V1_0::Models::HairColorType AccessoryType = Azure::CognitiveServices::Face::V1_0::Models::AccessoryType FindSimilarMatchMode = Azure::CognitiveServices::Face::V1_0::Models::FindSimilarMatchMode TrainingStatusType = Azure::CognitiveServices::Face::V1_0::Models::TrainingStatusType @@ -48,16 +49,15 @@ module Models ImageUrl = Azure::CognitiveServices::Face::V1_0::Models::ImageUrl UpdatePersonFaceRequest = Azure::CognitiveServices::Face::V1_0::Models::UpdatePersonFaceRequest DetectedFace = Azure::CognitiveServices::Face::V1_0::Models::DetectedFace - TrainingStatus = Azure::CognitiveServices::Face::V1_0::Models::TrainingStatus + Gender = Azure::CognitiveServices::Face::V1_0::Models::Gender Blur = Azure::CognitiveServices::Face::V1_0::Models::Blur - PersonGroup = Azure::CognitiveServices::Face::V1_0::Models::PersonGroup + TrainingStatus = Azure::CognitiveServices::Face::V1_0::Models::TrainingStatus FaceList = Azure::CognitiveServices::Face::V1_0::Models::FaceList - HairColorType = Azure::CognitiveServices::Face::V1_0::Models::HairColorType + PersonGroup = Azure::CognitiveServices::Face::V1_0::Models::PersonGroup Person = Azure::CognitiveServices::Face::V1_0::Models::Person - GlassesType = Azure::CognitiveServices::Face::V1_0::Models::GlassesType + BlurLevel = Azure::CognitiveServices::Face::V1_0::Models::BlurLevel ExposureLevel = Azure::CognitiveServices::Face::V1_0::Models::ExposureLevel NoiseLevel = Azure::CognitiveServices::Face::V1_0::Models::NoiseLevel - BlurLevel = Azure::CognitiveServices::Face::V1_0::Models::BlurLevel end class FaceDataClass @@ -93,8 +93,11 @@ def method_missing(method, *args) end class ModelClasses - def gender - Azure::CognitiveServices::Face::V1_0::Models::Gender + def glasses_type + Azure::CognitiveServices::Face::V1_0::Models::GlassesType + end + def hair_color_type + Azure::CognitiveServices::Face::V1_0::Models::HairColorType end def accessory_type Azure::CognitiveServices::Face::V1_0::Models::AccessoryType @@ -201,26 +204,26 @@ def update_person_face_request def detected_face Azure::CognitiveServices::Face::V1_0::Models::DetectedFace end - def training_status - Azure::CognitiveServices::Face::V1_0::Models::TrainingStatus + def gender + Azure::CognitiveServices::Face::V1_0::Models::Gender end def blur Azure::CognitiveServices::Face::V1_0::Models::Blur end - def person_group - Azure::CognitiveServices::Face::V1_0::Models::PersonGroup + def training_status + Azure::CognitiveServices::Face::V1_0::Models::TrainingStatus end def face_list Azure::CognitiveServices::Face::V1_0::Models::FaceList end - def hair_color_type - Azure::CognitiveServices::Face::V1_0::Models::HairColorType + def person_group + Azure::CognitiveServices::Face::V1_0::Models::PersonGroup end def person Azure::CognitiveServices::Face::V1_0::Models::Person end - def glasses_type - Azure::CognitiveServices::Face::V1_0::Models::GlassesType + def blur_level + Azure::CognitiveServices::Face::V1_0::Models::BlurLevel end def exposure_level Azure::CognitiveServices::Face::V1_0::Models::ExposureLevel @@ -228,9 +231,6 @@ def exposure_level def noise_level Azure::CognitiveServices::Face::V1_0::Models::NoiseLevel end - def blur_level - Azure::CognitiveServices::Face::V1_0::Models::BlurLevel - end end end end diff --git a/azure_sdk/lib/latest/modules/features_profile_module.rb b/azure_sdk/lib/latest/modules/features_profile_module.rb index d1a8453c22..189d52eff9 100644 --- a/azure_sdk/lib/latest/modules/features_profile_module.rb +++ b/azure_sdk/lib/latest/modules/features_profile_module.rb @@ -10,12 +10,12 @@ module Mgmt Features = Azure::Features::Mgmt::V2015_12_01::Features module Models + OperationDisplay = Azure::Features::Mgmt::V2015_12_01::Models::OperationDisplay Operation = Azure::Features::Mgmt::V2015_12_01::Models::Operation OperationListResult = Azure::Features::Mgmt::V2015_12_01::Models::OperationListResult FeatureProperties = Azure::Features::Mgmt::V2015_12_01::Models::FeatureProperties FeatureOperationsListResult = Azure::Features::Mgmt::V2015_12_01::Models::FeatureOperationsListResult FeatureResult = Azure::Features::Mgmt::V2015_12_01::Models::FeatureResult - OperationDisplay = Azure::Features::Mgmt::V2015_12_01::Models::OperationDisplay end class FeaturesManagementClass @@ -48,6 +48,9 @@ def method_missing(method, *args) end class ModelClasses + def operation_display + Azure::Features::Mgmt::V2015_12_01::Models::OperationDisplay + end def operation Azure::Features::Mgmt::V2015_12_01::Models::Operation end @@ -63,9 +66,6 @@ def feature_operations_list_result def feature_result Azure::Features::Mgmt::V2015_12_01::Models::FeatureResult end - def operation_display - Azure::Features::Mgmt::V2015_12_01::Models::OperationDisplay - end end end end diff --git a/azure_sdk/lib/latest/modules/graphrbac_profile_module.rb b/azure_sdk/lib/latest/modules/graphrbac_profile_module.rb index 3bde91c947..244a98bc9c 100644 --- a/azure_sdk/lib/latest/modules/graphrbac_profile_module.rb +++ b/azure_sdk/lib/latest/modules/graphrbac_profile_module.rb @@ -14,6 +14,7 @@ module GraphRbac Users = Azure::GraphRbac::V1_6::Users module Models + DirectoryObjectListResult = Azure::GraphRbac::V1_6::Models::DirectoryObjectListResult UserBase = Azure::GraphRbac::V1_6::Models::UserBase AADObject = Azure::GraphRbac::V1_6::Models::AADObject RequiredResourceAccess = Azure::GraphRbac::V1_6::Models::RequiredResourceAccess @@ -55,7 +56,6 @@ module Models PasswordCredential = Azure::GraphRbac::V1_6::Models::PasswordCredential ServicePrincipalListResult = Azure::GraphRbac::V1_6::Models::ServicePrincipalListResult PasswordProfile = Azure::GraphRbac::V1_6::Models::PasswordProfile - DirectoryObjectListResult = Azure::GraphRbac::V1_6::Models::DirectoryObjectListResult end class GraphRbacDataClass @@ -93,6 +93,9 @@ def method_missing(method, *args) end class ModelClasses + def directory_object_list_result + Azure::GraphRbac::V1_6::Models::DirectoryObjectListResult + end def user_base Azure::GraphRbac::V1_6::Models::UserBase end @@ -216,9 +219,6 @@ def service_principal_list_result def password_profile Azure::GraphRbac::V1_6::Models::PasswordProfile end - def directory_object_list_result - Azure::GraphRbac::V1_6::Models::DirectoryObjectListResult - end end end end diff --git a/azure_sdk/lib/latest/modules/imagesearch_profile_module.rb b/azure_sdk/lib/latest/modules/imagesearch_profile_module.rb index 8672db9989..a5b548a73c 100644 --- a/azure_sdk/lib/latest/modules/imagesearch_profile_module.rb +++ b/azure_sdk/lib/latest/modules/imagesearch_profile_module.rb @@ -24,8 +24,8 @@ module Models ImageObject = Azure::CognitiveServices::ImageSearch::V1_0::Models::ImageObject Organization = Azure::CognitiveServices::ImageSearch::V1_0::Models::Organization Intangible = Azure::CognitiveServices::ImageSearch::V1_0::Models::Intangible - MediaObject = Azure::CognitiveServices::ImageSearch::V1_0::Models::MediaObject Error = Azure::CognitiveServices::ImageSearch::V1_0::Models::Error + MediaObject = Azure::CognitiveServices::ImageSearch::V1_0::Models::MediaObject StructuredValue = Azure::CognitiveServices::ImageSearch::V1_0::Models::StructuredValue Images = Azure::CognitiveServices::ImageSearch::V1_0::Models::Images RelatedSearchesModule = Azure::CognitiveServices::ImageSearch::V1_0::Models::RelatedSearchesModule @@ -144,12 +144,12 @@ def organization def intangible Azure::CognitiveServices::ImageSearch::V1_0::Models::Intangible end - def media_object - Azure::CognitiveServices::ImageSearch::V1_0::Models::MediaObject - end def error Azure::CognitiveServices::ImageSearch::V1_0::Models::Error end + def media_object + Azure::CognitiveServices::ImageSearch::V1_0::Models::MediaObject + end def structured_value Azure::CognitiveServices::ImageSearch::V1_0::Models::StructuredValue end diff --git a/azure_sdk/lib/latest/modules/iotcentral_profile_module.rb b/azure_sdk/lib/latest/modules/iotcentral_profile_module.rb index ffbd3c76b3..33e4c73cdd 100644 --- a/azure_sdk/lib/latest/modules/iotcentral_profile_module.rb +++ b/azure_sdk/lib/latest/modules/iotcentral_profile_module.rb @@ -7,8 +7,8 @@ module Azure::Profiles::Latest module IotCentral module Mgmt - Apps = Azure::IotCentral::Mgmt::V2018_09_01::Apps Operations = Azure::IotCentral::Mgmt::V2018_09_01::Operations + Apps = Azure::IotCentral::Mgmt::V2018_09_01::Apps module Models ErrorDetails = Azure::IotCentral::Mgmt::V2018_09_01::Models::ErrorDetails @@ -27,7 +27,7 @@ module Models end class IotCentralManagementClass - attr_reader :apps, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :apps, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -37,8 +37,8 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) - @apps = @client_0.apps @operations = @client_0.operations + @apps = @client_0.apps @model_classes = ModelClasses.new end diff --git a/azure_sdk/lib/latest/modules/iothub_profile_module.rb b/azure_sdk/lib/latest/modules/iothub_profile_module.rb index a9344afa6d..ea7d097a67 100644 --- a/azure_sdk/lib/latest/modules/iothub_profile_module.rb +++ b/azure_sdk/lib/latest/modules/iothub_profile_module.rb @@ -7,12 +7,13 @@ module Azure::Profiles::Latest module IotHub module Mgmt + Operations = Azure::IotHub::Mgmt::V2018_04_01::Operations IotHubResource = Azure::IotHub::Mgmt::V2018_04_01::IotHubResource ResourceProviderCommon = Azure::IotHub::Mgmt::V2018_04_01::ResourceProviderCommon Certificates = Azure::IotHub::Mgmt::V2018_04_01::Certificates - Operations = Azure::IotHub::Mgmt::V2018_04_01::Operations module Models + OperationsMonitoringProperties = Azure::IotHub::Mgmt::V2018_04_01::Models::OperationsMonitoringProperties MatchedRoute = Azure::IotHub::Mgmt::V2018_04_01::Models::MatchedRoute SharedAccessSignatureAuthorizationRuleListResult = Azure::IotHub::Mgmt::V2018_04_01::Models::SharedAccessSignatureAuthorizationRuleListResult TestAllRoutesResult = Azure::IotHub::Mgmt::V2018_04_01::Models::TestAllRoutesResult @@ -89,11 +90,10 @@ module Models RoutingMessage = Azure::IotHub::Mgmt::V2018_04_01::Models::RoutingMessage StorageEndpointProperties = Azure::IotHub::Mgmt::V2018_04_01::Models::StorageEndpointProperties TestAllRoutesInput = Azure::IotHub::Mgmt::V2018_04_01::Models::TestAllRoutesInput - OperationsMonitoringProperties = Azure::IotHub::Mgmt::V2018_04_01::Models::OperationsMonitoringProperties end class IotHubManagementClass - attr_reader :iot_hub_resource, :resource_provider_common, :certificates, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :iot_hub_resource, :resource_provider_common, :certificates, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -103,10 +103,10 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) + @operations = @client_0.operations @iot_hub_resource = @client_0.iot_hub_resource @resource_provider_common = @client_0.resource_provider_common @certificates = @client_0.certificates - @operations = @client_0.operations @model_classes = ModelClasses.new end @@ -125,6 +125,9 @@ def method_missing(method, *args) end class ModelClasses + def operations_monitoring_properties + Azure::IotHub::Mgmt::V2018_04_01::Models::OperationsMonitoringProperties + end def matched_route Azure::IotHub::Mgmt::V2018_04_01::Models::MatchedRoute end @@ -353,9 +356,6 @@ def storage_endpoint_properties def test_all_routes_input Azure::IotHub::Mgmt::V2018_04_01::Models::TestAllRoutesInput end - def operations_monitoring_properties - Azure::IotHub::Mgmt::V2018_04_01::Models::OperationsMonitoringProperties - end end end end diff --git a/azure_sdk/lib/latest/modules/keyvault_profile_module.rb b/azure_sdk/lib/latest/modules/keyvault_profile_module.rb index f2230895ba..df3770b7fb 100644 --- a/azure_sdk/lib/latest/modules/keyvault_profile_module.rb +++ b/azure_sdk/lib/latest/modules/keyvault_profile_module.rb @@ -9,6 +9,7 @@ module Azure::Profiles::Latest module KeyVault module Models + BackupStorageResult = Azure::KeyVault::V7_0::Models::BackupStorageResult CertificateRestoreParameters = Azure::KeyVault::V7_0::Models::CertificateRestoreParameters DeletedStorageListResult = Azure::KeyVault::V7_0::Models::DeletedStorageListResult DeletedStorageBundle = Azure::KeyVault::V7_0::Models::DeletedStorageBundle @@ -106,7 +107,6 @@ module Models BackupCertificateResult = Azure::KeyVault::V7_0::Models::BackupCertificateResult DeletedSasDefinitionListResult = Azure::KeyVault::V7_0::Models::DeletedSasDefinitionListResult StorageRestoreParameters = Azure::KeyVault::V7_0::Models::StorageRestoreParameters - BackupStorageResult = Azure::KeyVault::V7_0::Models::BackupStorageResult end class KeyVaultDataClass @@ -138,6 +138,9 @@ def method_missing(method, *args) end class ModelClasses + def backup_storage_result + Azure::KeyVault::V7_0::Models::BackupStorageResult + end def certificate_restore_parameters Azure::KeyVault::V7_0::Models::CertificateRestoreParameters end @@ -429,14 +432,11 @@ def deleted_sas_definition_list_result def storage_restore_parameters Azure::KeyVault::V7_0::Models::StorageRestoreParameters end - def backup_storage_result - Azure::KeyVault::V7_0::Models::BackupStorageResult - end end end module Mgmt - Vaults = Azure::KeyVault::Mgmt::V2018_02_14::Vaults Operations = Azure::KeyVault::Mgmt::V2018_02_14::Operations + Vaults = Azure::KeyVault::Mgmt::V2018_02_14::Vaults module Models Permissions = Azure::KeyVault::Mgmt::V2018_02_14::Models::Permissions @@ -466,11 +466,11 @@ module Models Operation = Azure::KeyVault::Mgmt::V2018_02_14::Models::Operation StoragePermissions = Azure::KeyVault::Mgmt::V2018_02_14::Models::StoragePermissions VirtualNetworkRule = Azure::KeyVault::Mgmt::V2018_02_14::Models::VirtualNetworkRule - AccessPolicyUpdateKind = Azure::KeyVault::Mgmt::V2018_02_14::Models::AccessPolicyUpdateKind + Reason = Azure::KeyVault::Mgmt::V2018_02_14::Models::Reason CreateMode = Azure::KeyVault::Mgmt::V2018_02_14::Models::CreateMode CertificatePermissions = Azure::KeyVault::Mgmt::V2018_02_14::Models::CertificatePermissions Sku = Azure::KeyVault::Mgmt::V2018_02_14::Models::Sku - Reason = Azure::KeyVault::Mgmt::V2018_02_14::Models::Reason + AccessPolicyUpdateKind = Azure::KeyVault::Mgmt::V2018_02_14::Models::AccessPolicyUpdateKind IPRule = Azure::KeyVault::Mgmt::V2018_02_14::Models::IPRule NetworkRuleSet = Azure::KeyVault::Mgmt::V2018_02_14::Models::NetworkRuleSet NetworkRuleBypassOptions = Azure::KeyVault::Mgmt::V2018_02_14::Models::NetworkRuleBypassOptions @@ -478,7 +478,7 @@ module Models end class KeyVaultManagementClass - attr_reader :vaults, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :vaults, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -488,8 +488,8 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) - @vaults = @client_0.vaults @operations = @client_0.operations + @vaults = @client_0.vaults @model_classes = ModelClasses.new end @@ -589,8 +589,8 @@ def storage_permissions def virtual_network_rule Azure::KeyVault::Mgmt::V2018_02_14::Models::VirtualNetworkRule end - def access_policy_update_kind - Azure::KeyVault::Mgmt::V2018_02_14::Models::AccessPolicyUpdateKind + def reason + Azure::KeyVault::Mgmt::V2018_02_14::Models::Reason end def create_mode Azure::KeyVault::Mgmt::V2018_02_14::Models::CreateMode @@ -601,8 +601,8 @@ def certificate_permissions def sku Azure::KeyVault::Mgmt::V2018_02_14::Models::Sku end - def reason - Azure::KeyVault::Mgmt::V2018_02_14::Models::Reason + def access_policy_update_kind + Azure::KeyVault::Mgmt::V2018_02_14::Models::AccessPolicyUpdateKind end def iprule Azure::KeyVault::Mgmt::V2018_02_14::Models::IPRule diff --git a/azure_sdk/lib/latest/modules/links_profile_module.rb b/azure_sdk/lib/latest/modules/links_profile_module.rb index 32c6c0c1ee..b4436dca48 100644 --- a/azure_sdk/lib/latest/modules/links_profile_module.rb +++ b/azure_sdk/lib/latest/modules/links_profile_module.rb @@ -7,10 +7,11 @@ module Azure::Profiles::Latest module Links module Mgmt - ResourceLinks = Azure::Links::Mgmt::V2016_09_01::ResourceLinks Operations = Azure::Links::Mgmt::V2016_09_01::Operations + ResourceLinks = Azure::Links::Mgmt::V2016_09_01::ResourceLinks module Models + OperationDisplay = Azure::Links::Mgmt::V2016_09_01::Models::OperationDisplay Operation = Azure::Links::Mgmt::V2016_09_01::Models::Operation OperationListResult = Azure::Links::Mgmt::V2016_09_01::Models::OperationListResult ResourceLinkResult = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkResult @@ -18,11 +19,10 @@ module Models ResourceLinkFilter = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkFilter ResourceLink = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLink Filter = Azure::Links::Mgmt::V2016_09_01::Models::Filter - OperationDisplay = Azure::Links::Mgmt::V2016_09_01::Models::OperationDisplay end class LinksManagementClass - attr_reader :resource_links, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :resource_links, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -32,8 +32,8 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) - @resource_links = @client_0.resource_links @operations = @client_0.operations + @resource_links = @client_0.resource_links @model_classes = ModelClasses.new end @@ -52,6 +52,9 @@ def method_missing(method, *args) end class ModelClasses + def operation_display + Azure::Links::Mgmt::V2016_09_01::Models::OperationDisplay + end def operation Azure::Links::Mgmt::V2016_09_01::Models::Operation end @@ -73,9 +76,6 @@ def resource_link def filter Azure::Links::Mgmt::V2016_09_01::Models::Filter end - def operation_display - Azure::Links::Mgmt::V2016_09_01::Models::OperationDisplay - end end end end diff --git a/azure_sdk/lib/latest/modules/locks_profile_module.rb b/azure_sdk/lib/latest/modules/locks_profile_module.rb index be6d441742..175a6c7b5d 100644 --- a/azure_sdk/lib/latest/modules/locks_profile_module.rb +++ b/azure_sdk/lib/latest/modules/locks_profile_module.rb @@ -11,13 +11,13 @@ module Mgmt ManagementLocks = Azure::Locks::Mgmt::V2016_09_01::ManagementLocks module Models + OperationDisplay = Azure::Locks::Mgmt::V2016_09_01::Models::OperationDisplay ManagementLockOwner = Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockOwner Operation = Azure::Locks::Mgmt::V2016_09_01::Models::Operation ManagementLockListResult = Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockListResult OperationListResult = Azure::Locks::Mgmt::V2016_09_01::Models::OperationListResult ManagementLockObject = Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockObject LockLevel = Azure::Locks::Mgmt::V2016_09_01::Models::LockLevel - OperationDisplay = Azure::Locks::Mgmt::V2016_09_01::Models::OperationDisplay end class LocksManagementClass @@ -51,6 +51,9 @@ def method_missing(method, *args) end class ModelClasses + def operation_display + Azure::Locks::Mgmt::V2016_09_01::Models::OperationDisplay + end def management_lock_owner Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockOwner end @@ -69,9 +72,6 @@ def management_lock_object def lock_level Azure::Locks::Mgmt::V2016_09_01::Models::LockLevel end - def operation_display - Azure::Locks::Mgmt::V2016_09_01::Models::OperationDisplay - end end end end diff --git a/azure_sdk/lib/latest/modules/logic_profile_module.rb b/azure_sdk/lib/latest/modules/logic_profile_module.rb index c3c587afbc..25ddbad93c 100644 --- a/azure_sdk/lib/latest/modules/logic_profile_module.rb +++ b/azure_sdk/lib/latest/modules/logic_profile_module.rb @@ -74,7 +74,7 @@ module Models CallbackUrl = Azure::Logic::Mgmt::V2016_06_01::Models::CallbackUrl X12AgreementContent = Azure::Logic::Mgmt::V2016_06_01::Models::X12AgreementContent IntegrationAccountSchemaListResult = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountSchemaListResult - ContentHash = Azure::Logic::Mgmt::V2016_06_01::Models::ContentHash + EdifactValidationSettings = Azure::Logic::Mgmt::V2016_06_01::Models::EdifactValidationSettings IntegrationAccountMapPropertiesParametersSchema = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountMapPropertiesParametersSchema EdifactFramingSettings = Azure::Logic::Mgmt::V2016_06_01::Models::EdifactFramingSettings IntegrationAccountMapListResult = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountMapListResult @@ -102,24 +102,24 @@ module Models WorkflowTriggerHistoryFilter = Azure::Logic::Mgmt::V2016_06_01::Models::WorkflowTriggerHistoryFilter WorkflowRunListResult = Azure::Logic::Mgmt::V2016_06_01::Models::WorkflowRunListResult AgreementContent = Azure::Logic::Mgmt::V2016_06_01::Models::AgreementContent + ContentHash = Azure::Logic::Mgmt::V2016_06_01::Models::ContentHash AssemblyCollection = Azure::Logic::Mgmt::V2016_06_01::Models::AssemblyCollection ErrorInfo = Azure::Logic::Mgmt::V2016_06_01::Models::ErrorInfo - GenerateUpgradedDefinitionParameters = Azure::Logic::Mgmt::V2016_06_01::Models::GenerateUpgradedDefinitionParameters EdifactAgreementContent = Azure::Logic::Mgmt::V2016_06_01::Models::EdifactAgreementContent IntegrationAccountAgreementListResult = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountAgreementListResult - GetCallbackUrlParameters = Azure::Logic::Mgmt::V2016_06_01::Models::GetCallbackUrlParameters + GenerateUpgradedDefinitionParameters = Azure::Logic::Mgmt::V2016_06_01::Models::GenerateUpgradedDefinitionParameters IntegrationAccountAgreementFilter = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountAgreementFilter - IntegrationAccountSchemaFilter = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountSchemaFilter + GetCallbackUrlParameters = Azure::Logic::Mgmt::V2016_06_01::Models::GetCallbackUrlParameters KeyVaultKeyReferenceKeyVault = Azure::Logic::Mgmt::V2016_06_01::Models::KeyVaultKeyReferenceKeyVault - IntegrationAccountMapFilter = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountMapFilter + IntegrationAccountSchemaFilter = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountSchemaFilter WorkflowRunActionRepetitionDefinitionCollection = Azure::Logic::Mgmt::V2016_06_01::Models::WorkflowRunActionRepetitionDefinitionCollection - Expression = Azure::Logic::Mgmt::V2016_06_01::Models::Expression + IntegrationAccountMapFilter = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountMapFilter AS2AcknowledgementConnectionSettings = Azure::Logic::Mgmt::V2016_06_01::Models::AS2AcknowledgementConnectionSettings - IntegrationAccountCertificateListResult = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountCertificateListResult + Expression = Azure::Logic::Mgmt::V2016_06_01::Models::Expression AS2EnvelopeSettings = Azure::Logic::Mgmt::V2016_06_01::Models::AS2EnvelopeSettings - IntegrationAccountSessionFilter = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountSessionFilter + IntegrationAccountCertificateListResult = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountCertificateListResult ExpressionTraces = Azure::Logic::Mgmt::V2016_06_01::Models::ExpressionTraces - EdifactValidationSettings = Azure::Logic::Mgmt::V2016_06_01::Models::EdifactValidationSettings + IntegrationAccountSessionFilter = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountSessionFilter IntegrationAccountSessionListResult = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountSessionListResult BatchConfigurationCollection = Azure::Logic::Mgmt::V2016_06_01::Models::BatchConfigurationCollection OperationResultProperties = Azure::Logic::Mgmt::V2016_06_01::Models::OperationResultProperties @@ -388,8 +388,8 @@ def x12_agreement_content def integration_account_schema_list_result Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountSchemaListResult end - def content_hash - Azure::Logic::Mgmt::V2016_06_01::Models::ContentHash + def edifact_validation_settings + Azure::Logic::Mgmt::V2016_06_01::Models::EdifactValidationSettings end def integration_account_map_properties_parameters_schema Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountMapPropertiesParametersSchema @@ -472,59 +472,59 @@ def workflow_run_list_result def agreement_content Azure::Logic::Mgmt::V2016_06_01::Models::AgreementContent end + def content_hash + Azure::Logic::Mgmt::V2016_06_01::Models::ContentHash + end def assembly_collection Azure::Logic::Mgmt::V2016_06_01::Models::AssemblyCollection end def error_info Azure::Logic::Mgmt::V2016_06_01::Models::ErrorInfo end - def generate_upgraded_definition_parameters - Azure::Logic::Mgmt::V2016_06_01::Models::GenerateUpgradedDefinitionParameters - end def edifact_agreement_content Azure::Logic::Mgmt::V2016_06_01::Models::EdifactAgreementContent end def integration_account_agreement_list_result Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountAgreementListResult end - def get_callback_url_parameters - Azure::Logic::Mgmt::V2016_06_01::Models::GetCallbackUrlParameters + def generate_upgraded_definition_parameters + Azure::Logic::Mgmt::V2016_06_01::Models::GenerateUpgradedDefinitionParameters end def integration_account_agreement_filter Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountAgreementFilter end - def integration_account_schema_filter - Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountSchemaFilter + def get_callback_url_parameters + Azure::Logic::Mgmt::V2016_06_01::Models::GetCallbackUrlParameters end def key_vault_key_reference_key_vault Azure::Logic::Mgmt::V2016_06_01::Models::KeyVaultKeyReferenceKeyVault end - def integration_account_map_filter - Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountMapFilter + def integration_account_schema_filter + Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountSchemaFilter end def workflow_run_action_repetition_definition_collection Azure::Logic::Mgmt::V2016_06_01::Models::WorkflowRunActionRepetitionDefinitionCollection end - def expression - Azure::Logic::Mgmt::V2016_06_01::Models::Expression + def integration_account_map_filter + Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountMapFilter end def as2_acknowledgement_connection_settings Azure::Logic::Mgmt::V2016_06_01::Models::AS2AcknowledgementConnectionSettings end - def integration_account_certificate_list_result - Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountCertificateListResult + def expression + Azure::Logic::Mgmt::V2016_06_01::Models::Expression end def as2_envelope_settings Azure::Logic::Mgmt::V2016_06_01::Models::AS2EnvelopeSettings end - def integration_account_session_filter - Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountSessionFilter + def integration_account_certificate_list_result + Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountCertificateListResult end def expression_traces Azure::Logic::Mgmt::V2016_06_01::Models::ExpressionTraces end - def edifact_validation_settings - Azure::Logic::Mgmt::V2016_06_01::Models::EdifactValidationSettings + def integration_account_session_filter + Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountSessionFilter end def integration_account_session_list_result Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountSessionListResult diff --git a/azure_sdk/lib/latest/modules/machinelearning_profile_module.rb b/azure_sdk/lib/latest/modules/machinelearning_profile_module.rb index 56c1c9f092..7705bc8c96 100644 --- a/azure_sdk/lib/latest/modules/machinelearning_profile_module.rb +++ b/azure_sdk/lib/latest/modules/machinelearning_profile_module.rb @@ -11,6 +11,7 @@ module Mgmt WebServices = Azure::MachineLearning::Mgmt::V2017_01_01::WebServices module Models + ColumnType = Azure::MachineLearning::Mgmt::V2017_01_01::Models::ColumnType AsyncOperationStatus = Azure::MachineLearning::Mgmt::V2017_01_01::Models::AsyncOperationStatus OperationEntity = Azure::MachineLearning::Mgmt::V2017_01_01::Models::OperationEntity InputPortType = Azure::MachineLearning::Mgmt::V2017_01_01::Models::InputPortType @@ -50,7 +51,6 @@ module Models WebService = Azure::MachineLearning::Mgmt::V2017_01_01::Models::WebService WebServicePropertiesForGraph = Azure::MachineLearning::Mgmt::V2017_01_01::Models::WebServicePropertiesForGraph DiagnosticsLevel = Azure::MachineLearning::Mgmt::V2017_01_01::Models::DiagnosticsLevel - ColumnType = Azure::MachineLearning::Mgmt::V2017_01_01::Models::ColumnType end class MachineLearningManagementClass @@ -84,6 +84,9 @@ def method_missing(method, *args) end class ModelClasses + def column_type + Azure::MachineLearning::Mgmt::V2017_01_01::Models::ColumnType + end def async_operation_status Azure::MachineLearning::Mgmt::V2017_01_01::Models::AsyncOperationStatus end @@ -201,9 +204,6 @@ def web_service_properties_for_graph def diagnostics_level Azure::MachineLearning::Mgmt::V2017_01_01::Models::DiagnosticsLevel end - def column_type - Azure::MachineLearning::Mgmt::V2017_01_01::Models::ColumnType - end end end end diff --git a/azure_sdk/lib/latest/modules/managedapplications_profile_module.rb b/azure_sdk/lib/latest/modules/managedapplications_profile_module.rb index f064436d24..732279fe8b 100644 --- a/azure_sdk/lib/latest/modules/managedapplications_profile_module.rb +++ b/azure_sdk/lib/latest/modules/managedapplications_profile_module.rb @@ -11,6 +11,7 @@ module Mgmt ApplicationDefinitions = Azure::ManagedApplications::Mgmt::V2018_06_01::ApplicationDefinitions module Models + ApplicationDefinition = Azure::ManagedApplications::Mgmt::V2018_06_01::Models::ApplicationDefinition ApplicationLockLevel = Azure::ManagedApplications::Mgmt::V2018_06_01::Models::ApplicationLockLevel ApplicationArtifactType = Azure::ManagedApplications::Mgmt::V2018_06_01::Models::ApplicationArtifactType GenericResource = Azure::ManagedApplications::Mgmt::V2018_06_01::Models::GenericResource @@ -28,7 +29,6 @@ module Models Identity = Azure::ManagedApplications::Mgmt::V2018_06_01::Models::Identity ApplicationArtifact = Azure::ManagedApplications::Mgmt::V2018_06_01::Models::ApplicationArtifact ApplicationPatchable = Azure::ManagedApplications::Mgmt::V2018_06_01::Models::ApplicationPatchable - ApplicationDefinition = Azure::ManagedApplications::Mgmt::V2018_06_01::Models::ApplicationDefinition end class ManagedApplicationsManagementClass @@ -62,6 +62,9 @@ def method_missing(method, *args) end class ModelClasses + def application_definition + Azure::ManagedApplications::Mgmt::V2018_06_01::Models::ApplicationDefinition + end def application_lock_level Azure::ManagedApplications::Mgmt::V2018_06_01::Models::ApplicationLockLevel end @@ -113,9 +116,6 @@ def application_artifact def application_patchable Azure::ManagedApplications::Mgmt::V2018_06_01::Models::ApplicationPatchable end - def application_definition - Azure::ManagedApplications::Mgmt::V2018_06_01::Models::ApplicationDefinition - end end end end diff --git a/azure_sdk/lib/latest/modules/managedserviceidentity_profile_module.rb b/azure_sdk/lib/latest/modules/managedserviceidentity_profile_module.rb index 3319d8a4c0..42fda4f4e5 100644 --- a/azure_sdk/lib/latest/modules/managedserviceidentity_profile_module.rb +++ b/azure_sdk/lib/latest/modules/managedserviceidentity_profile_module.rb @@ -11,12 +11,12 @@ module Mgmt UserAssignedIdentities = Azure::ManagedServiceIdentity::Mgmt::V2015_08_31_preview::UserAssignedIdentities module Models + OperationDisplay = Azure::ManagedServiceIdentity::Mgmt::V2015_08_31_preview::Models::OperationDisplay UserAssignedIdentities = Azure::ManagedServiceIdentity::Mgmt::V2015_08_31_preview::Models::UserAssignedIdentities Operation = Azure::ManagedServiceIdentity::Mgmt::V2015_08_31_preview::Models::Operation UserAssignedIdentitiesListResult = Azure::ManagedServiceIdentity::Mgmt::V2015_08_31_preview::Models::UserAssignedIdentitiesListResult OperationListResult = Azure::ManagedServiceIdentity::Mgmt::V2015_08_31_preview::Models::OperationListResult Identity = Azure::ManagedServiceIdentity::Mgmt::V2015_08_31_preview::Models::Identity - OperationDisplay = Azure::ManagedServiceIdentity::Mgmt::V2015_08_31_preview::Models::OperationDisplay end class ManagedServiceIdentityManagementClass @@ -50,6 +50,9 @@ def method_missing(method, *args) end class ModelClasses + def operation_display + Azure::ManagedServiceIdentity::Mgmt::V2015_08_31_preview::Models::OperationDisplay + end def user_assigned_identities Azure::ManagedServiceIdentity::Mgmt::V2015_08_31_preview::Models::UserAssignedIdentities end @@ -65,9 +68,6 @@ def operation_list_result def identity Azure::ManagedServiceIdentity::Mgmt::V2015_08_31_preview::Models::Identity end - def operation_display - Azure::ManagedServiceIdentity::Mgmt::V2015_08_31_preview::Models::OperationDisplay - end end end end diff --git a/azure_sdk/lib/latest/modules/marketplaceordering_profile_module.rb b/azure_sdk/lib/latest/modules/marketplaceordering_profile_module.rb index fe077cb068..4981006725 100644 --- a/azure_sdk/lib/latest/modules/marketplaceordering_profile_module.rb +++ b/azure_sdk/lib/latest/modules/marketplaceordering_profile_module.rb @@ -7,21 +7,21 @@ module Azure::Profiles::Latest module MarketplaceOrdering module Mgmt - MarketplaceAgreements = Azure::MarketplaceOrdering::Mgmt::V2015_06_01::MarketplaceAgreements Operations = Azure::MarketplaceOrdering::Mgmt::V2015_06_01::Operations + MarketplaceAgreements = Azure::MarketplaceOrdering::Mgmt::V2015_06_01::MarketplaceAgreements module Models + OperationDisplay = Azure::MarketplaceOrdering::Mgmt::V2015_06_01::Models::OperationDisplay Operation = Azure::MarketplaceOrdering::Mgmt::V2015_06_01::Models::Operation ErrorResponse = Azure::MarketplaceOrdering::Mgmt::V2015_06_01::Models::ErrorResponse OperationListResult = Azure::MarketplaceOrdering::Mgmt::V2015_06_01::Models::OperationListResult Resource = Azure::MarketplaceOrdering::Mgmt::V2015_06_01::Models::Resource ErrorResponseError = Azure::MarketplaceOrdering::Mgmt::V2015_06_01::Models::ErrorResponseError AgreementTerms = Azure::MarketplaceOrdering::Mgmt::V2015_06_01::Models::AgreementTerms - OperationDisplay = Azure::MarketplaceOrdering::Mgmt::V2015_06_01::Models::OperationDisplay end class MarketplaceOrderingManagementClass - attr_reader :marketplace_agreements, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :marketplace_agreements, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -31,8 +31,8 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) - @marketplace_agreements = @client_0.marketplace_agreements @operations = @client_0.operations + @marketplace_agreements = @client_0.marketplace_agreements @model_classes = ModelClasses.new end @@ -51,6 +51,9 @@ def method_missing(method, *args) end class ModelClasses + def operation_display + Azure::MarketplaceOrdering::Mgmt::V2015_06_01::Models::OperationDisplay + end def operation Azure::MarketplaceOrdering::Mgmt::V2015_06_01::Models::Operation end @@ -69,9 +72,6 @@ def error_response_error def agreement_terms Azure::MarketplaceOrdering::Mgmt::V2015_06_01::Models::AgreementTerms end - def operation_display - Azure::MarketplaceOrdering::Mgmt::V2015_06_01::Models::OperationDisplay - end end end end diff --git a/azure_sdk/lib/latest/modules/mediaservices_profile_module.rb b/azure_sdk/lib/latest/modules/mediaservices_profile_module.rb index f60dfef4a6..74da846ef9 100644 --- a/azure_sdk/lib/latest/modules/mediaservices_profile_module.rb +++ b/azure_sdk/lib/latest/modules/mediaservices_profile_module.rb @@ -23,6 +23,7 @@ module Mgmt StreamingEndpoints = Azure::MediaServices::Mgmt::V2018_07_01::StreamingEndpoints module Models + CheckNameAvailabilityInput = Azure::MediaServices::Mgmt::V2018_07_01::Models::CheckNameAvailabilityInput Job = Azure::MediaServices::Mgmt::V2018_07_01::Models::Job OperationDisplay = Azure::MediaServices::Mgmt::V2018_07_01::Models::OperationDisplay Operation = Azure::MediaServices::Mgmt::V2018_07_01::Models::Operation @@ -91,7 +92,7 @@ module Models ContentKeyPolicyRestriction = Azure::MediaServices::Mgmt::V2018_07_01::Models::ContentKeyPolicyRestriction StreamingEndpointAccessControl = Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamingEndpointAccessControl ContentKeyPolicyRestrictionTokenKey = Azure::MediaServices::Mgmt::V2018_07_01::Models::ContentKeyPolicyRestrictionTokenKey - AkamaiAccessControl = Azure::MediaServices::Mgmt::V2018_07_01::Models::AkamaiAccessControl + ListPathsResponse = Azure::MediaServices::Mgmt::V2018_07_01::Models::ListPathsResponse OutputFile = Azure::MediaServices::Mgmt::V2018_07_01::Models::OutputFile JobErrorDetail = Azure::MediaServices::Mgmt::V2018_07_01::Models::JobErrorDetail LiveEventListResult = Azure::MediaServices::Mgmt::V2018_07_01::Models::LiveEventListResult @@ -177,46 +178,45 @@ module Models AssetStorageEncryptionFormat = Azure::MediaServices::Mgmt::V2018_07_01::Models::AssetStorageEncryptionFormat Image = Azure::MediaServices::Mgmt::V2018_07_01::Models::Image ContentKeyPolicyPlayReadyUnknownOutputPassingOption = Azure::MediaServices::Mgmt::V2018_07_01::Models::ContentKeyPolicyPlayReadyUnknownOutputPassingOption - ContentKeyPolicyPlayReadyLicenseType = Azure::MediaServices::Mgmt::V2018_07_01::Models::ContentKeyPolicyPlayReadyLicenseType ContentKeyPolicyFairPlayRentalAndLeaseKeyType = Azure::MediaServices::Mgmt::V2018_07_01::Models::ContentKeyPolicyFairPlayRentalAndLeaseKeyType AacAudioProfile = Azure::MediaServices::Mgmt::V2018_07_01::Models::AacAudioProfile + ContentKeyPolicyRestrictionTokenType = Azure::MediaServices::Mgmt::V2018_07_01::Models::ContentKeyPolicyRestrictionTokenType LiveEvent = Azure::MediaServices::Mgmt::V2018_07_01::Models::LiveEvent DeinterlaceParity = Azure::MediaServices::Mgmt::V2018_07_01::Models::DeinterlaceParity StretchMode = Azure::MediaServices::Mgmt::V2018_07_01::Models::StretchMode Rotation = Azure::MediaServices::Mgmt::V2018_07_01::Models::Rotation - DeinterlaceMode = Azure::MediaServices::Mgmt::V2018_07_01::Models::DeinterlaceMode Format = Azure::MediaServices::Mgmt::V2018_07_01::Models::Format - ContentKeyPolicyRestrictionTokenType = Azure::MediaServices::Mgmt::V2018_07_01::Models::ContentKeyPolicyRestrictionTokenType - EntropyMode = Azure::MediaServices::Mgmt::V2018_07_01::Models::EntropyMode - H264Complexity = Azure::MediaServices::Mgmt::V2018_07_01::Models::H264Complexity + MetricAggregationType = Azure::MediaServices::Mgmt::V2018_07_01::Models::MetricAggregationType H264VideoProfile = Azure::MediaServices::Mgmt::V2018_07_01::Models::H264VideoProfile + DeinterlaceMode = Azure::MediaServices::Mgmt::V2018_07_01::Models::DeinterlaceMode + H264Complexity = Azure::MediaServices::Mgmt::V2018_07_01::Models::H264Complexity + ContentKeyPolicyPlayReadyLicenseType = Azure::MediaServices::Mgmt::V2018_07_01::Models::ContentKeyPolicyPlayReadyLicenseType ContentKeyPolicyPlayReadyContentType = Azure::MediaServices::Mgmt::V2018_07_01::Models::ContentKeyPolicyPlayReadyContentType - MetricAggregationType = Azure::MediaServices::Mgmt::V2018_07_01::Models::MetricAggregationType - EncoderNamedPreset = Azure::MediaServices::Mgmt::V2018_07_01::Models::EncoderNamedPreset - InsightsType = Azure::MediaServices::Mgmt::V2018_07_01::Models::InsightsType OnErrorType = Azure::MediaServices::Mgmt::V2018_07_01::Models::OnErrorType + EncoderNamedPreset = Azure::MediaServices::Mgmt::V2018_07_01::Models::EncoderNamedPreset + AkamaiAccessControl = Azure::MediaServices::Mgmt::V2018_07_01::Models::AkamaiAccessControl + EntropyMode = Azure::MediaServices::Mgmt::V2018_07_01::Models::EntropyMode AkamaiSignatureHeaderAuthenticationKey = Azure::MediaServices::Mgmt::V2018_07_01::Models::AkamaiSignatureHeaderAuthenticationKey - ListPathsResponse = Azure::MediaServices::Mgmt::V2018_07_01::Models::ListPathsResponse - JobErrorCategory = Azure::MediaServices::Mgmt::V2018_07_01::Models::JobErrorCategory + JobErrorCode = Azure::MediaServices::Mgmt::V2018_07_01::Models::JobErrorCode + InsightsType = Azure::MediaServices::Mgmt::V2018_07_01::Models::InsightsType JobRetry = Azure::MediaServices::Mgmt::V2018_07_01::Models::JobRetry Priority = Azure::MediaServices::Mgmt::V2018_07_01::Models::Priority - JobErrorCode = Azure::MediaServices::Mgmt::V2018_07_01::Models::JobErrorCode - StreamingLocatorContentKeyType = Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamingLocatorContentKeyType + TrackPropertyCompareOperation = Azure::MediaServices::Mgmt::V2018_07_01::Models::TrackPropertyCompareOperation + JobErrorCategory = Azure::MediaServices::Mgmt::V2018_07_01::Models::JobErrorCategory StreamingPolicyStreamingProtocol = Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamingPolicyStreamingProtocol TrackPropertyType = Azure::MediaServices::Mgmt::V2018_07_01::Models::TrackPropertyType - TrackPropertyCompareOperation = Azure::MediaServices::Mgmt::V2018_07_01::Models::TrackPropertyCompareOperation - LiveEventInputProtocol = Azure::MediaServices::Mgmt::V2018_07_01::Models::LiveEventInputProtocol + LiveOutputResourceState = Azure::MediaServices::Mgmt::V2018_07_01::Models::LiveOutputResourceState + StreamingLocatorContentKeyType = Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamingLocatorContentKeyType LiveEventEncodingType = Azure::MediaServices::Mgmt::V2018_07_01::Models::LiveEventEncodingType EncryptionScheme = Azure::MediaServices::Mgmt::V2018_07_01::Models::EncryptionScheme - LiveOutputResourceState = Azure::MediaServices::Mgmt::V2018_07_01::Models::LiveOutputResourceState - StreamingEndpointResourceState = Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamingEndpointResourceState - LiveEventResourceState = Azure::MediaServices::Mgmt::V2018_07_01::Models::LiveEventResourceState StreamOptionsFlag = Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamOptionsFlag + LiveEventInputProtocol = Azure::MediaServices::Mgmt::V2018_07_01::Models::LiveEventInputProtocol + LiveEventResourceState = Azure::MediaServices::Mgmt::V2018_07_01::Models::LiveEventResourceState + StreamingEndpointResourceState = Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamingEndpointResourceState Location = Azure::MediaServices::Mgmt::V2018_07_01::Models::Location StorageAccountType = Azure::MediaServices::Mgmt::V2018_07_01::Models::StorageAccountType StorageAccount = Azure::MediaServices::Mgmt::V2018_07_01::Models::StorageAccount JobState = Azure::MediaServices::Mgmt::V2018_07_01::Models::JobState - CheckNameAvailabilityInput = Azure::MediaServices::Mgmt::V2018_07_01::Models::CheckNameAvailabilityInput end class MediaServicesManagementClass @@ -262,6 +262,9 @@ def method_missing(method, *args) end class ModelClasses + def check_name_availability_input + Azure::MediaServices::Mgmt::V2018_07_01::Models::CheckNameAvailabilityInput + end def job Azure::MediaServices::Mgmt::V2018_07_01::Models::Job end @@ -466,8 +469,8 @@ def streaming_endpoint_access_control def content_key_policy_restriction_token_key Azure::MediaServices::Mgmt::V2018_07_01::Models::ContentKeyPolicyRestrictionTokenKey end - def akamai_access_control - Azure::MediaServices::Mgmt::V2018_07_01::Models::AkamaiAccessControl + def list_paths_response + Azure::MediaServices::Mgmt::V2018_07_01::Models::ListPathsResponse end def output_file Azure::MediaServices::Mgmt::V2018_07_01::Models::OutputFile @@ -724,15 +727,15 @@ def image def content_key_policy_play_ready_unknown_output_passing_option Azure::MediaServices::Mgmt::V2018_07_01::Models::ContentKeyPolicyPlayReadyUnknownOutputPassingOption end - def content_key_policy_play_ready_license_type - Azure::MediaServices::Mgmt::V2018_07_01::Models::ContentKeyPolicyPlayReadyLicenseType - end def content_key_policy_fair_play_rental_and_lease_key_type Azure::MediaServices::Mgmt::V2018_07_01::Models::ContentKeyPolicyFairPlayRentalAndLeaseKeyType end def aac_audio_profile Azure::MediaServices::Mgmt::V2018_07_01::Models::AacAudioProfile end + def content_key_policy_restriction_token_type + Azure::MediaServices::Mgmt::V2018_07_01::Models::ContentKeyPolicyRestrictionTokenType + end def live_event Azure::MediaServices::Mgmt::V2018_07_01::Models::LiveEvent end @@ -745,47 +748,47 @@ def stretch_mode def rotation Azure::MediaServices::Mgmt::V2018_07_01::Models::Rotation end - def deinterlace_mode - Azure::MediaServices::Mgmt::V2018_07_01::Models::DeinterlaceMode - end def format Azure::MediaServices::Mgmt::V2018_07_01::Models::Format end - def content_key_policy_restriction_token_type - Azure::MediaServices::Mgmt::V2018_07_01::Models::ContentKeyPolicyRestrictionTokenType + def metric_aggregation_type + Azure::MediaServices::Mgmt::V2018_07_01::Models::MetricAggregationType end - def entropy_mode - Azure::MediaServices::Mgmt::V2018_07_01::Models::EntropyMode + def h264_video_profile + Azure::MediaServices::Mgmt::V2018_07_01::Models::H264VideoProfile + end + def deinterlace_mode + Azure::MediaServices::Mgmt::V2018_07_01::Models::DeinterlaceMode end def h264_complexity Azure::MediaServices::Mgmt::V2018_07_01::Models::H264Complexity end - def h264_video_profile - Azure::MediaServices::Mgmt::V2018_07_01::Models::H264VideoProfile + def content_key_policy_play_ready_license_type + Azure::MediaServices::Mgmt::V2018_07_01::Models::ContentKeyPolicyPlayReadyLicenseType end def content_key_policy_play_ready_content_type Azure::MediaServices::Mgmt::V2018_07_01::Models::ContentKeyPolicyPlayReadyContentType end - def metric_aggregation_type - Azure::MediaServices::Mgmt::V2018_07_01::Models::MetricAggregationType + def on_error_type + Azure::MediaServices::Mgmt::V2018_07_01::Models::OnErrorType end def encoder_named_preset Azure::MediaServices::Mgmt::V2018_07_01::Models::EncoderNamedPreset end - def insights_type - Azure::MediaServices::Mgmt::V2018_07_01::Models::InsightsType + def akamai_access_control + Azure::MediaServices::Mgmt::V2018_07_01::Models::AkamaiAccessControl end - def on_error_type - Azure::MediaServices::Mgmt::V2018_07_01::Models::OnErrorType + def entropy_mode + Azure::MediaServices::Mgmt::V2018_07_01::Models::EntropyMode end def akamai_signature_header_authentication_key Azure::MediaServices::Mgmt::V2018_07_01::Models::AkamaiSignatureHeaderAuthenticationKey end - def list_paths_response - Azure::MediaServices::Mgmt::V2018_07_01::Models::ListPathsResponse + def job_error_code + Azure::MediaServices::Mgmt::V2018_07_01::Models::JobErrorCode end - def job_error_category - Azure::MediaServices::Mgmt::V2018_07_01::Models::JobErrorCategory + def insights_type + Azure::MediaServices::Mgmt::V2018_07_01::Models::InsightsType end def job_retry Azure::MediaServices::Mgmt::V2018_07_01::Models::JobRetry @@ -793,11 +796,11 @@ def job_retry def priority Azure::MediaServices::Mgmt::V2018_07_01::Models::Priority end - def job_error_code - Azure::MediaServices::Mgmt::V2018_07_01::Models::JobErrorCode + def track_property_compare_operation + Azure::MediaServices::Mgmt::V2018_07_01::Models::TrackPropertyCompareOperation end - def streaming_locator_content_key_type - Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamingLocatorContentKeyType + def job_error_category + Azure::MediaServices::Mgmt::V2018_07_01::Models::JobErrorCategory end def streaming_policy_streaming_protocol Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamingPolicyStreamingProtocol @@ -805,11 +808,11 @@ def streaming_policy_streaming_protocol def track_property_type Azure::MediaServices::Mgmt::V2018_07_01::Models::TrackPropertyType end - def track_property_compare_operation - Azure::MediaServices::Mgmt::V2018_07_01::Models::TrackPropertyCompareOperation + def live_output_resource_state + Azure::MediaServices::Mgmt::V2018_07_01::Models::LiveOutputResourceState end - def live_event_input_protocol - Azure::MediaServices::Mgmt::V2018_07_01::Models::LiveEventInputProtocol + def streaming_locator_content_key_type + Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamingLocatorContentKeyType end def live_event_encoding_type Azure::MediaServices::Mgmt::V2018_07_01::Models::LiveEventEncodingType @@ -817,17 +820,17 @@ def live_event_encoding_type def encryption_scheme Azure::MediaServices::Mgmt::V2018_07_01::Models::EncryptionScheme end - def live_output_resource_state - Azure::MediaServices::Mgmt::V2018_07_01::Models::LiveOutputResourceState + def stream_options_flag + Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamOptionsFlag end - def streaming_endpoint_resource_state - Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamingEndpointResourceState + def live_event_input_protocol + Azure::MediaServices::Mgmt::V2018_07_01::Models::LiveEventInputProtocol end def live_event_resource_state Azure::MediaServices::Mgmt::V2018_07_01::Models::LiveEventResourceState end - def stream_options_flag - Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamOptionsFlag + def streaming_endpoint_resource_state + Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamingEndpointResourceState end def location Azure::MediaServices::Mgmt::V2018_07_01::Models::Location @@ -841,9 +844,6 @@ def storage_account def job_state Azure::MediaServices::Mgmt::V2018_07_01::Models::JobState end - def check_name_availability_input - Azure::MediaServices::Mgmt::V2018_07_01::Models::CheckNameAvailabilityInput - end end end end diff --git a/azure_sdk/lib/latest/modules/monitor_profile_module.rb b/azure_sdk/lib/latest/modules/monitor_profile_module.rb index 89efeee24e..fbc759c0c6 100644 --- a/azure_sdk/lib/latest/modules/monitor_profile_module.rb +++ b/azure_sdk/lib/latest/modules/monitor_profile_module.rb @@ -7,11 +7,11 @@ module Azure::Profiles::Latest module Monitor module Mgmt + Operations = Azure::Monitor::Mgmt::V2015_04_01::Operations ActivityLogs = Azure::Monitor::Mgmt::V2015_04_01::ActivityLogs AutoscaleSettings = Azure::Monitor::Mgmt::V2015_04_01::AutoscaleSettings EventCategories = Azure::Monitor::Mgmt::V2015_04_01::EventCategories TenantActivityLogs = Azure::Monitor::Mgmt::V2015_04_01::TenantActivityLogs - Operations = Azure::Monitor::Mgmt::V2015_04_01::Operations AlertRules = Azure::Monitor::Mgmt::V2016_03_01::AlertRules AlertRuleIncidents = Azure::Monitor::Mgmt::V2016_03_01::AlertRuleIncidents LogProfiles = Azure::Monitor::Mgmt::V2016_03_01::LogProfiles @@ -21,12 +21,13 @@ module Mgmt MetricBaseline = Azure::Monitor::Mgmt::V2017_11_01_preview::MetricBaseline MetricDefinitions = Azure::Monitor::Mgmt::V2018_01_01::MetricDefinitions Metrics = Azure::Monitor::Mgmt::V2018_01_01::Metrics + MetricAlertsStatus = Azure::Monitor::Mgmt::V2018_03_01::MetricAlertsStatus ActionGroups = Azure::Monitor::Mgmt::V2018_03_01::ActionGroups MetricAlerts = Azure::Monitor::Mgmt::V2018_03_01::MetricAlerts - MetricAlertsStatus = Azure::Monitor::Mgmt::V2018_03_01::MetricAlertsStatus ScheduledQueryRules = Azure::Monitor::Mgmt::V2018_04_16::ScheduledQueryRules module Models + ScaleCapacity = Azure::Monitor::Mgmt::V2015_04_01::Models::ScaleCapacity AutoscaleNotification = Azure::Monitor::Mgmt::V2015_04_01::Models::AutoscaleNotification ScaleAction = Azure::Monitor::Mgmt::V2015_04_01::Models::ScaleAction ScaleRule = Azure::Monitor::Mgmt::V2015_04_01::Models::ScaleRule @@ -54,7 +55,6 @@ module Models EventData = Azure::Monitor::Mgmt::V2015_04_01::Models::EventData EmailNotification = Azure::Monitor::Mgmt::V2015_04_01::Models::EmailNotification WebhookNotification = Azure::Monitor::Mgmt::V2015_04_01::Models::WebhookNotification - ScaleCapacity = Azure::Monitor::Mgmt::V2015_04_01::Models::ScaleCapacity RuleCondition = Azure::Monitor::Mgmt::V2016_03_01::Models::RuleCondition AlertRuleResourcePatch = Azure::Monitor::Mgmt::V2016_03_01::Models::AlertRuleResourcePatch RuleManagementEventClaimsDataSource = Azure::Monitor::Mgmt::V2016_03_01::Models::RuleManagementEventClaimsDataSource @@ -87,10 +87,10 @@ module Models CategoryType = Azure::Monitor::Mgmt::V2017_05_01_preview::Models::CategoryType RetentionPolicy = Azure::Monitor::Mgmt::V2017_05_01_preview::Models::RetentionPolicy ProxyOnlyResource = Azure::Monitor::Mgmt::V2017_05_01_preview::Models::ProxyOnlyResource - LogSettings = Azure::Monitor::Mgmt::V2017_05_01_preview::Models::LogSettings - DiagnosticSettingsCategoryResourceCollection = Azure::Monitor::Mgmt::V2017_05_01_preview::Models::DiagnosticSettingsCategoryResourceCollection MetricSettings = Azure::Monitor::Mgmt::V2017_05_01_preview::Models::MetricSettings + LogSettings = Azure::Monitor::Mgmt::V2017_05_01_preview::Models::LogSettings DiagnosticSettingsResourceCollection = Azure::Monitor::Mgmt::V2017_05_01_preview::Models::DiagnosticSettingsResourceCollection + DiagnosticSettingsCategoryResourceCollection = Azure::Monitor::Mgmt::V2017_05_01_preview::Models::DiagnosticSettingsCategoryResourceCollection DiagnosticSettingsCategoryResource = Azure::Monitor::Mgmt::V2017_05_01_preview::Models::DiagnosticSettingsCategoryResource DiagnosticSettingsResource = Azure::Monitor::Mgmt::V2017_05_01_preview::Models::DiagnosticSettingsResource Baseline = Azure::Monitor::Mgmt::V2017_11_01_preview::Models::Baseline @@ -136,6 +136,7 @@ module Models ReceiverStatus = Azure::Monitor::Mgmt::V2018_03_01::Models::ReceiverStatus ActionGroupList = Azure::Monitor::Mgmt::V2018_03_01::Models::ActionGroupList ActionGroupResource = Azure::Monitor::Mgmt::V2018_03_01::Models::ActionGroupResource + Schedule = Azure::Monitor::Mgmt::V2018_04_16::Models::Schedule Action = Azure::Monitor::Mgmt::V2018_04_16::Models::Action Resource = Azure::Monitor::Mgmt::V2018_04_16::Models::Resource ProvisioningState = Azure::Monitor::Mgmt::V2018_04_16::Models::ProvisioningState @@ -152,12 +153,11 @@ module Models ConditionalOperator = Azure::Monitor::Mgmt::V2018_04_16::Models::ConditionalOperator MetricTriggerType = Azure::Monitor::Mgmt::V2018_04_16::Models::MetricTriggerType AlertSeverity = Azure::Monitor::Mgmt::V2018_04_16::Models::AlertSeverity - Schedule = Azure::Monitor::Mgmt::V2018_04_16::Models::Schedule Source = Azure::Monitor::Mgmt::V2018_04_16::Models::Source end class MonitorManagementClass - attr_reader :activity_logs, :autoscale_settings, :event_categories, :tenant_activity_logs, :operations, :alert_rules, :alert_rule_incidents, :log_profiles, :activity_log_alerts, :diagnostic_settings_operations, :diagnostic_settings_category_operations, :metric_baseline, :metric_definitions, :metrics, :action_groups, :metric_alerts, :metric_alerts_status, :scheduled_query_rules, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :activity_logs, :autoscale_settings, :event_categories, :tenant_activity_logs, :alert_rules, :alert_rule_incidents, :log_profiles, :activity_log_alerts, :diagnostic_settings_operations, :diagnostic_settings_category_operations, :metric_baseline, :metric_definitions, :metrics, :metric_alerts_status, :action_groups, :metric_alerts, :scheduled_query_rules, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -167,11 +167,11 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) + @operations = @client_0.operations @activity_logs = @client_0.activity_logs @autoscale_settings = @client_0.autoscale_settings @event_categories = @client_0.event_categories @tenant_activity_logs = @client_0.tenant_activity_logs - @operations = @client_0.operations @client_1 = Azure::Monitor::Mgmt::V2016_03_01::MonitorManagementClient.new(configurable.credentials, base_url, options) if(@client_1.respond_to?(:subscription_id)) @@ -217,9 +217,9 @@ def initialize(configurable, base_url=nil, options=nil) @client_6.subscription_id = configurable.subscription_id end add_telemetry(@client_6) + @metric_alerts_status = @client_6.metric_alerts_status @action_groups = @client_6.action_groups @metric_alerts = @client_6.metric_alerts - @metric_alerts_status = @client_6.metric_alerts_status @client_7 = Azure::Monitor::Mgmt::V2018_04_16::MonitorClient.new(configurable.credentials, base_url, options) if(@client_7.respond_to?(:subscription_id)) @@ -259,6 +259,9 @@ def method_missing(method, *args) end class ModelClasses + def scale_capacity + Azure::Monitor::Mgmt::V2015_04_01::Models::ScaleCapacity + end def autoscale_notification Azure::Monitor::Mgmt::V2015_04_01::Models::AutoscaleNotification end @@ -340,9 +343,6 @@ def email_notification def webhook_notification Azure::Monitor::Mgmt::V2015_04_01::Models::WebhookNotification end - def scale_capacity - Azure::Monitor::Mgmt::V2015_04_01::Models::ScaleCapacity - end def rule_condition Azure::Monitor::Mgmt::V2016_03_01::Models::RuleCondition end @@ -439,18 +439,18 @@ def retention_policy def proxy_only_resource Azure::Monitor::Mgmt::V2017_05_01_preview::Models::ProxyOnlyResource end - def log_settings - Azure::Monitor::Mgmt::V2017_05_01_preview::Models::LogSettings - end - def diagnostic_settings_category_resource_collection - Azure::Monitor::Mgmt::V2017_05_01_preview::Models::DiagnosticSettingsCategoryResourceCollection - end def metric_settings Azure::Monitor::Mgmt::V2017_05_01_preview::Models::MetricSettings end + def log_settings + Azure::Monitor::Mgmt::V2017_05_01_preview::Models::LogSettings + end def diagnostic_settings_resource_collection Azure::Monitor::Mgmt::V2017_05_01_preview::Models::DiagnosticSettingsResourceCollection end + def diagnostic_settings_category_resource_collection + Azure::Monitor::Mgmt::V2017_05_01_preview::Models::DiagnosticSettingsCategoryResourceCollection + end def diagnostic_settings_category_resource Azure::Monitor::Mgmt::V2017_05_01_preview::Models::DiagnosticSettingsCategoryResource end @@ -586,6 +586,9 @@ def action_group_list def action_group_resource Azure::Monitor::Mgmt::V2018_03_01::Models::ActionGroupResource end + def schedule + Azure::Monitor::Mgmt::V2018_04_16::Models::Schedule + end def action Azure::Monitor::Mgmt::V2018_04_16::Models::Action end @@ -634,9 +637,6 @@ def metric_trigger_type def alert_severity Azure::Monitor::Mgmt::V2018_04_16::Models::AlertSeverity end - def schedule - Azure::Monitor::Mgmt::V2018_04_16::Models::Schedule - end def source Azure::Monitor::Mgmt::V2018_04_16::Models::Source end diff --git a/azure_sdk/lib/latest/modules/network_profile_module.rb b/azure_sdk/lib/latest/modules/network_profile_module.rb index d2163cef43..f133bae7dc 100644 --- a/azure_sdk/lib/latest/modules/network_profile_module.rb +++ b/azure_sdk/lib/latest/modules/network_profile_module.rb @@ -245,13 +245,13 @@ module Models GatewayRouteListResult = Azure::Network::Mgmt::V2018_08_01::Models::GatewayRouteListResult LoadBalancerProbeListResult = Azure::Network::Mgmt::V2018_08_01::Models::LoadBalancerProbeListResult BgpPeerStatusListResult = Azure::Network::Mgmt::V2018_08_01::Models::BgpPeerStatusListResult - VirtualNetworkGatewayListResult = Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGatewayListResult + Error = Azure::Network::Mgmt::V2018_08_01::Models::Error ErrorDetails = Azure::Network::Mgmt::V2018_08_01::Models::ErrorDetails ApplicationGatewayBackendHealthHttpSettings = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayBackendHealthHttpSettings ApplicationGatewayBackendHealth = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayBackendHealth AzureAsyncOperationResult = Azure::Network::Mgmt::V2018_08_01::Models::AzureAsyncOperationResult - Error = Azure::Network::Mgmt::V2018_08_01::Models::Error - GatewayRoute = Azure::Network::Mgmt::V2018_08_01::Models::GatewayRoute + ApplicationGatewaySslPolicy = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewaySslPolicy + VirtualNetworkGatewayListResult = Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGatewayListResult NetworkInterfaceLoadBalancerListResult = Azure::Network::Mgmt::V2018_08_01::Models::NetworkInterfaceLoadBalancerListResult BgpSettings = Azure::Network::Mgmt::V2018_08_01::Models::BgpSettings EffectiveNetworkSecurityGroupAssociation = Azure::Network::Mgmt::V2018_08_01::Models::EffectiveNetworkSecurityGroupAssociation @@ -380,67 +380,67 @@ module Models ApplicationGatewayAuthenticationCertificate = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayAuthenticationCertificate Resource = Azure::Network::Mgmt::V2018_08_01::Models::Resource ApplicationGatewaySslCertificate = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewaySslCertificate - ApplicationGatewayFrontendIPConfiguration = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayFrontendIPConfiguration ApplicationGatewayFrontendPort = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayFrontendPort + ApplicationGatewayHttpListener = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayHttpListener ApplicationGatewayPathRule = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayPathRule ApplicationGatewayProbe = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayProbe - ApplicationGatewayHttpListener = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayHttpListener ApplicationGatewayRequestRoutingRule = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayRequestRoutingRule - ApplicationGatewaySslPolicy = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewaySslPolicy + ApplicationGatewayFrontendIPConfiguration = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayFrontendIPConfiguration + ApplicationGatewayUrlPathMap = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayUrlPathMap ApplicationGatewayFirewallRuleGroup = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayFirewallRuleGroup ApplicationGatewayFirewallRuleSet = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayFirewallRuleSet - ApplicationGatewayUrlPathMap = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayUrlPathMap - RouteFilterRuleListResult = Azure::Network::Mgmt::V2018_08_01::Models::RouteFilterRuleListResult - ApplicationGatewayRedirectConfiguration = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayRedirectConfiguration ApplicationGatewayAvailableSslOptions = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayAvailableSslOptions + RouteFilterRuleListResult = Azure::Network::Mgmt::V2018_08_01::Models::RouteFilterRuleListResult + EndpointServiceResult = Azure::Network::Mgmt::V2018_08_01::Models::EndpointServiceResult + ExpressRouteCircuitAuthorization = Azure::Network::Mgmt::V2018_08_01::Models::ExpressRouteCircuitAuthorization RouteFilterRule = Azure::Network::Mgmt::V2018_08_01::Models::RouteFilterRule ExpressRouteCircuitPeering = Azure::Network::Mgmt::V2018_08_01::Models::ExpressRouteCircuitPeering - Availability = Azure::Network::Mgmt::V2018_08_01::Models::Availability + ApplicationGatewayRedirectConfiguration = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayRedirectConfiguration ApplicationGatewaySslPredefinedPolicy = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewaySslPredefinedPolicy - EndpointServiceResult = Azure::Network::Mgmt::V2018_08_01::Models::EndpointServiceResult + ApplicationGateway = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGateway FrontendIPConfiguration = Azure::Network::Mgmt::V2018_08_01::Models::FrontendIPConfiguration LoadBalancingRule = Azure::Network::Mgmt::V2018_08_01::Models::LoadBalancingRule Probe = Azure::Network::Mgmt::V2018_08_01::Models::Probe RouteFilter = Azure::Network::Mgmt::V2018_08_01::Models::RouteFilter - ApplicationGateway = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGateway + Availability = Azure::Network::Mgmt::V2018_08_01::Models::Availability ExpressRouteServiceProvider = Azure::Network::Mgmt::V2018_08_01::Models::ExpressRouteServiceProvider - InboundNatPool = Azure::Network::Mgmt::V2018_08_01::Models::InboundNatPool + GatewayRoute = Azure::Network::Mgmt::V2018_08_01::Models::GatewayRoute NetworkWatcher = Azure::Network::Mgmt::V2018_08_01::Models::NetworkWatcher ExpressRouteCircuit = Azure::Network::Mgmt::V2018_08_01::Models::ExpressRouteCircuit - ExpressRouteCircuitAuthorization = Azure::Network::Mgmt::V2018_08_01::Models::ExpressRouteCircuitAuthorization BgpServiceCommunity = Azure::Network::Mgmt::V2018_08_01::Models::BgpServiceCommunity + PatchRouteFilterRule = Azure::Network::Mgmt::V2018_08_01::Models::PatchRouteFilterRule LoadBalancer = Azure::Network::Mgmt::V2018_08_01::Models::LoadBalancer VirtualNetworkGatewayIPConfiguration = Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGatewayIPConfiguration NetworkProfile = Azure::Network::Mgmt::V2018_08_01::Models::NetworkProfile VpnClientRevokedCertificate = Azure::Network::Mgmt::V2018_08_01::Models::VpnClientRevokedCertificate VirtualNetworkGateway = Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGateway LocalNetworkGateway = Azure::Network::Mgmt::V2018_08_01::Models::LocalNetworkGateway - PatchRouteFilterRule = Azure::Network::Mgmt::V2018_08_01::Models::PatchRouteFilterRule - VirtualNetworkGatewayConnection = Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGatewayConnection + VirtualNetwork = Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetwork + InboundNatPool = Azure::Network::Mgmt::V2018_08_01::Models::InboundNatPool VirtualNetworkGatewayConnectionListEntity = Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGatewayConnectionListEntity VirtualNetworkPeering = Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkPeering ApplicationGatewayBackendHealthServerHealth = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayBackendHealthServerHealth ApplicationGatewayProtocol = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayProtocol - PatchRouteFilter = Azure::Network::Mgmt::V2018_08_01::Models::PatchRouteFilter + VirtualNetworkGatewayConnection = Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGatewayConnection ApplicationGatewayTier = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayTier ApplicationGatewaySkuName = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewaySkuName - VirtualNetwork = Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetwork ApplicationGatewaySslPolicyName = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewaySslPolicyName + ApplicationGatewaySslCipherSuite = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewaySslCipherSuite VpnClientRootCertificate = Azure::Network::Mgmt::V2018_08_01::Models::VpnClientRootCertificate - ApplicationGatewayRequestRoutingRuleType = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayRequestRoutingRuleType + PatchRouteFilter = Azure::Network::Mgmt::V2018_08_01::Models::PatchRouteFilter ApplicationGatewayCookieBasedAffinity = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayCookieBasedAffinity IPVersion = Azure::Network::Mgmt::V2018_08_01::Models::IPVersion ApplicationGatewayRedirectType = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayRedirectType - ApplicationGatewaySslCipherSuite = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewaySslCipherSuite + ApplicationGatewayOperationalState = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayOperationalState ApplicationGatewaySslProtocol = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewaySslProtocol ApplicationGatewaySslPolicyType = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewaySslPolicyType - ApplicationGatewayOperationalState = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayOperationalState - ApplicationGatewayFirewallMode = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayFirewallMode - AuthorizationUseStatus = Azure::Network::Mgmt::V2018_08_01::Models::AuthorizationUseStatus ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = Azure::Network::Mgmt::V2018_08_01::Models::ExpressRouteCircuitPeeringAdvertisedPublicPrefixState + ApplicationGatewayFirewallMode = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayFirewallMode + ApplicationGatewayRequestRoutingRuleType = Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayRequestRoutingRuleType + ExpressRouteCircuitPeeringState = Azure::Network::Mgmt::V2018_08_01::Models::ExpressRouteCircuitPeeringState Access = Azure::Network::Mgmt::V2018_08_01::Models::Access ExpressRouteCircuitSkuFamily = Azure::Network::Mgmt::V2018_08_01::Models::ExpressRouteCircuitSkuFamily - ExpressRouteCircuitPeeringState = Azure::Network::Mgmt::V2018_08_01::Models::ExpressRouteCircuitPeeringState + AuthorizationUseStatus = Azure::Network::Mgmt::V2018_08_01::Models::AuthorizationUseStatus ExpressRouteCircuitSkuTier = Azure::Network::Mgmt::V2018_08_01::Models::ExpressRouteCircuitSkuTier LoadDistribution = Azure::Network::Mgmt::V2018_08_01::Models::LoadDistribution ServiceProviderProvisioningState = Azure::Network::Mgmt::V2018_08_01::Models::ServiceProviderProvisioningState @@ -460,26 +460,26 @@ module Models ConnectionStatus = Azure::Network::Mgmt::V2018_08_01::Models::ConnectionStatus Origin = Azure::Network::Mgmt::V2018_08_01::Models::Origin IssueType = Azure::Network::Mgmt::V2018_08_01::Models::IssueType - VirtualNetworkPeeringState = Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkPeeringState Protocol = Azure::Network::Mgmt::V2018_08_01::Models::Protocol + ConnectionState = Azure::Network::Mgmt::V2018_08_01::Models::ConnectionState EvaluationState = Azure::Network::Mgmt::V2018_08_01::Models::EvaluationState - VirtualNetworkGatewaySkuName = Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGatewaySkuName + VirtualNetworkPeeringState = Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkPeeringState VirtualNetworkGatewayType = Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGatewayType - ConnectionState = Azure::Network::Mgmt::V2018_08_01::Models::ConnectionState - BgpPeerState = Azure::Network::Mgmt::V2018_08_01::Models::BgpPeerState + VpnType = Azure::Network::Mgmt::V2018_08_01::Models::VpnType + VirtualNetworkGatewaySkuName = Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGatewaySkuName VirtualNetworkGatewaySkuTier = Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGatewaySkuTier VpnClientProtocol = Azure::Network::Mgmt::V2018_08_01::Models::VpnClientProtocol - VpnType = Azure::Network::Mgmt::V2018_08_01::Models::VpnType - IpsecIntegrity = Azure::Network::Mgmt::V2018_08_01::Models::IpsecIntegrity IpsecEncryption = Azure::Network::Mgmt::V2018_08_01::Models::IpsecEncryption - IkeIntegrity = Azure::Network::Mgmt::V2018_08_01::Models::IkeIntegrity + IpsecIntegrity = Azure::Network::Mgmt::V2018_08_01::Models::IpsecIntegrity IkeEncryption = Azure::Network::Mgmt::V2018_08_01::Models::IkeEncryption - PfsGroup = Azure::Network::Mgmt::V2018_08_01::Models::PfsGroup + IkeIntegrity = Azure::Network::Mgmt::V2018_08_01::Models::IkeIntegrity DhGroup = Azure::Network::Mgmt::V2018_08_01::Models::DhGroup + PfsGroup = Azure::Network::Mgmt::V2018_08_01::Models::PfsGroup + AuthenticationMethod = Azure::Network::Mgmt::V2018_08_01::Models::AuthenticationMethod VirtualNetworkGatewayConnectionStatus = Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGatewayConnectionStatus VirtualNetworkGatewayConnectionType = Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGatewayConnectionType + BgpPeerState = Azure::Network::Mgmt::V2018_08_01::Models::BgpPeerState ProcessorArchitecture = Azure::Network::Mgmt::V2018_08_01::Models::ProcessorArchitecture - AuthenticationMethod = Azure::Network::Mgmt::V2018_08_01::Models::AuthenticationMethod Container = Azure::Network::Mgmt::V2018_08_01::Models::Container end @@ -1094,8 +1094,8 @@ def load_balancer_probe_list_result def bgp_peer_status_list_result Azure::Network::Mgmt::V2018_08_01::Models::BgpPeerStatusListResult end - def virtual_network_gateway_list_result - Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGatewayListResult + def error + Azure::Network::Mgmt::V2018_08_01::Models::Error end def error_details Azure::Network::Mgmt::V2018_08_01::Models::ErrorDetails @@ -1109,11 +1109,11 @@ def application_gateway_backend_health def azure_async_operation_result Azure::Network::Mgmt::V2018_08_01::Models::AzureAsyncOperationResult end - def error - Azure::Network::Mgmt::V2018_08_01::Models::Error + def application_gateway_ssl_policy + Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewaySslPolicy end - def gateway_route - Azure::Network::Mgmt::V2018_08_01::Models::GatewayRoute + def virtual_network_gateway_list_result + Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGatewayListResult end def network_interface_load_balancer_list_result Azure::Network::Mgmt::V2018_08_01::Models::NetworkInterfaceLoadBalancerListResult @@ -1499,26 +1499,26 @@ def resource def application_gateway_ssl_certificate Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewaySslCertificate end - def application_gateway_frontend_ipconfiguration - Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayFrontendIPConfiguration - end def application_gateway_frontend_port Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayFrontendPort end + def application_gateway_http_listener + Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayHttpListener + end def application_gateway_path_rule Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayPathRule end def application_gateway_probe Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayProbe end - def application_gateway_http_listener - Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayHttpListener - end def application_gateway_request_routing_rule Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayRequestRoutingRule end - def application_gateway_ssl_policy - Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewaySslPolicy + def application_gateway_frontend_ipconfiguration + Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayFrontendIPConfiguration + end + def application_gateway_url_path_map + Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayUrlPathMap end def application_gateway_firewall_rule_group Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayFirewallRuleGroup @@ -1526,17 +1526,17 @@ def application_gateway_firewall_rule_group def application_gateway_firewall_rule_set Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayFirewallRuleSet end - def application_gateway_url_path_map - Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayUrlPathMap + def application_gateway_available_ssl_options + Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayAvailableSslOptions end def route_filter_rule_list_result Azure::Network::Mgmt::V2018_08_01::Models::RouteFilterRuleListResult end - def application_gateway_redirect_configuration - Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayRedirectConfiguration + def endpoint_service_result + Azure::Network::Mgmt::V2018_08_01::Models::EndpointServiceResult end - def application_gateway_available_ssl_options - Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayAvailableSslOptions + def express_route_circuit_authorization + Azure::Network::Mgmt::V2018_08_01::Models::ExpressRouteCircuitAuthorization end def route_filter_rule Azure::Network::Mgmt::V2018_08_01::Models::RouteFilterRule @@ -1544,14 +1544,14 @@ def route_filter_rule def express_route_circuit_peering Azure::Network::Mgmt::V2018_08_01::Models::ExpressRouteCircuitPeering end - def availability - Azure::Network::Mgmt::V2018_08_01::Models::Availability + def application_gateway_redirect_configuration + Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayRedirectConfiguration end def application_gateway_ssl_predefined_policy Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewaySslPredefinedPolicy end - def endpoint_service_result - Azure::Network::Mgmt::V2018_08_01::Models::EndpointServiceResult + def application_gateway + Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGateway end def frontend_ipconfiguration Azure::Network::Mgmt::V2018_08_01::Models::FrontendIPConfiguration @@ -1565,14 +1565,14 @@ def probe def route_filter Azure::Network::Mgmt::V2018_08_01::Models::RouteFilter end - def application_gateway - Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGateway + def availability + Azure::Network::Mgmt::V2018_08_01::Models::Availability end def express_route_service_provider Azure::Network::Mgmt::V2018_08_01::Models::ExpressRouteServiceProvider end - def inbound_nat_pool - Azure::Network::Mgmt::V2018_08_01::Models::InboundNatPool + def gateway_route + Azure::Network::Mgmt::V2018_08_01::Models::GatewayRoute end def network_watcher Azure::Network::Mgmt::V2018_08_01::Models::NetworkWatcher @@ -1580,12 +1580,12 @@ def network_watcher def express_route_circuit Azure::Network::Mgmt::V2018_08_01::Models::ExpressRouteCircuit end - def express_route_circuit_authorization - Azure::Network::Mgmt::V2018_08_01::Models::ExpressRouteCircuitAuthorization - end def bgp_service_community Azure::Network::Mgmt::V2018_08_01::Models::BgpServiceCommunity end + def patch_route_filter_rule + Azure::Network::Mgmt::V2018_08_01::Models::PatchRouteFilterRule + end def load_balancer Azure::Network::Mgmt::V2018_08_01::Models::LoadBalancer end @@ -1604,11 +1604,11 @@ def virtual_network_gateway def local_network_gateway Azure::Network::Mgmt::V2018_08_01::Models::LocalNetworkGateway end - def patch_route_filter_rule - Azure::Network::Mgmt::V2018_08_01::Models::PatchRouteFilterRule + def virtual_network + Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetwork end - def virtual_network_gateway_connection - Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGatewayConnection + def inbound_nat_pool + Azure::Network::Mgmt::V2018_08_01::Models::InboundNatPool end def virtual_network_gateway_connection_list_entity Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGatewayConnectionListEntity @@ -1622,8 +1622,8 @@ def application_gateway_backend_health_server_health def application_gateway_protocol Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayProtocol end - def patch_route_filter - Azure::Network::Mgmt::V2018_08_01::Models::PatchRouteFilter + def virtual_network_gateway_connection + Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGatewayConnection end def application_gateway_tier Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayTier @@ -1631,17 +1631,17 @@ def application_gateway_tier def application_gateway_sku_name Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewaySkuName end - def virtual_network - Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetwork - end def application_gateway_ssl_policy_name Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewaySslPolicyName end + def application_gateway_ssl_cipher_suite + Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewaySslCipherSuite + end def vpn_client_root_certificate Azure::Network::Mgmt::V2018_08_01::Models::VpnClientRootCertificate end - def application_gateway_request_routing_rule_type - Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayRequestRoutingRuleType + def patch_route_filter + Azure::Network::Mgmt::V2018_08_01::Models::PatchRouteFilter end def application_gateway_cookie_based_affinity Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayCookieBasedAffinity @@ -1652,8 +1652,8 @@ def ipversion def application_gateway_redirect_type Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayRedirectType end - def application_gateway_ssl_cipher_suite - Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewaySslCipherSuite + def application_gateway_operational_state + Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayOperationalState end def application_gateway_ssl_protocol Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewaySslProtocol @@ -1661,17 +1661,17 @@ def application_gateway_ssl_protocol def application_gateway_ssl_policy_type Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewaySslPolicyType end - def application_gateway_operational_state - Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayOperationalState + def express_route_circuit_peering_advertised_public_prefix_state + Azure::Network::Mgmt::V2018_08_01::Models::ExpressRouteCircuitPeeringAdvertisedPublicPrefixState end def application_gateway_firewall_mode Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayFirewallMode end - def authorization_use_status - Azure::Network::Mgmt::V2018_08_01::Models::AuthorizationUseStatus + def application_gateway_request_routing_rule_type + Azure::Network::Mgmt::V2018_08_01::Models::ApplicationGatewayRequestRoutingRuleType end - def express_route_circuit_peering_advertised_public_prefix_state - Azure::Network::Mgmt::V2018_08_01::Models::ExpressRouteCircuitPeeringAdvertisedPublicPrefixState + def express_route_circuit_peering_state + Azure::Network::Mgmt::V2018_08_01::Models::ExpressRouteCircuitPeeringState end def access Azure::Network::Mgmt::V2018_08_01::Models::Access @@ -1679,8 +1679,8 @@ def access def express_route_circuit_sku_family Azure::Network::Mgmt::V2018_08_01::Models::ExpressRouteCircuitSkuFamily end - def express_route_circuit_peering_state - Azure::Network::Mgmt::V2018_08_01::Models::ExpressRouteCircuitPeeringState + def authorization_use_status + Azure::Network::Mgmt::V2018_08_01::Models::AuthorizationUseStatus end def express_route_circuit_sku_tier Azure::Network::Mgmt::V2018_08_01::Models::ExpressRouteCircuitSkuTier @@ -1739,26 +1739,26 @@ def origin def issue_type Azure::Network::Mgmt::V2018_08_01::Models::IssueType end - def virtual_network_peering_state - Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkPeeringState - end def protocol Azure::Network::Mgmt::V2018_08_01::Models::Protocol end + def connection_state + Azure::Network::Mgmt::V2018_08_01::Models::ConnectionState + end def evaluation_state Azure::Network::Mgmt::V2018_08_01::Models::EvaluationState end - def virtual_network_gateway_sku_name - Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGatewaySkuName + def virtual_network_peering_state + Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkPeeringState end def virtual_network_gateway_type Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGatewayType end - def connection_state - Azure::Network::Mgmt::V2018_08_01::Models::ConnectionState + def vpn_type + Azure::Network::Mgmt::V2018_08_01::Models::VpnType end - def bgp_peer_state - Azure::Network::Mgmt::V2018_08_01::Models::BgpPeerState + def virtual_network_gateway_sku_name + Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGatewaySkuName end def virtual_network_gateway_sku_tier Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGatewaySkuTier @@ -1766,26 +1766,26 @@ def virtual_network_gateway_sku_tier def vpn_client_protocol Azure::Network::Mgmt::V2018_08_01::Models::VpnClientProtocol end - def vpn_type - Azure::Network::Mgmt::V2018_08_01::Models::VpnType + def ipsec_encryption + Azure::Network::Mgmt::V2018_08_01::Models::IpsecEncryption end def ipsec_integrity Azure::Network::Mgmt::V2018_08_01::Models::IpsecIntegrity end - def ipsec_encryption - Azure::Network::Mgmt::V2018_08_01::Models::IpsecEncryption + def ike_encryption + Azure::Network::Mgmt::V2018_08_01::Models::IkeEncryption end def ike_integrity Azure::Network::Mgmt::V2018_08_01::Models::IkeIntegrity end - def ike_encryption - Azure::Network::Mgmt::V2018_08_01::Models::IkeEncryption + def dh_group + Azure::Network::Mgmt::V2018_08_01::Models::DhGroup end def pfs_group Azure::Network::Mgmt::V2018_08_01::Models::PfsGroup end - def dh_group - Azure::Network::Mgmt::V2018_08_01::Models::DhGroup + def authentication_method + Azure::Network::Mgmt::V2018_08_01::Models::AuthenticationMethod end def virtual_network_gateway_connection_status Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGatewayConnectionStatus @@ -1793,12 +1793,12 @@ def virtual_network_gateway_connection_status def virtual_network_gateway_connection_type Azure::Network::Mgmt::V2018_08_01::Models::VirtualNetworkGatewayConnectionType end + def bgp_peer_state + Azure::Network::Mgmt::V2018_08_01::Models::BgpPeerState + end def processor_architecture Azure::Network::Mgmt::V2018_08_01::Models::ProcessorArchitecture end - def authentication_method - Azure::Network::Mgmt::V2018_08_01::Models::AuthenticationMethod - end def container Azure::Network::Mgmt::V2018_08_01::Models::Container end diff --git a/azure_sdk/lib/latest/modules/newssearch_profile_module.rb b/azure_sdk/lib/latest/modules/newssearch_profile_module.rb index 19587dd60b..a812c403aa 100644 --- a/azure_sdk/lib/latest/modules/newssearch_profile_module.rb +++ b/azure_sdk/lib/latest/modules/newssearch_profile_module.rb @@ -13,11 +13,11 @@ module Models News = Azure::CognitiveServices::NewsSearch::V1_0::Models::News NewsTopic = Azure::CognitiveServices::NewsSearch::V1_0::Models::NewsTopic ResponseBase = Azure::CognitiveServices::NewsSearch::V1_0::Models::ResponseBase - Article = Azure::CognitiveServices::NewsSearch::V1_0::Models::Article - VideoObject = Azure::CognitiveServices::NewsSearch::V1_0::Models::VideoObject - Query = Azure::CognitiveServices::NewsSearch::V1_0::Models::Query TrendingTopics = Azure::CognitiveServices::NewsSearch::V1_0::Models::TrendingTopics + Query = Azure::CognitiveServices::NewsSearch::V1_0::Models::Query + Article = Azure::CognitiveServices::NewsSearch::V1_0::Models::Article Response = Azure::CognitiveServices::NewsSearch::V1_0::Models::Response + VideoObject = Azure::CognitiveServices::NewsSearch::V1_0::Models::VideoObject SearchResultsAnswer = Azure::CognitiveServices::NewsSearch::V1_0::Models::SearchResultsAnswer Identifiable = Azure::CognitiveServices::NewsSearch::V1_0::Models::Identifiable Answer = Azure::CognitiveServices::NewsSearch::V1_0::Models::Answer @@ -77,21 +77,21 @@ def news_topic def response_base Azure::CognitiveServices::NewsSearch::V1_0::Models::ResponseBase end - def article - Azure::CognitiveServices::NewsSearch::V1_0::Models::Article - end - def video_object - Azure::CognitiveServices::NewsSearch::V1_0::Models::VideoObject + def trending_topics + Azure::CognitiveServices::NewsSearch::V1_0::Models::TrendingTopics end def query Azure::CognitiveServices::NewsSearch::V1_0::Models::Query end - def trending_topics - Azure::CognitiveServices::NewsSearch::V1_0::Models::TrendingTopics + def article + Azure::CognitiveServices::NewsSearch::V1_0::Models::Article end def response Azure::CognitiveServices::NewsSearch::V1_0::Models::Response end + def video_object + Azure::CognitiveServices::NewsSearch::V1_0::Models::VideoObject + end def search_results_answer Azure::CognitiveServices::NewsSearch::V1_0::Models::SearchResultsAnswer end diff --git a/azure_sdk/lib/latest/modules/notificationhubs_profile_module.rb b/azure_sdk/lib/latest/modules/notificationhubs_profile_module.rb index 0bfe81d29b..1ff2ca0012 100644 --- a/azure_sdk/lib/latest/modules/notificationhubs_profile_module.rb +++ b/azure_sdk/lib/latest/modules/notificationhubs_profile_module.rb @@ -7,9 +7,9 @@ module Azure::Profiles::Latest module NotificationHubs module Mgmt + Operations = Azure::NotificationHubs::Mgmt::V2017_04_01::Operations Namespaces = Azure::NotificationHubs::Mgmt::V2017_04_01::Namespaces NotificationHubs = Azure::NotificationHubs::Mgmt::V2017_04_01::NotificationHubs - Operations = Azure::NotificationHubs::Mgmt::V2017_04_01::Operations module Models Resource = Azure::NotificationHubs::Mgmt::V2017_04_01::Models::Resource @@ -49,7 +49,7 @@ module Models end class NotificationHubsManagementClass - attr_reader :namespaces, :notification_hubs, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :namespaces, :notification_hubs, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -59,9 +59,9 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) + @operations = @client_0.operations @namespaces = @client_0.namespaces @notification_hubs = @client_0.notification_hubs - @operations = @client_0.operations @model_classes = ModelClasses.new end diff --git a/azure_sdk/lib/latest/modules/operationalinsights_profile_module.rb b/azure_sdk/lib/latest/modules/operationalinsights_profile_module.rb index 186c2b1556..920a96c918 100644 --- a/azure_sdk/lib/latest/modules/operationalinsights_profile_module.rb +++ b/azure_sdk/lib/latest/modules/operationalinsights_profile_module.rb @@ -9,10 +9,10 @@ module OperationalInsights module Mgmt StorageInsights = Azure::OperationalInsights::Mgmt::V2015_03_20::StorageInsights SavedSearches = Azure::OperationalInsights::Mgmt::V2015_03_20::SavedSearches + Operations = Azure::OperationalInsights::Mgmt::V2015_11_01_preview::Operations LinkedServices = Azure::OperationalInsights::Mgmt::V2015_11_01_preview::LinkedServices DataSources = Azure::OperationalInsights::Mgmt::V2015_11_01_preview::DataSources Workspaces = Azure::OperationalInsights::Mgmt::V2015_11_01_preview::Workspaces - Operations = Azure::OperationalInsights::Mgmt::V2015_11_01_preview::Operations module Models Tag = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::Tag @@ -25,6 +25,7 @@ module Models SearchMetadataSchema = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchMetadataSchema StorageInsightStatus = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::StorageInsightStatus SavedSearch = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SavedSearch + SavedSearchesListResult = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SavedSearchesListResult SearchResultsResponse = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchResultsResponse StorageInsightListResult = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::StorageInsightListResult SearchSort = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchSort @@ -34,11 +35,10 @@ module Models WorkspacePurgeBody = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::WorkspacePurgeBody WorkspacePurgeResponse = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::WorkspacePurgeResponse SearchMetadata = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchMetadata - SavedSearchesListResult = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SavedSearchesListResult - StorageInsight = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::StorageInsight WorkspacePurgeStatusResponse = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::WorkspacePurgeStatusResponse - StorageInsightState = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::StorageInsightState + StorageInsight = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::StorageInsight SearchSortEnum = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchSortEnum + StorageInsightState = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::StorageInsightState PurgeState = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::PurgeState DataSource = Azure::OperationalInsights::Mgmt::V2015_11_01_preview::Models::DataSource SkuNameEnum = Azure::OperationalInsights::Mgmt::V2015_11_01_preview::Models::SkuNameEnum @@ -66,7 +66,7 @@ module Models end class OperationalInsightsManagementClass - attr_reader :storage_insights, :saved_searches, :linked_services, :data_sources, :workspaces, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :storage_insights, :saved_searches, :operations, :linked_services, :data_sources, :workspaces, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -84,10 +84,10 @@ def initialize(configurable, base_url=nil, options=nil) @client_1.subscription_id = configurable.subscription_id end add_telemetry(@client_1) + @operations = @client_1.operations @linked_services = @client_1.linked_services @data_sources = @client_1.data_sources @workspaces = @client_1.workspaces - @operations = @client_1.operations @model_classes = ModelClasses.new end @@ -138,6 +138,9 @@ def storage_insight_status def saved_search Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SavedSearch end + def saved_searches_list_result + Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SavedSearchesListResult + end def search_results_response Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchResultsResponse end @@ -165,21 +168,18 @@ def workspace_purge_response def search_metadata Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchMetadata end - def saved_searches_list_result - Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SavedSearchesListResult + def workspace_purge_status_response + Azure::OperationalInsights::Mgmt::V2015_03_20::Models::WorkspacePurgeStatusResponse end def storage_insight Azure::OperationalInsights::Mgmt::V2015_03_20::Models::StorageInsight end - def workspace_purge_status_response - Azure::OperationalInsights::Mgmt::V2015_03_20::Models::WorkspacePurgeStatusResponse + def search_sort_enum + Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchSortEnum end def storage_insight_state Azure::OperationalInsights::Mgmt::V2015_03_20::Models::StorageInsightState end - def search_sort_enum - Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchSortEnum - end def purge_state Azure::OperationalInsights::Mgmt::V2015_03_20::Models::PurgeState end diff --git a/azure_sdk/lib/latest/modules/policy_profile_module.rb b/azure_sdk/lib/latest/modules/policy_profile_module.rb index 54cc040e24..6477839b2e 100644 --- a/azure_sdk/lib/latest/modules/policy_profile_module.rb +++ b/azure_sdk/lib/latest/modules/policy_profile_module.rb @@ -7,11 +7,12 @@ module Azure::Profiles::Latest module Policy module Mgmt - PolicyDefinitions = Azure::Policy::Mgmt::V2018_03_01::PolicyDefinitions PolicyAssignments = Azure::Policy::Mgmt::V2018_03_01::PolicyAssignments + PolicyDefinitions = Azure::Policy::Mgmt::V2018_03_01::PolicyDefinitions PolicySetDefinitions = Azure::Policy::Mgmt::V2018_03_01::PolicySetDefinitions module Models + PolicyDefinitionReference = Azure::Policy::Mgmt::V2018_03_01::Models::PolicyDefinitionReference PolicySetDefinition = Azure::Policy::Mgmt::V2018_03_01::Models::PolicySetDefinition ErrorResponse = Azure::Policy::Mgmt::V2018_03_01::Models::ErrorResponse PolicySetDefinitionListResult = Azure::Policy::Mgmt::V2018_03_01::Models::PolicySetDefinitionListResult @@ -22,11 +23,10 @@ module Models PolicyDefinitionListResult = Azure::Policy::Mgmt::V2018_03_01::Models::PolicyDefinitionListResult PolicyType = Azure::Policy::Mgmt::V2018_03_01::Models::PolicyType PolicyMode = Azure::Policy::Mgmt::V2018_03_01::Models::PolicyMode - PolicyDefinitionReference = Azure::Policy::Mgmt::V2018_03_01::Models::PolicyDefinitionReference end class PolicyManagementClass - attr_reader :policy_definitions, :policy_assignments, :policy_set_definitions, :configurable, :base_url, :options, :model_classes + attr_reader :policy_assignments, :policy_definitions, :policy_set_definitions, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -36,8 +36,8 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) - @policy_definitions = @client_0.policy_definitions @policy_assignments = @client_0.policy_assignments + @policy_definitions = @client_0.policy_definitions @policy_set_definitions = @client_0.policy_set_definitions @model_classes = ModelClasses.new @@ -57,6 +57,9 @@ def method_missing(method, *args) end class ModelClasses + def policy_definition_reference + Azure::Policy::Mgmt::V2018_03_01::Models::PolicyDefinitionReference + end def policy_set_definition Azure::Policy::Mgmt::V2018_03_01::Models::PolicySetDefinition end @@ -87,9 +90,6 @@ def policy_type def policy_mode Azure::Policy::Mgmt::V2018_03_01::Models::PolicyMode end - def policy_definition_reference - Azure::Policy::Mgmt::V2018_03_01::Models::PolicyDefinitionReference - end end end end diff --git a/azure_sdk/lib/latest/modules/policyinsights_profile_module.rb b/azure_sdk/lib/latest/modules/policyinsights_profile_module.rb index 23452bdecb..98519f159c 100644 --- a/azure_sdk/lib/latest/modules/policyinsights_profile_module.rb +++ b/azure_sdk/lib/latest/modules/policyinsights_profile_module.rb @@ -7,8 +7,8 @@ module Azure::Profiles::Latest module PolicyInsights module Mgmt - PolicyStates = Azure::PolicyInsights::Mgmt::V2018_04_04::PolicyStates PolicyEvents = Azure::PolicyInsights::Mgmt::V2018_04_04::PolicyEvents + PolicyStates = Azure::PolicyInsights::Mgmt::V2018_04_04::PolicyStates Operations = Azure::PolicyInsights::Mgmt::V2018_04_04::Operations module Models @@ -17,21 +17,21 @@ module Models PolicyEventsQueryResults = Azure::PolicyInsights::Mgmt::V2018_04_04::Models::PolicyEventsQueryResults Summary = Azure::PolicyInsights::Mgmt::V2018_04_04::Models::Summary QueryFailure = Azure::PolicyInsights::Mgmt::V2018_04_04::Models::QueryFailure - OperationDisplay = Azure::PolicyInsights::Mgmt::V2018_04_04::Models::OperationDisplay + SummarizeResults = Azure::PolicyInsights::Mgmt::V2018_04_04::Models::SummarizeResults PolicyStatesQueryResults = Azure::PolicyInsights::Mgmt::V2018_04_04::Models::PolicyStatesQueryResults PolicyEvent = Azure::PolicyInsights::Mgmt::V2018_04_04::Models::PolicyEvent + OperationDisplay = Azure::PolicyInsights::Mgmt::V2018_04_04::Models::OperationDisplay PolicyState = Azure::PolicyInsights::Mgmt::V2018_04_04::Models::PolicyState - OperationsListResults = Azure::PolicyInsights::Mgmt::V2018_04_04::Models::OperationsListResults Operation = Azure::PolicyInsights::Mgmt::V2018_04_04::Models::Operation - SummarizeResults = Azure::PolicyInsights::Mgmt::V2018_04_04::Models::SummarizeResults - SummaryResults = Azure::PolicyInsights::Mgmt::V2018_04_04::Models::SummaryResults QueryFailureError = Azure::PolicyInsights::Mgmt::V2018_04_04::Models::QueryFailureError - QueryOptions = Azure::PolicyInsights::Mgmt::V2018_04_04::Models::QueryOptions + OperationsListResults = Azure::PolicyInsights::Mgmt::V2018_04_04::Models::OperationsListResults PolicyStatesResource = Azure::PolicyInsights::Mgmt::V2018_04_04::Models::PolicyStatesResource + SummaryResults = Azure::PolicyInsights::Mgmt::V2018_04_04::Models::SummaryResults + QueryOptions = Azure::PolicyInsights::Mgmt::V2018_04_04::Models::QueryOptions end class PolicyInsightsManagementClass - attr_reader :policy_states, :policy_events, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :policy_events, :policy_states, :operations, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -41,8 +41,8 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) - @policy_states = @client_0.policy_states @policy_events = @client_0.policy_events + @policy_states = @client_0.policy_states @operations = @client_0.operations @model_classes = ModelClasses.new @@ -77,8 +77,8 @@ def summary def query_failure Azure::PolicyInsights::Mgmt::V2018_04_04::Models::QueryFailure end - def operation_display - Azure::PolicyInsights::Mgmt::V2018_04_04::Models::OperationDisplay + def summarize_results + Azure::PolicyInsights::Mgmt::V2018_04_04::Models::SummarizeResults end def policy_states_query_results Azure::PolicyInsights::Mgmt::V2018_04_04::Models::PolicyStatesQueryResults @@ -86,30 +86,30 @@ def policy_states_query_results def policy_event Azure::PolicyInsights::Mgmt::V2018_04_04::Models::PolicyEvent end + def operation_display + Azure::PolicyInsights::Mgmt::V2018_04_04::Models::OperationDisplay + end def policy_state Azure::PolicyInsights::Mgmt::V2018_04_04::Models::PolicyState end - def operations_list_results - Azure::PolicyInsights::Mgmt::V2018_04_04::Models::OperationsListResults - end def operation Azure::PolicyInsights::Mgmt::V2018_04_04::Models::Operation end - def summarize_results - Azure::PolicyInsights::Mgmt::V2018_04_04::Models::SummarizeResults - end - def summary_results - Azure::PolicyInsights::Mgmt::V2018_04_04::Models::SummaryResults - end def query_failure_error Azure::PolicyInsights::Mgmt::V2018_04_04::Models::QueryFailureError end - def query_options - Azure::PolicyInsights::Mgmt::V2018_04_04::Models::QueryOptions + def operations_list_results + Azure::PolicyInsights::Mgmt::V2018_04_04::Models::OperationsListResults end def policy_states_resource Azure::PolicyInsights::Mgmt::V2018_04_04::Models::PolicyStatesResource end + def summary_results + Azure::PolicyInsights::Mgmt::V2018_04_04::Models::SummaryResults + end + def query_options + Azure::PolicyInsights::Mgmt::V2018_04_04::Models::QueryOptions + end end end end diff --git a/azure_sdk/lib/latest/modules/powerbiembedded_profile_module.rb b/azure_sdk/lib/latest/modules/powerbiembedded_profile_module.rb index 7bb3158594..fd481c892b 100644 --- a/azure_sdk/lib/latest/modules/powerbiembedded_profile_module.rb +++ b/azure_sdk/lib/latest/modules/powerbiembedded_profile_module.rb @@ -7,10 +7,11 @@ module Azure::Profiles::Latest module PowerBiEmbedded module Mgmt - Workspaces = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Workspaces WorkspaceCollections = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::WorkspaceCollections + Workspaces = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Workspaces module Models + WorkspaceCollection = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::WorkspaceCollection WorkspaceCollectionAccessKey = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::WorkspaceCollectionAccessKey CreateWorkspaceCollectionRequest = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::CreateWorkspaceCollectionRequest Display = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::Display @@ -18,22 +19,21 @@ module Models AzureSku = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::AzureSku Workspace = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::Workspace CheckNameRequest = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::CheckNameRequest - OperationList = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::OperationList - CheckNameResponse = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::CheckNameResponse WorkspaceList = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::WorkspaceList - MigrateWorkspaceCollectionRequest = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::MigrateWorkspaceCollectionRequest + CheckNameResponse = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::CheckNameResponse WorkspaceCollectionList = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::WorkspaceCollectionList - AccessKeyName = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::AccessKeyName + MigrateWorkspaceCollectionRequest = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::MigrateWorkspaceCollectionRequest ErrorDetail = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::ErrorDetail + AccessKeyName = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::AccessKeyName CheckNameReason = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::CheckNameReason Operation = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::Operation Error = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::Error + OperationList = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::OperationList WorkspaceCollectionAccessKeys = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::WorkspaceCollectionAccessKeys - WorkspaceCollection = Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::WorkspaceCollection end class PowerBiEmbeddedManagementClass - attr_reader :workspaces, :workspace_collections, :configurable, :base_url, :options, :model_classes + attr_reader :workspace_collections, :workspaces, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -43,8 +43,8 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) - @workspaces = @client_0.workspaces @workspace_collections = @client_0.workspace_collections + @workspaces = @client_0.workspaces @model_classes = ModelClasses.new end @@ -63,6 +63,9 @@ def method_missing(method, *args) end class ModelClasses + def workspace_collection + Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::WorkspaceCollection + end def workspace_collection_access_key Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::WorkspaceCollectionAccessKey end @@ -84,27 +87,24 @@ def workspace def check_name_request Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::CheckNameRequest end - def operation_list - Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::OperationList + def workspace_list + Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::WorkspaceList end def check_name_response Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::CheckNameResponse end - def workspace_list - Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::WorkspaceList + def workspace_collection_list + Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::WorkspaceCollectionList end def migrate_workspace_collection_request Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::MigrateWorkspaceCollectionRequest end - def workspace_collection_list - Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::WorkspaceCollectionList + def error_detail + Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::ErrorDetail end def access_key_name Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::AccessKeyName end - def error_detail - Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::ErrorDetail - end def check_name_reason Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::CheckNameReason end @@ -114,12 +114,12 @@ def operation def error Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::Error end + def operation_list + Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::OperationList + end def workspace_collection_access_keys Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::WorkspaceCollectionAccessKeys end - def workspace_collection - Azure::PowerBiEmbedded::Mgmt::V2016_01_29::Models::WorkspaceCollection - end end end end diff --git a/azure_sdk/lib/latest/modules/recoveryservices_profile_module.rb b/azure_sdk/lib/latest/modules/recoveryservices_profile_module.rb index 758ee53eab..afae13f825 100644 --- a/azure_sdk/lib/latest/modules/recoveryservices_profile_module.rb +++ b/azure_sdk/lib/latest/modules/recoveryservices_profile_module.rb @@ -7,13 +7,13 @@ module Azure::Profiles::Latest module RecoveryServices module Mgmt + Operations = Azure::RecoveryServices::Mgmt::V2016_06_01::Operations VaultExtendedInfoOperations = Azure::RecoveryServices::Mgmt::V2016_06_01::VaultExtendedInfoOperations - Vaults = Azure::RecoveryServices::Mgmt::V2016_06_01::Vaults + ReplicationUsages = Azure::RecoveryServices::Mgmt::V2016_06_01::ReplicationUsages Usages = Azure::RecoveryServices::Mgmt::V2016_06_01::Usages VaultCertificates = Azure::RecoveryServices::Mgmt::V2016_06_01::VaultCertificates RegisteredIdentities = Azure::RecoveryServices::Mgmt::V2016_06_01::RegisteredIdentities - ReplicationUsages = Azure::RecoveryServices::Mgmt::V2016_06_01::ReplicationUsages - Operations = Azure::RecoveryServices::Mgmt::V2016_06_01::Operations + Vaults = Azure::RecoveryServices::Mgmt::V2016_06_01::Vaults module Models ClientDiscoveryValueForSingleApi = Azure::RecoveryServices::Mgmt::V2016_06_01::Models::ClientDiscoveryValueForSingleApi @@ -53,7 +53,7 @@ module Models end class RecoveryServicesManagementClass - attr_reader :vault_extended_info_operations, :vaults, :usages, :vault_certificates, :registered_identities, :replication_usages, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :vault_extended_info_operations, :replication_usages, :usages, :vault_certificates, :registered_identities, :vaults, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -63,13 +63,13 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) + @operations = @client_0.operations @vault_extended_info_operations = @client_0.vault_extended_info_operations - @vaults = @client_0.vaults + @replication_usages = @client_0.replication_usages @usages = @client_0.usages @vault_certificates = @client_0.vault_certificates @registered_identities = @client_0.registered_identities - @replication_usages = @client_0.replication_usages - @operations = @client_0.operations + @vaults = @client_0.vaults @model_classes = ModelClasses.new end diff --git a/azure_sdk/lib/latest/modules/recoveryservicesbackup_profile_module.rb b/azure_sdk/lib/latest/modules/recoveryservicesbackup_profile_module.rb index eb9d154da5..5764330e50 100644 --- a/azure_sdk/lib/latest/modules/recoveryservicesbackup_profile_module.rb +++ b/azure_sdk/lib/latest/modules/recoveryservicesbackup_profile_module.rb @@ -8,6 +8,7 @@ module Azure::Profiles::Latest module RecoveryServicesBackup module Mgmt Operations = Azure::RecoveryServicesBackup::Mgmt::V2016_08_10::Operations + BackupOperationStatuses = Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::BackupOperationStatuses ProtectionPolicies = Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::ProtectionPolicies ProtectionPolicyOperationResults = Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::ProtectionPolicyOperationResults ProtectionPolicyOperationStatuses = Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::ProtectionPolicyOperationStatuses @@ -32,7 +33,6 @@ module Mgmt JobCancellations = Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::JobCancellations JobOperationResults = Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::JobOperationResults BackupOperationResults = Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::BackupOperationResults - BackupOperationStatuses = Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::BackupOperationStatuses ProtectionIntentOperations = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::ProtectionIntentOperations BackupStatus = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::BackupStatus FeatureSupport = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::FeatureSupport @@ -46,12 +46,12 @@ module Mgmt Jobs = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Jobs module Models + ClientDiscoveryForLogSpecification = Azure::RecoveryServicesBackup::Mgmt::V2016_08_10::Models::ClientDiscoveryForLogSpecification ClientDiscoveryValueForSingleApi = Azure::RecoveryServicesBackup::Mgmt::V2016_08_10::Models::ClientDiscoveryValueForSingleApi ClientDiscoveryDisplay = Azure::RecoveryServicesBackup::Mgmt::V2016_08_10::Models::ClientDiscoveryDisplay ClientDiscoveryForServiceSpecification = Azure::RecoveryServicesBackup::Mgmt::V2016_08_10::Models::ClientDiscoveryForServiceSpecification ClientDiscoveryForProperties = Azure::RecoveryServicesBackup::Mgmt::V2016_08_10::Models::ClientDiscoveryForProperties ClientDiscoveryResponse = Azure::RecoveryServicesBackup::Mgmt::V2016_08_10::Models::ClientDiscoveryResponse - ClientDiscoveryForLogSpecification = Azure::RecoveryServicesBackup::Mgmt::V2016_08_10::Models::ClientDiscoveryForLogSpecification StorageType = Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::Models::StorageType OperationStatus = Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::Models::OperationStatus AzureWorkloadContainerExtendedInfo = Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::Models::AzureWorkloadContainerExtendedInfo @@ -150,9 +150,9 @@ module Models OperationStatusProvisionILRExtendedInfo = Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::Models::OperationStatusProvisionILRExtendedInfo ProtectableContainerResource = Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::Models::ProtectableContainerResource BackupRequest = Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::Models::BackupRequest - ProtectionContainerResourceList = Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::Models::ProtectionContainerResourceList - ProtectionContainerResource = Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::Models::ProtectionContainerResource ProtectableContainerResourceList = Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::Models::ProtectableContainerResourceList + ProtectionContainerResource = Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::Models::ProtectionContainerResource + ProtectionContainerResourceList = Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::Models::ProtectionContainerResourceList RecoveryPointResource = Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::Models::RecoveryPointResource RecoveryPointResourceList = Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::Models::RecoveryPointResourceList RestoreRequestResource = Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::Models::RestoreRequestResource @@ -187,22 +187,22 @@ module Models AzureWorkloadJobTaskDetails = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::AzureWorkloadJobTaskDetails DailyRetentionSchedule = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::DailyRetentionSchedule AzureWorkloadJobExtendedInfo = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::AzureWorkloadJobExtendedInfo - ValidateOperationRequest = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::ValidateOperationRequest + RetentionDuration = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::RetentionDuration DailyRetentionFormat = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::DailyRetentionFormat MabJobTaskDetails = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::MabJobTaskDetails MabErrorInfo = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::MabErrorInfo AzureIaaSVMJobTaskDetails = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::AzureIaaSVMJobTaskDetails AzureStorageJobTaskDetails = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::AzureStorageJobTaskDetails - RetentionDuration = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::RetentionDuration + ValidateOperationRequest = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::ValidateOperationRequest AzureVMResourceFeatureSupportResponse = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::AzureVMResourceFeatureSupportResponse ProtectedItemQueryObject = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::ProtectedItemQueryObject ProtectionIntent = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::ProtectionIntent PreValidateEnableBackupRequest = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::PreValidateEnableBackupRequest AzureVmWorkloadProtectedItemExtendedInfo = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::AzureVmWorkloadProtectedItemExtendedInfo - BackupManagementUsageList = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::BackupManagementUsageList + ProtectionPolicyQueryObject = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::ProtectionPolicyQueryObject BackupStatusRequest = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::BackupStatusRequest BackupManagementUsage = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::BackupManagementUsage - ProtectionPolicyQueryObject = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::ProtectionPolicyQueryObject + BackupManagementUsageList = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::BackupManagementUsageList BMSBackupSummariesQueryObject = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::BMSBackupSummariesQueryObject AzureIaaSVMProtectedItemExtendedInfo = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::AzureIaaSVMProtectedItemExtendedInfo AzureIaaSVMJobExtendedInfo = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::AzureIaaSVMJobExtendedInfo @@ -325,7 +325,7 @@ module Models end class RecoveryServicesBackupManagementClass - attr_reader :operations, :protection_policies, :protection_policy_operation_results, :protection_policy_operation_statuses, :backup_protectable_items, :backup_protection_containers, :security_pins, :backup_resource_storage_configs, :backup_resource_vault_configs, :backup_engines, :protection_container_refresh_operation_results, :protectable_containers, :protection_containers, :backup_workload_items, :protection_container_operation_results, :protected_items, :backups, :protected_item_operation_results, :protected_item_operation_statuses, :recovery_points, :item_level_recovery_connections, :restores, :job_cancellations, :job_operation_results, :backup_operation_results, :backup_operation_statuses, :protection_intent_operations, :backup_status, :feature_support, :backup_jobs, :job_details, :export_jobs_operation_results, :backup_policies, :backup_protected_items, :backup_usage_summaries, :operation, :jobs, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :backup_operation_statuses, :protection_policies, :protection_policy_operation_results, :protection_policy_operation_statuses, :backup_protectable_items, :backup_protection_containers, :security_pins, :backup_resource_storage_configs, :backup_resource_vault_configs, :backup_engines, :protection_container_refresh_operation_results, :protectable_containers, :protection_containers, :backup_workload_items, :protection_container_operation_results, :protected_items, :backups, :protected_item_operation_results, :protected_item_operation_statuses, :recovery_points, :item_level_recovery_connections, :restores, :job_cancellations, :job_operation_results, :backup_operation_results, :protection_intent_operations, :backup_status, :feature_support, :backup_jobs, :job_details, :export_jobs_operation_results, :backup_policies, :backup_protected_items, :backup_usage_summaries, :operation, :jobs, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -342,6 +342,7 @@ def initialize(configurable, base_url=nil, options=nil) @client_1.subscription_id = configurable.subscription_id end add_telemetry(@client_1) + @backup_operation_statuses = @client_1.backup_operation_statuses @protection_policies = @client_1.protection_policies @protection_policy_operation_results = @client_1.protection_policy_operation_results @protection_policy_operation_statuses = @client_1.protection_policy_operation_statuses @@ -366,7 +367,6 @@ def initialize(configurable, base_url=nil, options=nil) @job_cancellations = @client_1.job_cancellations @job_operation_results = @client_1.job_operation_results @backup_operation_results = @client_1.backup_operation_results - @backup_operation_statuses = @client_1.backup_operation_statuses @client_2 = Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::RecoveryServicesBackupClient.new(configurable.credentials, base_url, options) if(@client_2.respond_to?(:subscription_id)) @@ -406,6 +406,9 @@ def method_missing(method, *args) end class ModelClasses + def client_discovery_for_log_specification + Azure::RecoveryServicesBackup::Mgmt::V2016_08_10::Models::ClientDiscoveryForLogSpecification + end def client_discovery_value_for_single_api Azure::RecoveryServicesBackup::Mgmt::V2016_08_10::Models::ClientDiscoveryValueForSingleApi end @@ -421,9 +424,6 @@ def client_discovery_for_properties def client_discovery_response Azure::RecoveryServicesBackup::Mgmt::V2016_08_10::Models::ClientDiscoveryResponse end - def client_discovery_for_log_specification - Azure::RecoveryServicesBackup::Mgmt::V2016_08_10::Models::ClientDiscoveryForLogSpecification - end def storage_type Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::Models::StorageType end @@ -718,14 +718,14 @@ def protectable_container_resource def backup_request Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::Models::BackupRequest end - def protection_container_resource_list - Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::Models::ProtectionContainerResourceList + def protectable_container_resource_list + Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::Models::ProtectableContainerResourceList end def protection_container_resource Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::Models::ProtectionContainerResource end - def protectable_container_resource_list - Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::Models::ProtectableContainerResourceList + def protection_container_resource_list + Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::Models::ProtectionContainerResourceList end def recovery_point_resource Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::Models::RecoveryPointResource @@ -829,8 +829,8 @@ def daily_retention_schedule def azure_workload_job_extended_info Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::AzureWorkloadJobExtendedInfo end - def validate_operation_request - Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::ValidateOperationRequest + def retention_duration + Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::RetentionDuration end def daily_retention_format Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::DailyRetentionFormat @@ -847,8 +847,8 @@ def azure_iaa_svmjob_task_details def azure_storage_job_task_details Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::AzureStorageJobTaskDetails end - def retention_duration - Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::RetentionDuration + def validate_operation_request + Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::ValidateOperationRequest end def azure_vmresource_feature_support_response Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::AzureVMResourceFeatureSupportResponse @@ -865,8 +865,8 @@ def pre_validate_enable_backup_request def azure_vm_workload_protected_item_extended_info Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::AzureVmWorkloadProtectedItemExtendedInfo end - def backup_management_usage_list - Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::BackupManagementUsageList + def protection_policy_query_object + Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::ProtectionPolicyQueryObject end def backup_status_request Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::BackupStatusRequest @@ -874,8 +874,8 @@ def backup_status_request def backup_management_usage Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::BackupManagementUsage end - def protection_policy_query_object - Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::ProtectionPolicyQueryObject + def backup_management_usage_list + Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::BackupManagementUsageList end def bmsbackup_summaries_query_object Azure::RecoveryServicesBackup::Mgmt::V2017_07_01::Models::BMSBackupSummariesQueryObject diff --git a/azure_sdk/lib/latest/modules/recoveryservicessiterecovery_profile_module.rb b/azure_sdk/lib/latest/modules/recoveryservicessiterecovery_profile_module.rb index 206b2ed5a4..d127aa75e4 100644 --- a/azure_sdk/lib/latest/modules/recoveryservicessiterecovery_profile_module.rb +++ b/azure_sdk/lib/latest/modules/recoveryservicessiterecovery_profile_module.rb @@ -234,8 +234,8 @@ module Models A2ASwitchProtectionInput = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::A2ASwitchProtectionInput A2AUpdateContainerMappingInput = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::A2AUpdateContainerMappingInput A2AUpdateReplicationProtectedItemInput = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::A2AUpdateReplicationProtectedItemInput - Alert = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::Alert RoleAssignment = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::RoleAssignment + Alert = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::Alert AutomationRunbookTaskDetails = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::AutomationRunbookTaskDetails AzureFabricCreationInput = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::AzureFabricCreationInput AsrJobDetails = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::AsrJobDetails @@ -258,15 +258,15 @@ module Models HyperVReplicaAzurePolicyInput = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HyperVReplicaAzurePolicyInput HyperVReplicaAzureFailoverProviderInput = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HyperVReplicaAzureFailoverProviderInput HyperVReplicaAzureReprotectInput = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HyperVReplicaAzureReprotectInput - Event = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::Event HyperVReplicaAzureUpdateReplicationProtectedItemInput = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HyperVReplicaAzureUpdateReplicationProtectedItemInput + HyperVReplicaAzureReplicationDetails = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HyperVReplicaAzureReplicationDetails HyperVReplicaBasePolicyDetails = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HyperVReplicaBasePolicyDetails HyperVReplicaBaseReplicationDetails = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HyperVReplicaBaseReplicationDetails HyperVReplicaBaseEventDetails = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HyperVReplicaBaseEventDetails HyperVReplicaBluePolicyDetails = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HyperVReplicaBluePolicyDetails HyperVReplicaBluePolicyInput = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HyperVReplicaBluePolicyInput HyperVReplicaBlueReplicationDetails = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HyperVReplicaBlueReplicationDetails - HyperVReplicaAzureReplicationDetails = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HyperVReplicaAzureReplicationDetails + Event = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::Event HyperVReplicaPolicyInput = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HyperVReplicaPolicyInput HyperVReplicaPolicyDetails = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HyperVReplicaPolicyDetails HyperVSiteDetails = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HyperVSiteDetails @@ -328,30 +328,30 @@ module Models VmmToVmmNetworkMappingSettings = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VmmToVmmNetworkMappingSettings VmmDetails = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VmmDetails VmmToVmmUpdateNetworkMappingInput = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VmmToVmmUpdateNetworkMappingInput - VmmVirtualMachineDetails = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VmmVirtualMachineDetails + VmNicUpdatesTaskDetails = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VmNicUpdatesTaskDetails VMwareCbtPolicyCreationInput = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VMwareCbtPolicyCreationInput VmmToVmmCreateNetworkMappingInput = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VmmToVmmCreateNetworkMappingInput VmwareCbtPolicyDetails = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VmwareCbtPolicyDetails - VMwareV2FabricCreationInput = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VMwareV2FabricCreationInput + VMwareDetails = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VMwareDetails VMwareV2FabricSpecificDetails = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VMwareV2FabricSpecificDetails VMwareVirtualMachineDetails = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VMwareVirtualMachineDetails AgentAutoUpdateStatus = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::AgentAutoUpdateStatus SetMultiVmSyncStatus = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::SetMultiVmSyncStatus - VMwareDetails = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VMwareDetails Policy = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::Policy - MultiVmGroupCreateOption = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::MultiVmGroupCreateOption RecoveryPointSyncType = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::RecoveryPointSyncType + MultiVmGroupCreateOption = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::MultiVmGroupCreateOption Network = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::Network + RecoveryPlanGroupType = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::RecoveryPlanGroupType + VmmVirtualMachineDetails = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VmmVirtualMachineDetails PossibleOperationsDirections = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::PossibleOperationsDirections - VmNicUpdatesTaskDetails = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VmNicUpdatesTaskDetails - DisableProtectionReason = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::DisableProtectionReason + ReplicationProtectedItemOperation = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItemOperation FailoverDeploymentModel = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::FailoverDeploymentModel - RecoveryPlanGroupType = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::RecoveryPlanGroupType - AgentVersionStatus = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::AgentVersionStatus + DisableProtectionReason = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::DisableProtectionReason + VMwareV2FabricCreationInput = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VMwareV2FabricCreationInput PresenceStatus = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::PresenceStatus - MultiVmSyncStatus = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::MultiVmSyncStatus + AgentVersionStatus = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::AgentVersionStatus HealthErrorCategory = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HealthErrorCategory - ReplicationProtectedItemOperation = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItemOperation + MultiVmSyncStatus = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::MultiVmSyncStatus A2ARpRecoveryPointType = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::A2ARpRecoveryPointType MultiVmSyncPointOption = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::MultiVmSyncPointOption RecoveryPlanActionLocation = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::RecoveryPlanActionLocation @@ -1038,12 +1038,12 @@ def a2_aupdate_container_mapping_input def a2_aupdate_replication_protected_item_input Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::A2AUpdateReplicationProtectedItemInput end - def alert - Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::Alert - end def role_assignment Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::RoleAssignment end + def alert + Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::Alert + end def automation_runbook_task_details Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::AutomationRunbookTaskDetails end @@ -1110,12 +1110,12 @@ def hyper_vreplica_azure_failover_provider_input def hyper_vreplica_azure_reprotect_input Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HyperVReplicaAzureReprotectInput end - def event - Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::Event - end def hyper_vreplica_azure_update_replication_protected_item_input Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HyperVReplicaAzureUpdateReplicationProtectedItemInput end + def hyper_vreplica_azure_replication_details + Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HyperVReplicaAzureReplicationDetails + end def hyper_vreplica_base_policy_details Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HyperVReplicaBasePolicyDetails end @@ -1134,8 +1134,8 @@ def hyper_vreplica_blue_policy_input def hyper_vreplica_blue_replication_details Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HyperVReplicaBlueReplicationDetails end - def hyper_vreplica_azure_replication_details - Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HyperVReplicaAzureReplicationDetails + def event + Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::Event end def hyper_vreplica_policy_input Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HyperVReplicaPolicyInput @@ -1320,8 +1320,8 @@ def vmm_details def vmm_to_vmm_update_network_mapping_input Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VmmToVmmUpdateNetworkMappingInput end - def vmm_virtual_machine_details - Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VmmVirtualMachineDetails + def vm_nic_updates_task_details + Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VmNicUpdatesTaskDetails end def vmware_cbt_policy_creation_input Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VMwareCbtPolicyCreationInput @@ -1332,8 +1332,8 @@ def vmm_to_vmm_create_network_mapping_input def vmware_cbt_policy_details Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VmwareCbtPolicyDetails end - def vmware_v2_fabric_creation_input - Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VMwareV2FabricCreationInput + def vmware_details + Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VMwareDetails end def vmware_v2_fabric_specific_details Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VMwareV2FabricSpecificDetails @@ -1347,50 +1347,50 @@ def agent_auto_update_status def set_multi_vm_sync_status Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::SetMultiVmSyncStatus end - def vmware_details - Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VMwareDetails - end def policy Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::Policy end - def multi_vm_group_create_option - Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::MultiVmGroupCreateOption - end def recovery_point_sync_type Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::RecoveryPointSyncType end + def multi_vm_group_create_option + Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::MultiVmGroupCreateOption + end def network Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::Network end + def recovery_plan_group_type + Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::RecoveryPlanGroupType + end + def vmm_virtual_machine_details + Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VmmVirtualMachineDetails + end def possible_operations_directions Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::PossibleOperationsDirections end - def vm_nic_updates_task_details - Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VmNicUpdatesTaskDetails - end - def disable_protection_reason - Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::DisableProtectionReason + def replication_protected_item_operation + Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItemOperation end def failover_deployment_model Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::FailoverDeploymentModel end - def recovery_plan_group_type - Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::RecoveryPlanGroupType + def disable_protection_reason + Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::DisableProtectionReason end - def agent_version_status - Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::AgentVersionStatus + def vmware_v2_fabric_creation_input + Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::VMwareV2FabricCreationInput end def presence_status Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::PresenceStatus end - def multi_vm_sync_status - Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::MultiVmSyncStatus + def agent_version_status + Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::AgentVersionStatus end def health_error_category Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::HealthErrorCategory end - def replication_protected_item_operation - Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItemOperation + def multi_vm_sync_status + Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::MultiVmSyncStatus end def a2_arp_recovery_point_type Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::A2ARpRecoveryPointType diff --git a/azure_sdk/lib/latest/modules/redis_profile_module.rb b/azure_sdk/lib/latest/modules/redis_profile_module.rb index e018a92abe..e245e1aaa3 100644 --- a/azure_sdk/lib/latest/modules/redis_profile_module.rb +++ b/azure_sdk/lib/latest/modules/redis_profile_module.rb @@ -7,13 +7,14 @@ module Azure::Profiles::Latest module Redis module Mgmt - FirewallRules = Azure::Redis::Mgmt::V2018_03_01::FirewallRules Operations = Azure::Redis::Mgmt::V2018_03_01::Operations + FirewallRules = Azure::Redis::Mgmt::V2018_03_01::FirewallRules + LinkedServer = Azure::Redis::Mgmt::V2018_03_01::LinkedServer Redis = Azure::Redis::Mgmt::V2018_03_01::Redis PatchSchedules = Azure::Redis::Mgmt::V2018_03_01::PatchSchedules - LinkedServer = Azure::Redis::Mgmt::V2018_03_01::LinkedServer module Models + CheckNameAvailabilityParameters = Azure::Redis::Mgmt::V2018_03_01::Models::CheckNameAvailabilityParameters Resource = Azure::Redis::Mgmt::V2018_03_01::Models::Resource ProvisioningState = Azure::Redis::Mgmt::V2018_03_01::Models::ProvisioningState OperationDisplay = Azure::Redis::Mgmt::V2018_03_01::Models::OperationDisplay @@ -51,11 +52,10 @@ module Models TrackedResource = Azure::Redis::Mgmt::V2018_03_01::Models::TrackedResource ProxyResource = Azure::Redis::Mgmt::V2018_03_01::Models::ProxyResource ReplicationRole = Azure::Redis::Mgmt::V2018_03_01::Models::ReplicationRole - CheckNameAvailabilityParameters = Azure::Redis::Mgmt::V2018_03_01::Models::CheckNameAvailabilityParameters end class RedisManagementClass - attr_reader :firewall_rules, :operations, :redis, :patch_schedules, :linked_server, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :firewall_rules, :linked_server, :redis, :patch_schedules, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -65,11 +65,11 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) - @firewall_rules = @client_0.firewall_rules @operations = @client_0.operations + @firewall_rules = @client_0.firewall_rules + @linked_server = @client_0.linked_server @redis = @client_0.redis @patch_schedules = @client_0.patch_schedules - @linked_server = @client_0.linked_server @model_classes = ModelClasses.new end @@ -88,6 +88,9 @@ def method_missing(method, *args) end class ModelClasses + def check_name_availability_parameters + Azure::Redis::Mgmt::V2018_03_01::Models::CheckNameAvailabilityParameters + end def resource Azure::Redis::Mgmt::V2018_03_01::Models::Resource end @@ -199,9 +202,6 @@ def proxy_resource def replication_role Azure::Redis::Mgmt::V2018_03_01::Models::ReplicationRole end - def check_name_availability_parameters - Azure::Redis::Mgmt::V2018_03_01::Models::CheckNameAvailabilityParameters - end end end end diff --git a/azure_sdk/lib/latest/modules/relay_profile_module.rb b/azure_sdk/lib/latest/modules/relay_profile_module.rb index 1241bb2f11..78eb337073 100644 --- a/azure_sdk/lib/latest/modules/relay_profile_module.rb +++ b/azure_sdk/lib/latest/modules/relay_profile_module.rb @@ -7,32 +7,32 @@ module Azure::Profiles::Latest module Relay module Mgmt + Operations = Azure::Relay::Mgmt::V2017_04_01::Operations Namespaces = Azure::Relay::Mgmt::V2017_04_01::Namespaces HybridConnections = Azure::Relay::Mgmt::V2017_04_01::HybridConnections WCFRelays = Azure::Relay::Mgmt::V2017_04_01::WCFRelays - Operations = Azure::Relay::Mgmt::V2017_04_01::Operations module Models Resource = Azure::Relay::Mgmt::V2017_04_01::Models::Resource KeyType = Azure::Relay::Mgmt::V2017_04_01::Models::KeyType + RelayNamespaceListResult = Azure::Relay::Mgmt::V2017_04_01::Models::RelayNamespaceListResult OperationDisplay = Azure::Relay::Mgmt::V2017_04_01::Models::OperationDisplay CheckNameAvailability = Azure::Relay::Mgmt::V2017_04_01::Models::CheckNameAvailability HybridConnectionListResult = Azure::Relay::Mgmt::V2017_04_01::Models::HybridConnectionListResult WcfRelaysListResult = Azure::Relay::Mgmt::V2017_04_01::Models::WcfRelaysListResult - OperationListResult = Azure::Relay::Mgmt::V2017_04_01::Models::OperationListResult - AuthorizationRuleListResult = Azure::Relay::Mgmt::V2017_04_01::Models::AuthorizationRuleListResult - RelayNamespaceListResult = Azure::Relay::Mgmt::V2017_04_01::Models::RelayNamespaceListResult - RegenerateAccessKeyParameters = Azure::Relay::Mgmt::V2017_04_01::Models::RegenerateAccessKeyParameters AccessKeys = Azure::Relay::Mgmt::V2017_04_01::Models::AccessKeys + RegenerateAccessKeyParameters = Azure::Relay::Mgmt::V2017_04_01::Models::RegenerateAccessKeyParameters + OperationListResult = Azure::Relay::Mgmt::V2017_04_01::Models::OperationListResult + Operation = Azure::Relay::Mgmt::V2017_04_01::Models::Operation WcfRelay = Azure::Relay::Mgmt::V2017_04_01::Models::WcfRelay - ResourceNamespacePatch = Azure::Relay::Mgmt::V2017_04_01::Models::ResourceNamespacePatch + RelayUpdateParameters = Azure::Relay::Mgmt::V2017_04_01::Models::RelayUpdateParameters AuthorizationRule = Azure::Relay::Mgmt::V2017_04_01::Models::AuthorizationRule Relaytype = Azure::Relay::Mgmt::V2017_04_01::Models::Relaytype - RelayUpdateParameters = Azure::Relay::Mgmt::V2017_04_01::Models::RelayUpdateParameters - CheckNameAvailabilityResult = Azure::Relay::Mgmt::V2017_04_01::Models::CheckNameAvailabilityResult + ResourceNamespacePatch = Azure::Relay::Mgmt::V2017_04_01::Models::ResourceNamespacePatch + AuthorizationRuleListResult = Azure::Relay::Mgmt::V2017_04_01::Models::AuthorizationRuleListResult RelayNamespace = Azure::Relay::Mgmt::V2017_04_01::Models::RelayNamespace ProvisioningStateEnum = Azure::Relay::Mgmt::V2017_04_01::Models::ProvisioningStateEnum - Operation = Azure::Relay::Mgmt::V2017_04_01::Models::Operation + CheckNameAvailabilityResult = Azure::Relay::Mgmt::V2017_04_01::Models::CheckNameAvailabilityResult AccessRights = Azure::Relay::Mgmt::V2017_04_01::Models::AccessRights UnavailableReason = Azure::Relay::Mgmt::V2017_04_01::Models::UnavailableReason SkuTier = Azure::Relay::Mgmt::V2017_04_01::Models::SkuTier @@ -43,7 +43,7 @@ module Models end class RelayManagementClass - attr_reader :namespaces, :hybrid_connections, :wcfrelays, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :namespaces, :hybrid_connections, :wcfrelays, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -53,10 +53,10 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) + @operations = @client_0.operations @namespaces = @client_0.namespaces @hybrid_connections = @client_0.hybrid_connections @wcfrelays = @client_0.wcfrelays - @operations = @client_0.operations @model_classes = ModelClasses.new end @@ -81,6 +81,9 @@ def resource def key_type Azure::Relay::Mgmt::V2017_04_01::Models::KeyType end + def relay_namespace_list_result + Azure::Relay::Mgmt::V2017_04_01::Models::RelayNamespaceListResult + end def operation_display Azure::Relay::Mgmt::V2017_04_01::Models::OperationDisplay end @@ -93,26 +96,23 @@ def hybrid_connection_list_result def wcf_relays_list_result Azure::Relay::Mgmt::V2017_04_01::Models::WcfRelaysListResult end - def operation_list_result - Azure::Relay::Mgmt::V2017_04_01::Models::OperationListResult - end - def authorization_rule_list_result - Azure::Relay::Mgmt::V2017_04_01::Models::AuthorizationRuleListResult - end - def relay_namespace_list_result - Azure::Relay::Mgmt::V2017_04_01::Models::RelayNamespaceListResult + def access_keys + Azure::Relay::Mgmt::V2017_04_01::Models::AccessKeys end def regenerate_access_key_parameters Azure::Relay::Mgmt::V2017_04_01::Models::RegenerateAccessKeyParameters end - def access_keys - Azure::Relay::Mgmt::V2017_04_01::Models::AccessKeys + def operation_list_result + Azure::Relay::Mgmt::V2017_04_01::Models::OperationListResult + end + def operation + Azure::Relay::Mgmt::V2017_04_01::Models::Operation end def wcf_relay Azure::Relay::Mgmt::V2017_04_01::Models::WcfRelay end - def resource_namespace_patch - Azure::Relay::Mgmt::V2017_04_01::Models::ResourceNamespacePatch + def relay_update_parameters + Azure::Relay::Mgmt::V2017_04_01::Models::RelayUpdateParameters end def authorization_rule Azure::Relay::Mgmt::V2017_04_01::Models::AuthorizationRule @@ -120,11 +120,11 @@ def authorization_rule def relaytype Azure::Relay::Mgmt::V2017_04_01::Models::Relaytype end - def relay_update_parameters - Azure::Relay::Mgmt::V2017_04_01::Models::RelayUpdateParameters + def resource_namespace_patch + Azure::Relay::Mgmt::V2017_04_01::Models::ResourceNamespacePatch end - def check_name_availability_result - Azure::Relay::Mgmt::V2017_04_01::Models::CheckNameAvailabilityResult + def authorization_rule_list_result + Azure::Relay::Mgmt::V2017_04_01::Models::AuthorizationRuleListResult end def relay_namespace Azure::Relay::Mgmt::V2017_04_01::Models::RelayNamespace @@ -132,8 +132,8 @@ def relay_namespace def provisioning_state_enum Azure::Relay::Mgmt::V2017_04_01::Models::ProvisioningStateEnum end - def operation - Azure::Relay::Mgmt::V2017_04_01::Models::Operation + def check_name_availability_result + Azure::Relay::Mgmt::V2017_04_01::Models::CheckNameAvailabilityResult end def access_rights Azure::Relay::Mgmt::V2017_04_01::Models::AccessRights diff --git a/azure_sdk/lib/latest/modules/resources_profile_module.rb b/azure_sdk/lib/latest/modules/resources_profile_module.rb index 08076d0916..c1c4bffc7b 100644 --- a/azure_sdk/lib/latest/modules/resources_profile_module.rb +++ b/azure_sdk/lib/latest/modules/resources_profile_module.rb @@ -7,13 +7,13 @@ module Azure::Profiles::Latest module Resources module Mgmt + Operations = Azure::Resources::Mgmt::V2018_05_01::Operations Deployments = Azure::Resources::Mgmt::V2018_05_01::Deployments Providers = Azure::Resources::Mgmt::V2018_05_01::Providers ResourceGroups = Azure::Resources::Mgmt::V2018_05_01::ResourceGroups Tags = Azure::Resources::Mgmt::V2018_05_01::Tags - DeploymentOperations = Azure::Resources::Mgmt::V2018_05_01::DeploymentOperations Resources = Azure::Resources::Mgmt::V2018_05_01::Resources - Operations = Azure::Resources::Mgmt::V2018_05_01::Operations + DeploymentOperations = Azure::Resources::Mgmt::V2018_05_01::DeploymentOperations module Models GenericResourceFilter = Azure::Resources::Mgmt::V2018_05_01::Models::GenericResourceFilter @@ -30,12 +30,12 @@ module Models Provider = Azure::Resources::Mgmt::V2018_05_01::Models::Provider ResourceGroupListResult = Azure::Resources::Mgmt::V2018_05_01::Models::ResourceGroupListResult ResourcesMoveInfo = Azure::Resources::Mgmt::V2018_05_01::Models::ResourcesMoveInfo - Dependency = Azure::Resources::Mgmt::V2018_05_01::Models::Dependency - ExportTemplateRequest = Azure::Resources::Mgmt::V2018_05_01::Models::ExportTemplateRequest - DeploymentExtended = Azure::Resources::Mgmt::V2018_05_01::Models::DeploymentExtended DeploymentPropertiesExtended = Azure::Resources::Mgmt::V2018_05_01::Models::DeploymentPropertiesExtended + ExportTemplateRequest = Azure::Resources::Mgmt::V2018_05_01::Models::ExportTemplateRequest + Dependency = Azure::Resources::Mgmt::V2018_05_01::Models::Dependency TagCount = Azure::Resources::Mgmt::V2018_05_01::Models::TagCount ProviderListResult = Azure::Resources::Mgmt::V2018_05_01::Models::ProviderListResult + DeploymentExtended = Azure::Resources::Mgmt::V2018_05_01::Models::DeploymentExtended ResourceGroupFilter = Azure::Resources::Mgmt::V2018_05_01::Models::ResourceGroupFilter TagDetails = Azure::Resources::Mgmt::V2018_05_01::Models::TagDetails TagValue = Azure::Resources::Mgmt::V2018_05_01::Models::TagValue @@ -73,7 +73,7 @@ module Models end class ResourcesManagementClass - attr_reader :deployments, :providers, :resource_groups, :tags, :deployment_operations, :resources, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :deployments, :providers, :resource_groups, :tags, :resources, :deployment_operations, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -83,13 +83,13 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) + @operations = @client_0.operations @deployments = @client_0.deployments @providers = @client_0.providers @resource_groups = @client_0.resource_groups @tags = @client_0.tags - @deployment_operations = @client_0.deployment_operations @resources = @client_0.resources - @operations = @client_0.operations + @deployment_operations = @client_0.deployment_operations @model_classes = ModelClasses.new end @@ -150,17 +150,14 @@ def resource_group_list_result def resources_move_info Azure::Resources::Mgmt::V2018_05_01::Models::ResourcesMoveInfo end - def dependency - Azure::Resources::Mgmt::V2018_05_01::Models::Dependency + def deployment_properties_extended + Azure::Resources::Mgmt::V2018_05_01::Models::DeploymentPropertiesExtended end def export_template_request Azure::Resources::Mgmt::V2018_05_01::Models::ExportTemplateRequest end - def deployment_extended - Azure::Resources::Mgmt::V2018_05_01::Models::DeploymentExtended - end - def deployment_properties_extended - Azure::Resources::Mgmt::V2018_05_01::Models::DeploymentPropertiesExtended + def dependency + Azure::Resources::Mgmt::V2018_05_01::Models::Dependency end def tag_count Azure::Resources::Mgmt::V2018_05_01::Models::TagCount @@ -168,6 +165,9 @@ def tag_count def provider_list_result Azure::Resources::Mgmt::V2018_05_01::Models::ProviderListResult end + def deployment_extended + Azure::Resources::Mgmt::V2018_05_01::Models::DeploymentExtended + end def resource_group_filter Azure::Resources::Mgmt::V2018_05_01::Models::ResourceGroupFilter end diff --git a/azure_sdk/lib/latest/modules/resourcesmanagement_profile_module.rb b/azure_sdk/lib/latest/modules/resourcesmanagement_profile_module.rb index 580e5c80af..242eb63a73 100644 --- a/azure_sdk/lib/latest/modules/resourcesmanagement_profile_module.rb +++ b/azure_sdk/lib/latest/modules/resourcesmanagement_profile_module.rb @@ -7,9 +7,9 @@ module Azure::Profiles::Latest module ResourcesManagement module Mgmt + ManagementGroups = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::ManagementGroups ManagementGroupSubscriptions = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::ManagementGroupSubscriptions Entities = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Entities - ManagementGroups = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::ManagementGroups Operations = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Operations module Models @@ -17,33 +17,33 @@ module Models Type = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::Type Operation = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::Operation OperationListResult = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::OperationListResult - OperationResults = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::OperationResults + OperationDisplayProperties = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::OperationDisplayProperties EntityParentGroupInfo = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::EntityParentGroupInfo EntityInfo = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::EntityInfo - OperationDisplayProperties = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::OperationDisplayProperties TenantBackfillStatusResult = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::TenantBackfillStatusResult - ManagementGroupListResult = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::ManagementGroupListResult + EntityListResult = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::EntityListResult + OperationResults = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::OperationResults CheckNameAvailabilityResult = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::CheckNameAvailabilityResult EntityHierarchyItem = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::EntityHierarchyItem - ManagementGroupDetails = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::ManagementGroupDetails + PatchManagementGroupRequest = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::PatchManagementGroupRequest ManagementGroup = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::ManagementGroup CreateManagementGroupDetails = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::CreateManagementGroupDetails ParentGroupInfo = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::ParentGroupInfo CreateManagementGroupChildInfo = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::CreateManagementGroupChildInfo CreateManagementGroupRequest = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::CreateManagementGroupRequest ManagementGroupChildInfo = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::ManagementGroupChildInfo - CreateParentGroupInfo = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::CreateParentGroupInfo + ManagementGroupListResult = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::ManagementGroupListResult CheckNameAvailabilityRequest = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::CheckNameAvailabilityRequest - ManagementGroupInfo = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::ManagementGroupInfo - PatchManagementGroupRequest = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::PatchManagementGroupRequest - EntityListResult = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::EntityListResult + ManagementGroupDetails = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::ManagementGroupDetails Reason = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::Reason + CreateParentGroupInfo = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::CreateParentGroupInfo + ManagementGroupInfo = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::ManagementGroupInfo Status = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::Status ErrorResponse = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::ErrorResponse end class ResourcesManagementManagementClass - attr_reader :management_group_subscriptions, :entities, :management_groups, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :management_groups, :management_group_subscriptions, :entities, :operations, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -53,9 +53,9 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) + @management_groups = @client_0.management_groups @management_group_subscriptions = @client_0.management_group_subscriptions @entities = @client_0.entities - @management_groups = @client_0.management_groups @operations = @client_0.operations @model_classes = ModelClasses.new @@ -87,8 +87,8 @@ def operation def operation_list_result Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::OperationListResult end - def operation_results - Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::OperationResults + def operation_display_properties + Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::OperationDisplayProperties end def entity_parent_group_info Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::EntityParentGroupInfo @@ -96,14 +96,14 @@ def entity_parent_group_info def entity_info Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::EntityInfo end - def operation_display_properties - Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::OperationDisplayProperties - end def tenant_backfill_status_result Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::TenantBackfillStatusResult end - def management_group_list_result - Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::ManagementGroupListResult + def entity_list_result + Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::EntityListResult + end + def operation_results + Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::OperationResults end def check_name_availability_result Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::CheckNameAvailabilityResult @@ -111,8 +111,8 @@ def check_name_availability_result def entity_hierarchy_item Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::EntityHierarchyItem end - def management_group_details - Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::ManagementGroupDetails + def patch_management_group_request + Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::PatchManagementGroupRequest end def management_group Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::ManagementGroup @@ -132,24 +132,24 @@ def create_management_group_request def management_group_child_info Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::ManagementGroupChildInfo end - def create_parent_group_info - Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::CreateParentGroupInfo + def management_group_list_result + Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::ManagementGroupListResult end def check_name_availability_request Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::CheckNameAvailabilityRequest end - def management_group_info - Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::ManagementGroupInfo - end - def patch_management_group_request - Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::PatchManagementGroupRequest - end - def entity_list_result - Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::EntityListResult + def management_group_details + Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::ManagementGroupDetails end def reason Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::Reason end + def create_parent_group_info + Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::CreateParentGroupInfo + end + def management_group_info + Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::ManagementGroupInfo + end def status Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::Status end diff --git a/azure_sdk/lib/latest/modules/scheduler_profile_module.rb b/azure_sdk/lib/latest/modules/scheduler_profile_module.rb index df5100af69..b9a11b7bc9 100644 --- a/azure_sdk/lib/latest/modules/scheduler_profile_module.rb +++ b/azure_sdk/lib/latest/modules/scheduler_profile_module.rb @@ -11,6 +11,7 @@ module Mgmt JobCollections = Azure::Scheduler::Mgmt::V2016_03_01::JobCollections module Models + JobListResult = Azure::Scheduler::Mgmt::V2016_03_01::Models::JobListResult RetryPolicy = Azure::Scheduler::Mgmt::V2016_03_01::Models::RetryPolicy JobState = Azure::Scheduler::Mgmt::V2016_03_01::Models::JobState JobRecurrence = Azure::Scheduler::Mgmt::V2016_03_01::Models::JobRecurrence @@ -30,21 +31,21 @@ module Models JobStatus = Azure::Scheduler::Mgmt::V2016_03_01::Models::JobStatus JobHistoryFilter = Azure::Scheduler::Mgmt::V2016_03_01::Models::JobHistoryFilter JobMaxRecurrence = Azure::Scheduler::Mgmt::V2016_03_01::Models::JobMaxRecurrence - JobErrorAction = Azure::Scheduler::Mgmt::V2016_03_01::Models::JobErrorAction JobStateFilter = Azure::Scheduler::Mgmt::V2016_03_01::Models::JobStateFilter JobRecurrenceScheduleMonthlyOccurrence = Azure::Scheduler::Mgmt::V2016_03_01::Models::JobRecurrenceScheduleMonthlyOccurrence ServiceBusMessage = Azure::Scheduler::Mgmt::V2016_03_01::Models::ServiceBusMessage + JobErrorAction = Azure::Scheduler::Mgmt::V2016_03_01::Models::JobErrorAction JobCollectionListResult = Azure::Scheduler::Mgmt::V2016_03_01::Models::JobCollectionListResult ServiceBusAuthentication = Azure::Scheduler::Mgmt::V2016_03_01::Models::ServiceBusAuthentication ServiceBusQueueMessage = Azure::Scheduler::Mgmt::V2016_03_01::Models::ServiceBusQueueMessage ServiceBusTopicMessage = Azure::Scheduler::Mgmt::V2016_03_01::Models::ServiceBusTopicMessage ClientCertAuthentication = Azure::Scheduler::Mgmt::V2016_03_01::Models::ClientCertAuthentication + OAuthAuthentication = Azure::Scheduler::Mgmt::V2016_03_01::Models::OAuthAuthentication SkuDefinition = Azure::Scheduler::Mgmt::V2016_03_01::Models::SkuDefinition JobCollectionState = Azure::Scheduler::Mgmt::V2016_03_01::Models::JobCollectionState - BasicAuthentication = Azure::Scheduler::Mgmt::V2016_03_01::Models::BasicAuthentication RetryType = Azure::Scheduler::Mgmt::V2016_03_01::Models::RetryType JobScheduleDay = Azure::Scheduler::Mgmt::V2016_03_01::Models::JobScheduleDay - OAuthAuthentication = Azure::Scheduler::Mgmt::V2016_03_01::Models::OAuthAuthentication + BasicAuthentication = Azure::Scheduler::Mgmt::V2016_03_01::Models::BasicAuthentication JobExecutionStatus = Azure::Scheduler::Mgmt::V2016_03_01::Models::JobExecutionStatus ServiceBusAuthenticationType = Azure::Scheduler::Mgmt::V2016_03_01::Models::ServiceBusAuthenticationType RecurrenceFrequency = Azure::Scheduler::Mgmt::V2016_03_01::Models::RecurrenceFrequency @@ -54,7 +55,6 @@ module Models JobActionType = Azure::Scheduler::Mgmt::V2016_03_01::Models::JobActionType Sku = Azure::Scheduler::Mgmt::V2016_03_01::Models::Sku JobProperties = Azure::Scheduler::Mgmt::V2016_03_01::Models::JobProperties - JobListResult = Azure::Scheduler::Mgmt::V2016_03_01::Models::JobListResult end class SchedulerManagementClass @@ -88,6 +88,9 @@ def method_missing(method, *args) end class ModelClasses + def job_list_result + Azure::Scheduler::Mgmt::V2016_03_01::Models::JobListResult + end def retry_policy Azure::Scheduler::Mgmt::V2016_03_01::Models::RetryPolicy end @@ -145,9 +148,6 @@ def job_history_filter def job_max_recurrence Azure::Scheduler::Mgmt::V2016_03_01::Models::JobMaxRecurrence end - def job_error_action - Azure::Scheduler::Mgmt::V2016_03_01::Models::JobErrorAction - end def job_state_filter Azure::Scheduler::Mgmt::V2016_03_01::Models::JobStateFilter end @@ -157,6 +157,9 @@ def job_recurrence_schedule_monthly_occurrence def service_bus_message Azure::Scheduler::Mgmt::V2016_03_01::Models::ServiceBusMessage end + def job_error_action + Azure::Scheduler::Mgmt::V2016_03_01::Models::JobErrorAction + end def job_collection_list_result Azure::Scheduler::Mgmt::V2016_03_01::Models::JobCollectionListResult end @@ -172,23 +175,23 @@ def service_bus_topic_message def client_cert_authentication Azure::Scheduler::Mgmt::V2016_03_01::Models::ClientCertAuthentication end + def oauth_authentication + Azure::Scheduler::Mgmt::V2016_03_01::Models::OAuthAuthentication + end def sku_definition Azure::Scheduler::Mgmt::V2016_03_01::Models::SkuDefinition end def job_collection_state Azure::Scheduler::Mgmt::V2016_03_01::Models::JobCollectionState end - def basic_authentication - Azure::Scheduler::Mgmt::V2016_03_01::Models::BasicAuthentication - end def retry_type Azure::Scheduler::Mgmt::V2016_03_01::Models::RetryType end def job_schedule_day Azure::Scheduler::Mgmt::V2016_03_01::Models::JobScheduleDay end - def oauth_authentication - Azure::Scheduler::Mgmt::V2016_03_01::Models::OAuthAuthentication + def basic_authentication + Azure::Scheduler::Mgmt::V2016_03_01::Models::BasicAuthentication end def job_execution_status Azure::Scheduler::Mgmt::V2016_03_01::Models::JobExecutionStatus @@ -217,9 +220,6 @@ def sku def job_properties Azure::Scheduler::Mgmt::V2016_03_01::Models::JobProperties end - def job_list_result - Azure::Scheduler::Mgmt::V2016_03_01::Models::JobListResult - end end end end diff --git a/azure_sdk/lib/latest/modules/search_profile_module.rb b/azure_sdk/lib/latest/modules/search_profile_module.rb index f188a22c66..e0e2b2d130 100644 --- a/azure_sdk/lib/latest/modules/search_profile_module.rb +++ b/azure_sdk/lib/latest/modules/search_profile_module.rb @@ -7,12 +7,13 @@ module Azure::Profiles::Latest module Search module Mgmt + Operations = Azure::Search::Mgmt::V2015_08_19::Operations Services = Azure::Search::Mgmt::V2015_08_19::Services AdminKeys = Azure::Search::Mgmt::V2015_08_19::AdminKeys QueryKeys = Azure::Search::Mgmt::V2015_08_19::QueryKeys - Operations = Azure::Search::Mgmt::V2015_08_19::Operations module Models + CheckNameAvailabilityInput = Azure::Search::Mgmt::V2015_08_19::Models::CheckNameAvailabilityInput CheckNameAvailabilityOutput = Azure::Search::Mgmt::V2015_08_19::Models::CheckNameAvailabilityOutput SkuName = Azure::Search::Mgmt::V2015_08_19::Models::SkuName Resource = Azure::Search::Mgmt::V2015_08_19::Models::Resource @@ -30,11 +31,10 @@ module Models AdminKeyKind = Azure::Search::Mgmt::V2015_08_19::Models::AdminKeyKind SearchServiceStatus = Azure::Search::Mgmt::V2015_08_19::Models::SearchServiceStatus Identity = Azure::Search::Mgmt::V2015_08_19::Models::Identity - CheckNameAvailabilityInput = Azure::Search::Mgmt::V2015_08_19::Models::CheckNameAvailabilityInput end class SearchManagementClass - attr_reader :services, :admin_keys, :query_keys, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :services, :admin_keys, :query_keys, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -44,10 +44,10 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) + @operations = @client_0.operations @services = @client_0.services @admin_keys = @client_0.admin_keys @query_keys = @client_0.query_keys - @operations = @client_0.operations @model_classes = ModelClasses.new end @@ -66,6 +66,9 @@ def method_missing(method, *args) end class ModelClasses + def check_name_availability_input + Azure::Search::Mgmt::V2015_08_19::Models::CheckNameAvailabilityInput + end def check_name_availability_output Azure::Search::Mgmt::V2015_08_19::Models::CheckNameAvailabilityOutput end @@ -117,9 +120,6 @@ def search_service_status def identity Azure::Search::Mgmt::V2015_08_19::Models::Identity end - def check_name_availability_input - Azure::Search::Mgmt::V2015_08_19::Models::CheckNameAvailabilityInput - end end end end diff --git a/azure_sdk/lib/latest/modules/security_profile_module.rb b/azure_sdk/lib/latest/modules/security_profile_module.rb index ebb0774a5f..b1bc802508 100644 --- a/azure_sdk/lib/latest/modules/security_profile_module.rb +++ b/azure_sdk/lib/latest/modules/security_profile_module.rb @@ -7,13 +7,14 @@ module Azure::Profiles::Latest module Security module Mgmt + WorkspaceSettings = Azure::Security::Mgmt::V2017_08_01_preview::WorkspaceSettings AutoProvisioningSettings = Azure::Security::Mgmt::V2017_08_01_preview::AutoProvisioningSettings Compliances = Azure::Security::Mgmt::V2017_08_01_preview::Compliances Pricings = Azure::Security::Mgmt::V2017_08_01_preview::Pricings SecurityContacts = Azure::Security::Mgmt::V2017_08_01_preview::SecurityContacts - WorkspaceSettings = Azure::Security::Mgmt::V2017_08_01_preview::WorkspaceSettings module Models + AlertsToAdmins = Azure::Security::Mgmt::V2017_08_01_preview::Models::AlertsToAdmins PricingTier = Azure::Security::Mgmt::V2017_08_01_preview::Models::PricingTier AutoProvision = Azure::Security::Mgmt::V2017_08_01_preview::Models::AutoProvision Resource = Azure::Security::Mgmt::V2017_08_01_preview::Models::Resource @@ -29,11 +30,10 @@ module Models AutoProvisioningSetting = Azure::Security::Mgmt::V2017_08_01_preview::Models::AutoProvisioningSetting Compliance = Azure::Security::Mgmt::V2017_08_01_preview::Models::Compliance AlertNotifications = Azure::Security::Mgmt::V2017_08_01_preview::Models::AlertNotifications - AlertsToAdmins = Azure::Security::Mgmt::V2017_08_01_preview::Models::AlertsToAdmins end class SecurityManagementClass - attr_reader :auto_provisioning_settings, :compliances, :pricings, :security_contacts, :workspace_settings, :configurable, :base_url, :options, :model_classes + attr_reader :workspace_settings, :auto_provisioning_settings, :compliances, :pricings, :security_contacts, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -43,11 +43,11 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) + @workspace_settings = @client_0.workspace_settings @auto_provisioning_settings = @client_0.auto_provisioning_settings @compliances = @client_0.compliances @pricings = @client_0.pricings @security_contacts = @client_0.security_contacts - @workspace_settings = @client_0.workspace_settings @model_classes = ModelClasses.new end @@ -66,6 +66,9 @@ def method_missing(method, *args) end class ModelClasses + def alerts_to_admins + Azure::Security::Mgmt::V2017_08_01_preview::Models::AlertsToAdmins + end def pricing_tier Azure::Security::Mgmt::V2017_08_01_preview::Models::PricingTier end @@ -111,9 +114,6 @@ def compliance def alert_notifications Azure::Security::Mgmt::V2017_08_01_preview::Models::AlertNotifications end - def alerts_to_admins - Azure::Security::Mgmt::V2017_08_01_preview::Models::AlertsToAdmins - end end end end diff --git a/azure_sdk/lib/latest/modules/servicebus_profile_module.rb b/azure_sdk/lib/latest/modules/servicebus_profile_module.rb index c80e6f4be0..de1010e33f 100644 --- a/azure_sdk/lib/latest/modules/servicebus_profile_module.rb +++ b/azure_sdk/lib/latest/modules/servicebus_profile_module.rb @@ -32,37 +32,37 @@ module Models PremiumMessagingRegionsListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::PremiumMessagingRegionsListResult ArmDisasterRecoveryListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::ArmDisasterRecoveryListResult SBSubscriptionListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBSubscriptionListResult + OperationDisplay = Azure::ServiceBus::Mgmt::V2017_04_01::Models::OperationDisplay SBAuthorizationRuleListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBAuthorizationRuleListResult CheckNameAvailability = Azure::ServiceBus::Mgmt::V2017_04_01::Models::CheckNameAvailability + PremiumMessagingRegionsProperties = Azure::ServiceBus::Mgmt::V2017_04_01::Models::PremiumMessagingRegionsProperties MessageCountDetails = Azure::ServiceBus::Mgmt::V2017_04_01::Models::MessageCountDetails - OperationDisplay = Azure::ServiceBus::Mgmt::V2017_04_01::Models::OperationDisplay - SBNamespaceListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBNamespaceListResult AccessKeys = Azure::ServiceBus::Mgmt::V2017_04_01::Models::AccessKeys - CaptureDescription = Azure::ServiceBus::Mgmt::V2017_04_01::Models::CaptureDescription + SBNamespaceListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBNamespaceListResult OperationListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::OperationListResult - PremiumMessagingRegionsProperties = Azure::ServiceBus::Mgmt::V2017_04_01::Models::PremiumMessagingRegionsProperties + Operation = Azure::ServiceBus::Mgmt::V2017_04_01::Models::Operation EventHubListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::EventHubListResult AuthorizationRuleProperties = Azure::ServiceBus::Mgmt::V2017_04_01::Models::AuthorizationRuleProperties CheckNameAvailabilityResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::CheckNameAvailabilityResult - Operation = Azure::ServiceBus::Mgmt::V2017_04_01::Models::Operation + CorrelationFilter = Azure::ServiceBus::Mgmt::V2017_04_01::Models::CorrelationFilter SqlFilter = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SqlFilter SBSku = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBSku - CorrelationFilter = Azure::ServiceBus::Mgmt::V2017_04_01::Models::CorrelationFilter + CaptureDescription = Azure::ServiceBus::Mgmt::V2017_04_01::Models::CaptureDescription RegenerateAccessKeyParameters = Azure::ServiceBus::Mgmt::V2017_04_01::Models::RegenerateAccessKeyParameters ResourceNamespacePatch = Azure::ServiceBus::Mgmt::V2017_04_01::Models::ResourceNamespacePatch SBNamespaceUpdateParameters = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBNamespaceUpdateParameters SBAuthorizationRule = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBAuthorizationRule - RuleListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::RuleListResult Action = Azure::ServiceBus::Mgmt::V2017_04_01::Models::Action + SBNamespace = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBNamespace SBSubscription = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBSubscription Rule = Azure::ServiceBus::Mgmt::V2017_04_01::Models::Rule SBQueue = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBQueue - SBTopic = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBTopic - SBNamespace = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBNamespace + RuleListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::RuleListResult + Eventhub = Azure::ServiceBus::Mgmt::V2017_04_01::Models::Eventhub ArmDisasterRecovery = Azure::ServiceBus::Mgmt::V2017_04_01::Models::ArmDisasterRecovery SqlRuleAction = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SqlRuleAction PremiumMessagingRegions = Azure::ServiceBus::Mgmt::V2017_04_01::Models::PremiumMessagingRegions - Eventhub = Azure::ServiceBus::Mgmt::V2017_04_01::Models::Eventhub + SBTopic = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBTopic ProvisioningStateDR = Azure::ServiceBus::Mgmt::V2017_04_01::Models::ProvisioningStateDR MigrationConfigProperties = Azure::ServiceBus::Mgmt::V2017_04_01::Models::MigrationConfigProperties FilterType = Azure::ServiceBus::Mgmt::V2017_04_01::Models::FilterType @@ -150,32 +150,32 @@ def arm_disaster_recovery_list_result def sbsubscription_list_result Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBSubscriptionListResult end + def operation_display + Azure::ServiceBus::Mgmt::V2017_04_01::Models::OperationDisplay + end def sbauthorization_rule_list_result Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBAuthorizationRuleListResult end def check_name_availability Azure::ServiceBus::Mgmt::V2017_04_01::Models::CheckNameAvailability end + def premium_messaging_regions_properties + Azure::ServiceBus::Mgmt::V2017_04_01::Models::PremiumMessagingRegionsProperties + end def message_count_details Azure::ServiceBus::Mgmt::V2017_04_01::Models::MessageCountDetails end - def operation_display - Azure::ServiceBus::Mgmt::V2017_04_01::Models::OperationDisplay - end - def sbnamespace_list_result - Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBNamespaceListResult - end def access_keys Azure::ServiceBus::Mgmt::V2017_04_01::Models::AccessKeys end - def capture_description - Azure::ServiceBus::Mgmt::V2017_04_01::Models::CaptureDescription + def sbnamespace_list_result + Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBNamespaceListResult end def operation_list_result Azure::ServiceBus::Mgmt::V2017_04_01::Models::OperationListResult end - def premium_messaging_regions_properties - Azure::ServiceBus::Mgmt::V2017_04_01::Models::PremiumMessagingRegionsProperties + def operation + Azure::ServiceBus::Mgmt::V2017_04_01::Models::Operation end def event_hub_list_result Azure::ServiceBus::Mgmt::V2017_04_01::Models::EventHubListResult @@ -186,8 +186,8 @@ def authorization_rule_properties def check_name_availability_result Azure::ServiceBus::Mgmt::V2017_04_01::Models::CheckNameAvailabilityResult end - def operation - Azure::ServiceBus::Mgmt::V2017_04_01::Models::Operation + def correlation_filter + Azure::ServiceBus::Mgmt::V2017_04_01::Models::CorrelationFilter end def sql_filter Azure::ServiceBus::Mgmt::V2017_04_01::Models::SqlFilter @@ -195,8 +195,8 @@ def sql_filter def sbsku Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBSku end - def correlation_filter - Azure::ServiceBus::Mgmt::V2017_04_01::Models::CorrelationFilter + def capture_description + Azure::ServiceBus::Mgmt::V2017_04_01::Models::CaptureDescription end def regenerate_access_key_parameters Azure::ServiceBus::Mgmt::V2017_04_01::Models::RegenerateAccessKeyParameters @@ -210,12 +210,12 @@ def sbnamespace_update_parameters def sbauthorization_rule Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBAuthorizationRule end - def rule_list_result - Azure::ServiceBus::Mgmt::V2017_04_01::Models::RuleListResult - end def action Azure::ServiceBus::Mgmt::V2017_04_01::Models::Action end + def sbnamespace + Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBNamespace + end def sbsubscription Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBSubscription end @@ -225,11 +225,11 @@ def rule def sbqueue Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBQueue end - def sbtopic - Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBTopic + def rule_list_result + Azure::ServiceBus::Mgmt::V2017_04_01::Models::RuleListResult end - def sbnamespace - Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBNamespace + def eventhub + Azure::ServiceBus::Mgmt::V2017_04_01::Models::Eventhub end def arm_disaster_recovery Azure::ServiceBus::Mgmt::V2017_04_01::Models::ArmDisasterRecovery @@ -240,8 +240,8 @@ def sql_rule_action def premium_messaging_regions Azure::ServiceBus::Mgmt::V2017_04_01::Models::PremiumMessagingRegions end - def eventhub - Azure::ServiceBus::Mgmt::V2017_04_01::Models::Eventhub + def sbtopic + Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBTopic end def provisioning_state_dr Azure::ServiceBus::Mgmt::V2017_04_01::Models::ProvisioningStateDR diff --git a/azure_sdk/lib/latest/modules/servicefabric_profile_module.rb b/azure_sdk/lib/latest/modules/servicefabric_profile_module.rb index 7c8027648b..ba9135df47 100644 --- a/azure_sdk/lib/latest/modules/servicefabric_profile_module.rb +++ b/azure_sdk/lib/latest/modules/servicefabric_profile_module.rb @@ -11,9 +11,9 @@ module Mgmt Service = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Service Version = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Version Application = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Application + Operations = Azure::ServiceFabric::Mgmt::V2018_02_01::Operations Clusters = Azure::ServiceFabric::Mgmt::V2018_02_01::Clusters ClusterVersions = Azure::ServiceFabric::Mgmt::V2018_02_01::ClusterVersions - Operations = Azure::ServiceFabric::Mgmt::V2018_02_01::Operations module Models ServicePropertiesBase = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ServicePropertiesBase @@ -26,26 +26,27 @@ module Models PartitionSchemeDescription = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::PartitionSchemeDescription RollingUpgradeMonitoringPolicy = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::RollingUpgradeMonitoringPolicy ApplicationTypeResourceList = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ApplicationTypeResourceList - ApplicationResourceList = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ApplicationResourceList ApplicationUpgradePolicy = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ApplicationUpgradePolicy VersionResourceList = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::VersionResourceList ServiceResourceList = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ServiceResourceList NamedPartitionSchemeDescription = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::NamedPartitionSchemeDescription UniformInt64RangePartitionSchemeDescription = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::UniformInt64RangePartitionSchemeDescription SingletonPartitionSchemeDescription = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::SingletonPartitionSchemeDescription - ApplicationTypeResource = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ApplicationTypeResource VersionResource = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::VersionResource - ApplicationResource = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ApplicationResource + ApplicationTypeResource = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ApplicationTypeResource ApplicationResourceUpdate = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ApplicationResourceUpdate - ServiceProperties = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ServiceProperties + ApplicationResource = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ApplicationResource ServiceResource = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ServiceResource + ApplicationResourceList = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ApplicationResourceList + ServiceResourceUpdate = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ServiceResourceUpdate ServiceUpdateProperties = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ServiceUpdateProperties StatelessServiceProperties = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::StatelessServiceProperties StatelessServiceUpdateProperties = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::StatelessServiceUpdateProperties - ServiceResourceUpdate = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ServiceResourceUpdate - StatefulServiceUpdateProperties = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::StatefulServiceUpdateProperties StatefulServiceProperties = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::StatefulServiceProperties + ServiceProperties = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ServiceProperties + StatefulServiceUpdateProperties = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::StatefulServiceUpdateProperties ProxyResource = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ProxyResource + SettingsParameterDescription = Azure::ServiceFabric::Mgmt::V2018_02_01::Models::SettingsParameterDescription ApplicationHealthPolicy = Azure::ServiceFabric::Mgmt::V2018_02_01::Models::ApplicationHealthPolicy SettingsSectionDescription = Azure::ServiceFabric::Mgmt::V2018_02_01::Models::SettingsSectionDescription Cluster = Azure::ServiceFabric::Mgmt::V2018_02_01::Models::Cluster @@ -76,11 +77,10 @@ module Models ClientCertificateThumbprint = Azure::ServiceFabric::Mgmt::V2018_02_01::Models::ClientCertificateThumbprint ClusterUpgradeDeltaHealthPolicy = Azure::ServiceFabric::Mgmt::V2018_02_01::Models::ClusterUpgradeDeltaHealthPolicy ClusterVersionDetails = Azure::ServiceFabric::Mgmt::V2018_02_01::Models::ClusterVersionDetails - SettingsParameterDescription = Azure::ServiceFabric::Mgmt::V2018_02_01::Models::SettingsParameterDescription end class ServiceFabricManagementClass - attr_reader :application_type, :service, :version, :application, :clusters, :cluster_versions, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :application_type, :service, :version, :application, :operations, :clusters, :cluster_versions, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -100,9 +100,9 @@ def initialize(configurable, base_url=nil, options=nil) @client_1.subscription_id = configurable.subscription_id end add_telemetry(@client_1) + @operations = @client_1.operations @clusters = @client_1.clusters @cluster_versions = @client_1.cluster_versions - @operations = @client_1.operations @model_classes = ModelClasses.new end @@ -153,9 +153,6 @@ def rolling_upgrade_monitoring_policy def application_type_resource_list Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ApplicationTypeResourceList end - def application_resource_list - Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ApplicationResourceList - end def application_upgrade_policy Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ApplicationUpgradePolicy end @@ -174,24 +171,27 @@ def uniform_int64_range_partition_scheme_description def singleton_partition_scheme_description Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::SingletonPartitionSchemeDescription end - def application_type_resource - Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ApplicationTypeResource - end def version_resource Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::VersionResource end - def application_resource - Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ApplicationResource + def application_type_resource + Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ApplicationTypeResource end def application_resource_update Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ApplicationResourceUpdate end - def service_properties - Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ServiceProperties + def application_resource + Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ApplicationResource end def service_resource Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ServiceResource end + def application_resource_list + Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ApplicationResourceList + end + def service_resource_update + Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ServiceResourceUpdate + end def service_update_properties Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ServiceUpdateProperties end @@ -201,18 +201,21 @@ def stateless_service_properties def stateless_service_update_properties Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::StatelessServiceUpdateProperties end - def service_resource_update - Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ServiceResourceUpdate + def stateful_service_properties + Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::StatefulServiceProperties + end + def service_properties + Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ServiceProperties end def stateful_service_update_properties Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::StatefulServiceUpdateProperties end - def stateful_service_properties - Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::StatefulServiceProperties - end def proxy_resource Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ProxyResource end + def settings_parameter_description + Azure::ServiceFabric::Mgmt::V2018_02_01::Models::SettingsParameterDescription + end def application_health_policy Azure::ServiceFabric::Mgmt::V2018_02_01::Models::ApplicationHealthPolicy end @@ -303,9 +306,6 @@ def cluster_upgrade_delta_health_policy def cluster_version_details Azure::ServiceFabric::Mgmt::V2018_02_01::Models::ClusterVersionDetails end - def settings_parameter_description - Azure::ServiceFabric::Mgmt::V2018_02_01::Models::SettingsParameterDescription - end end end end diff --git a/azure_sdk/lib/latest/modules/signalr_profile_module.rb b/azure_sdk/lib/latest/modules/signalr_profile_module.rb index 90526ca4d4..2b1aab3c41 100644 --- a/azure_sdk/lib/latest/modules/signalr_profile_module.rb +++ b/azure_sdk/lib/latest/modules/signalr_profile_module.rb @@ -7,9 +7,9 @@ module Azure::Profiles::Latest module Signalr module Mgmt + Operations = Azure::Signalr::Mgmt::V2018_03_01_preview::Operations Usages = Azure::Signalr::Mgmt::V2018_03_01_preview::Usages SignalR = Azure::Signalr::Mgmt::V2018_03_01_preview::SignalR - Operations = Azure::Signalr::Mgmt::V2018_03_01_preview::Operations module Models Resource = Azure::Signalr::Mgmt::V2018_03_01_preview::Models::Resource @@ -29,18 +29,18 @@ module Models SignalRCreateOrUpdateProperties = Azure::Signalr::Mgmt::V2018_03_01_preview::Models::SignalRCreateOrUpdateProperties SignalRKeys = Azure::Signalr::Mgmt::V2018_03_01_preview::Models::SignalRKeys OperationProperties = Azure::Signalr::Mgmt::V2018_03_01_preview::Models::OperationProperties + TrackedResource = Azure::Signalr::Mgmt::V2018_03_01_preview::Models::TrackedResource NameAvailability = Azure::Signalr::Mgmt::V2018_03_01_preview::Models::NameAvailability - SignalRUsage = Azure::Signalr::Mgmt::V2018_03_01_preview::Models::SignalRUsage SignalRUpdateParameters = Azure::Signalr::Mgmt::V2018_03_01_preview::Models::SignalRUpdateParameters SignalRUsageName = Azure::Signalr::Mgmt::V2018_03_01_preview::Models::SignalRUsageName - SignalRResource = Azure::Signalr::Mgmt::V2018_03_01_preview::Models::SignalRResource + SignalRUsage = Azure::Signalr::Mgmt::V2018_03_01_preview::Models::SignalRUsage SignalRCreateParameters = Azure::Signalr::Mgmt::V2018_03_01_preview::Models::SignalRCreateParameters - TrackedResource = Azure::Signalr::Mgmt::V2018_03_01_preview::Models::TrackedResource SignalRSkuTier = Azure::Signalr::Mgmt::V2018_03_01_preview::Models::SignalRSkuTier + SignalRResource = Azure::Signalr::Mgmt::V2018_03_01_preview::Models::SignalRResource end class SignalrManagementClass - attr_reader :usages, :signal_r, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :usages, :signal_r, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -50,9 +50,9 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) + @operations = @client_0.operations @usages = @client_0.usages @signal_r = @client_0.signal_r - @operations = @client_0.operations @model_classes = ModelClasses.new end @@ -122,30 +122,30 @@ def signal_rkeys def operation_properties Azure::Signalr::Mgmt::V2018_03_01_preview::Models::OperationProperties end + def tracked_resource + Azure::Signalr::Mgmt::V2018_03_01_preview::Models::TrackedResource + end def name_availability Azure::Signalr::Mgmt::V2018_03_01_preview::Models::NameAvailability end - def signal_rusage - Azure::Signalr::Mgmt::V2018_03_01_preview::Models::SignalRUsage - end def signal_rupdate_parameters Azure::Signalr::Mgmt::V2018_03_01_preview::Models::SignalRUpdateParameters end def signal_rusage_name Azure::Signalr::Mgmt::V2018_03_01_preview::Models::SignalRUsageName end - def signal_rresource - Azure::Signalr::Mgmt::V2018_03_01_preview::Models::SignalRResource + def signal_rusage + Azure::Signalr::Mgmt::V2018_03_01_preview::Models::SignalRUsage end def signal_rcreate_parameters Azure::Signalr::Mgmt::V2018_03_01_preview::Models::SignalRCreateParameters end - def tracked_resource - Azure::Signalr::Mgmt::V2018_03_01_preview::Models::TrackedResource - end def signal_rsku_tier Azure::Signalr::Mgmt::V2018_03_01_preview::Models::SignalRSkuTier end + def signal_rresource + Azure::Signalr::Mgmt::V2018_03_01_preview::Models::SignalRResource + end end end end diff --git a/azure_sdk/lib/latest/modules/spellcheck_profile_module.rb b/azure_sdk/lib/latest/modules/spellcheck_profile_module.rb index 2461820597..4169ff5add 100644 --- a/azure_sdk/lib/latest/modules/spellcheck_profile_module.rb +++ b/azure_sdk/lib/latest/modules/spellcheck_profile_module.rb @@ -16,8 +16,8 @@ module Models Mode = Azure::CognitiveServices::SpellCheck::V1_0::Models::Mode ErrorResponse = Azure::CognitiveServices::SpellCheck::V1_0::Models::ErrorResponse SpellCheck = Azure::CognitiveServices::SpellCheck::V1_0::Models::SpellCheck - ResponseBase = Azure::CognitiveServices::SpellCheck::V1_0::Models::ResponseBase Response = Azure::CognitiveServices::SpellCheck::V1_0::Models::Response + ResponseBase = Azure::CognitiveServices::SpellCheck::V1_0::Models::ResponseBase ActionType = Azure::CognitiveServices::SpellCheck::V1_0::Models::ActionType Identifiable = Azure::CognitiveServices::SpellCheck::V1_0::Models::Identifiable Error = Azure::CognitiveServices::SpellCheck::V1_0::Models::Error @@ -77,12 +77,12 @@ def error_response def spell_check Azure::CognitiveServices::SpellCheck::V1_0::Models::SpellCheck end - def response_base - Azure::CognitiveServices::SpellCheck::V1_0::Models::ResponseBase - end def response Azure::CognitiveServices::SpellCheck::V1_0::Models::Response end + def response_base + Azure::CognitiveServices::SpellCheck::V1_0::Models::ResponseBase + end def action_type Azure::CognitiveServices::SpellCheck::V1_0::Models::ActionType end diff --git a/azure_sdk/lib/latest/modules/sql_profile_module.rb b/azure_sdk/lib/latest/modules/sql_profile_module.rb index 74704f3337..9453d0fc50 100644 --- a/azure_sdk/lib/latest/modules/sql_profile_module.rb +++ b/azure_sdk/lib/latest/modules/sql_profile_module.rb @@ -36,6 +36,7 @@ module Mgmt DatabaseTableAuditingPolicies = Azure::SQL::Mgmt::V2014_04_01::DatabaseTableAuditingPolicies DatabaseUsages = Azure::SQL::Mgmt::V2014_04_01::DatabaseUsages ServerUsages = Azure::SQL::Mgmt::V2014_04_01::ServerUsages + SubscriptionUsages = Azure::SQL::Mgmt::V2015_05_01_preview::SubscriptionUsages FirewallRules = Azure::SQL::Mgmt::V2015_05_01_preview::FirewallRules ServerAdvisors = Azure::SQL::Mgmt::V2015_05_01_preview::ServerAdvisors DatabaseAdvisors = Azure::SQL::Mgmt::V2015_05_01_preview::DatabaseAdvisors @@ -51,7 +52,7 @@ module Mgmt SyncAgents = Azure::SQL::Mgmt::V2015_05_01_preview::SyncAgents SyncGroups = Azure::SQL::Mgmt::V2015_05_01_preview::SyncGroups SyncMembers = Azure::SQL::Mgmt::V2015_05_01_preview::SyncMembers - SubscriptionUsages = Azure::SQL::Mgmt::V2015_05_01_preview::SubscriptionUsages + 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 ManagedDatabases = Azure::SQL::Mgmt::V2017_03_01_preview::ManagedDatabases @@ -59,9 +60,9 @@ module Mgmt BackupLongTermRetentionPolicies = Azure::SQL::Mgmt::V2017_03_01_preview::BackupLongTermRetentionPolicies ServerAutomaticTuningOperations = Azure::SQL::Mgmt::V2017_03_01_preview::ServerAutomaticTuningOperations SensitivityLabels = Azure::SQL::Mgmt::V2017_03_01_preview::SensitivityLabels - ServerSecurityAlertPolicies = Azure::SQL::Mgmt::V2017_03_01_preview::ServerSecurityAlertPolicies - Jobs = Azure::SQL::Mgmt::V2017_03_01_preview::Jobs + DataWarehouseUserActivitiesOperations = Azure::SQL::Mgmt::V2017_03_01_preview::DataWarehouseUserActivitiesOperations ServerDnsAliases = Azure::SQL::Mgmt::V2017_03_01_preview::ServerDnsAliases + ServerSecurityAlertPolicies = Azure::SQL::Mgmt::V2017_03_01_preview::ServerSecurityAlertPolicies RestorePoints = Azure::SQL::Mgmt::V2017_03_01_preview::RestorePoints ExtendedDatabaseBlobAuditingPolicies = Azure::SQL::Mgmt::V2017_03_01_preview::ExtendedDatabaseBlobAuditingPolicies ExtendedServerBlobAuditingPolicies = Azure::SQL::Mgmt::V2017_03_01_preview::ExtendedServerBlobAuditingPolicies @@ -69,13 +70,12 @@ module Mgmt DatabaseBlobAuditingPolicies = Azure::SQL::Mgmt::V2017_03_01_preview::DatabaseBlobAuditingPolicies DatabaseVulnerabilityAssessmentRuleBaselines = Azure::SQL::Mgmt::V2017_03_01_preview::DatabaseVulnerabilityAssessmentRuleBaselines DatabaseVulnerabilityAssessments = Azure::SQL::Mgmt::V2017_03_01_preview::DatabaseVulnerabilityAssessments + Jobs = Azure::SQL::Mgmt::V2017_03_01_preview::Jobs JobAgents = Azure::SQL::Mgmt::V2017_03_01_preview::JobAgents JobCredentials = Azure::SQL::Mgmt::V2017_03_01_preview::JobCredentials - DataWarehouseUserActivitiesOperations = Azure::SQL::Mgmt::V2017_03_01_preview::DataWarehouseUserActivitiesOperations JobExecutions = Azure::SQL::Mgmt::V2017_03_01_preview::JobExecutions JobStepExecutions = Azure::SQL::Mgmt::V2017_03_01_preview::JobStepExecutions JobTargetExecutions = Azure::SQL::Mgmt::V2017_03_01_preview::JobTargetExecutions - JobTargetGroups = Azure::SQL::Mgmt::V2017_03_01_preview::JobTargetGroups ElasticPoolOperations = Azure::SQL::Mgmt::V2017_10_01_preview::ElasticPoolOperations DatabaseVulnerabilityAssessmentScans = Azure::SQL::Mgmt::V2017_10_01_preview::DatabaseVulnerabilityAssessmentScans InstanceFailoverGroups = Azure::SQL::Mgmt::V2017_10_01_preview::InstanceFailoverGroups @@ -88,6 +88,7 @@ module Mgmt Capabilities = Azure::SQL::Mgmt::V2017_10_01_preview::Capabilities module Models + TransparentDataEncryptionActivity = Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivity ElasticPoolActivity = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolActivity DatabaseTableAuditingPolicy = Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseTableAuditingPolicy ServerTableAuditingPolicy = Azure::SQL::Mgmt::V2014_04_01::Models::ServerTableAuditingPolicy @@ -167,17 +168,17 @@ module Models OperationImpact = Azure::SQL::Mgmt::V2014_04_01::Models::OperationImpact MetricDefinitionListResult = Azure::SQL::Mgmt::V2014_04_01::Models::MetricDefinitionListResult MetricAvailability = Azure::SQL::Mgmt::V2014_04_01::Models::MetricAvailability - BackupLongTermRetentionPolicyListResult = Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionPolicyListResult QueryMetric = Azure::SQL::Mgmt::V2014_04_01::Models::QueryMetric + BackupLongTermRetentionPolicyListResult = Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionPolicyListResult 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 Metric = Azure::SQL::Mgmt::V2014_04_01::Models::Metric 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 AdvisorListResult = Azure::SQL::Mgmt::V2014_04_01::Models::AdvisorListResult + QueryStatistic = Azure::SQL::Mgmt::V2014_04_01::Models::QueryStatistic QueryStatisticListResult = Azure::SQL::Mgmt::V2014_04_01::Models::QueryStatisticListResult BackupLongTermRetentionVault = Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionVault TopQueriesListResult = Azure::SQL::Mgmt::V2014_04_01::Models::TopQueriesListResult @@ -200,7 +201,7 @@ module Models ServerCommunicationLink = Azure::SQL::Mgmt::V2014_04_01::Models::ServerCommunicationLink ServiceObjective = Azure::SQL::Mgmt::V2014_04_01::Models::ServiceObjective ElasticPoolDatabaseActivity = Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolDatabaseActivity - TransparentDataEncryptionActivity = Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivity + SyncAgentState = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncAgentState AdvisorStatus = Azure::SQL::Mgmt::V2015_05_01_preview::Models::AdvisorStatus AutoExecuteStatus = Azure::SQL::Mgmt::V2015_05_01_preview::Models::AutoExecuteStatus SyncGroupLogType = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupLogType @@ -279,7 +280,7 @@ module Models ServerKeyType = Azure::SQL::Mgmt::V2015_05_01_preview::Models::ServerKeyType FailoverGroupReplicationRole = Azure::SQL::Mgmt::V2015_05_01_preview::Models::FailoverGroupReplicationRole IdentityType = Azure::SQL::Mgmt::V2015_05_01_preview::Models::IdentityType - SyncAgentState = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncAgentState + JobListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobListResult JobSchedule = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobSchedule JobStepAction = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepAction ManagedDatabaseUpdate = Azure::SQL::Mgmt::V2017_03_01_preview::Models::ManagedDatabaseUpdate @@ -348,7 +349,6 @@ module Models BlobAuditingPolicyState = Azure::SQL::Mgmt::V2017_03_01_preview::Models::BlobAuditingPolicyState AutomaticTuningOptionModeDesired = Azure::SQL::Mgmt::V2017_03_01_preview::Models::AutomaticTuningOptionModeDesired AutomaticTuningOptionModeActual = Azure::SQL::Mgmt::V2017_03_01_preview::Models::AutomaticTuningOptionModeActual - JobListResult = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobListResult CapabilityStatus = Azure::SQL::Mgmt::V2017_10_01_preview::Models::CapabilityStatus PerformanceLevelUnit = Azure::SQL::Mgmt::V2017_10_01_preview::Models::PerformanceLevelUnit SampleName = Azure::SQL::Mgmt::V2017_10_01_preview::Models::SampleName @@ -419,7 +419,7 @@ module Models end class SQLManagementClass - attr_reader :backup_long_term_retention_vaults, :recoverable_databases, :restorable_dropped_databases, :server_connection_policies, :database_threat_detection_policies, :data_masking_policies, :data_masking_rules, :transparent_data_encryption_configurations, :extensions, :disaster_recovery_configurations, :geo_backup_policies, :queries, :query_statistics, :query_texts, :replication_links, :recommended_elastic_pools, :server_azure_adadministrators, :service_objectives, :server_communication_links, :elastic_pool_database_activities, :elastic_pool_activities, :transparent_data_encryptions, :service_tier_advisors, :server_table_auditing_policies, :transparent_data_encryption_activities, :database_connection_policies, :database_table_auditing_policies, :database_usages, :server_usages, :firewall_rules, :server_advisors, :database_advisors, :servers, :operations, :virtual_network_rules, :database_recommended_actions, :database_automatic_tuning_operations, :encryption_protectors, :failover_groups, :managed_instances, :server_keys, :sync_agents, :sync_groups, :sync_members, :subscription_usages, :job_versions, :long_term_retention_backups, :managed_databases, :job_steps, :backup_long_term_retention_policies, :server_automatic_tuning_operations, :sensitivity_labels, :server_security_alert_policies, :jobs, :server_dns_aliases, :restore_points, :extended_database_blob_auditing_policies, :extended_server_blob_auditing_policies, :server_blob_auditing_policies, :database_blob_auditing_policies, :database_vulnerability_assessment_rule_baselines, :database_vulnerability_assessments, :job_agents, :job_credentials, :data_warehouse_user_activities_operations, :job_executions, :job_step_executions, :job_target_executions, :job_target_groups, :elastic_pool_operations, :database_vulnerability_assessment_scans, :instance_failover_groups, :backup_short_term_retention_policies, :tde_certificates, :managed_instance_tde_certificates, :databases, :elastic_pools, :database_operations, :capabilities, :configurable, :base_url, :options, :model_classes + attr_reader :backup_long_term_retention_vaults, :recoverable_databases, :restorable_dropped_databases, :server_connection_policies, :database_threat_detection_policies, :data_masking_policies, :data_masking_rules, :transparent_data_encryption_configurations, :extensions, :disaster_recovery_configurations, :geo_backup_policies, :queries, :query_statistics, :query_texts, :replication_links, :recommended_elastic_pools, :server_azure_adadministrators, :service_objectives, :server_communication_links, :elastic_pool_database_activities, :elastic_pool_activities, :transparent_data_encryptions, :service_tier_advisors, :server_table_auditing_policies, :transparent_data_encryption_activities, :database_connection_policies, :database_table_auditing_policies, :database_usages, :server_usages, :subscription_usages, :firewall_rules, :server_advisors, :database_advisors, :servers, :operations, :virtual_network_rules, :database_recommended_actions, :database_automatic_tuning_operations, :encryption_protectors, :failover_groups, :managed_instances, :server_keys, :sync_agents, :sync_groups, :sync_members, :job_target_groups, :job_versions, :long_term_retention_backups, :managed_databases, :job_steps, :backup_long_term_retention_policies, :server_automatic_tuning_operations, :sensitivity_labels, :data_warehouse_user_activities_operations, :server_dns_aliases, :server_security_alert_policies, :restore_points, :extended_database_blob_auditing_policies, :extended_server_blob_auditing_policies, :server_blob_auditing_policies, :database_blob_auditing_policies, :database_vulnerability_assessment_rule_baselines, :database_vulnerability_assessments, :jobs, :job_agents, :job_credentials, :job_executions, :job_step_executions, :job_target_executions, :elastic_pool_operations, :database_vulnerability_assessment_scans, :instance_failover_groups, :backup_short_term_retention_policies, :tde_certificates, :managed_instance_tde_certificates, :databases, :elastic_pools, :database_operations, :capabilities, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -464,6 +464,7 @@ def initialize(configurable, base_url=nil, options=nil) @client_1.subscription_id = configurable.subscription_id end add_telemetry(@client_1) + @subscription_usages = @client_1.subscription_usages @firewall_rules = @client_1.firewall_rules @server_advisors = @client_1.server_advisors @database_advisors = @client_1.database_advisors @@ -479,13 +480,13 @@ def initialize(configurable, base_url=nil, options=nil) @sync_agents = @client_1.sync_agents @sync_groups = @client_1.sync_groups @sync_members = @client_1.sync_members - @subscription_usages = @client_1.subscription_usages @client_2 = Azure::SQL::Mgmt::V2017_03_01_preview::SqlManagementClient.new(configurable.credentials, base_url, options) if(@client_2.respond_to?(:subscription_id)) @client_2.subscription_id = configurable.subscription_id end add_telemetry(@client_2) + @job_target_groups = @client_2.job_target_groups @job_versions = @client_2.job_versions @long_term_retention_backups = @client_2.long_term_retention_backups @managed_databases = @client_2.managed_databases @@ -493,9 +494,9 @@ def initialize(configurable, base_url=nil, options=nil) @backup_long_term_retention_policies = @client_2.backup_long_term_retention_policies @server_automatic_tuning_operations = @client_2.server_automatic_tuning_operations @sensitivity_labels = @client_2.sensitivity_labels - @server_security_alert_policies = @client_2.server_security_alert_policies - @jobs = @client_2.jobs + @data_warehouse_user_activities_operations = @client_2.data_warehouse_user_activities_operations @server_dns_aliases = @client_2.server_dns_aliases + @server_security_alert_policies = @client_2.server_security_alert_policies @restore_points = @client_2.restore_points @extended_database_blob_auditing_policies = @client_2.extended_database_blob_auditing_policies @extended_server_blob_auditing_policies = @client_2.extended_server_blob_auditing_policies @@ -503,13 +504,12 @@ def initialize(configurable, base_url=nil, options=nil) @database_blob_auditing_policies = @client_2.database_blob_auditing_policies @database_vulnerability_assessment_rule_baselines = @client_2.database_vulnerability_assessment_rule_baselines @database_vulnerability_assessments = @client_2.database_vulnerability_assessments + @jobs = @client_2.jobs @job_agents = @client_2.job_agents @job_credentials = @client_2.job_credentials - @data_warehouse_user_activities_operations = @client_2.data_warehouse_user_activities_operations @job_executions = @client_2.job_executions @job_step_executions = @client_2.job_step_executions @job_target_executions = @client_2.job_target_executions - @job_target_groups = @client_2.job_target_groups @client_3 = Azure::SQL::Mgmt::V2017_10_01_preview::SqlManagementClient.new(configurable.credentials, base_url, options) if(@client_3.respond_to?(:subscription_id)) @@ -550,6 +550,9 @@ def method_missing(method, *args) end class ModelClasses + def transparent_data_encryption_activity + Azure::SQL::Mgmt::V2014_04_01::Models::TransparentDataEncryptionActivity + end def elastic_pool_activity Azure::SQL::Mgmt::V2014_04_01::Models::ElasticPoolActivity end @@ -787,12 +790,12 @@ def metric_definition_list_result def metric_availability Azure::SQL::Mgmt::V2014_04_01::Models::MetricAvailability end - def backup_long_term_retention_policy_list_result - Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionPolicyListResult - end def query_metric Azure::SQL::Mgmt::V2014_04_01::Models::QueryMetric end + def backup_long_term_retention_policy_list_result + Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionPolicyListResult + end def service_tier_advisor_list_result Azure::SQL::Mgmt::V2014_04_01::Models::ServiceTierAdvisorListResult end @@ -802,9 +805,6 @@ def query_interval 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 metric Azure::SQL::Mgmt::V2014_04_01::Models::Metric end @@ -820,6 +820,9 @@ def elastic_pool_dtu_capability def advisor_list_result Azure::SQL::Mgmt::V2014_04_01::Models::AdvisorListResult end + def query_statistic + Azure::SQL::Mgmt::V2014_04_01::Models::QueryStatistic + end def query_statistic_list_result Azure::SQL::Mgmt::V2014_04_01::Models::QueryStatisticListResult end @@ -886,8 +889,8 @@ def service_objective 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 + def sync_agent_state + Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncAgentState end def advisor_status Azure::SQL::Mgmt::V2015_05_01_preview::Models::AdvisorStatus @@ -1123,8 +1126,8 @@ def failover_group_replication_role def identity_type Azure::SQL::Mgmt::V2015_05_01_preview::Models::IdentityType end - def sync_agent_state - Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncAgentState + def job_list_result + Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobListResult end def job_schedule Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobSchedule @@ -1330,9 +1333,6 @@ def automatic_tuning_option_mode_desired def automatic_tuning_option_mode_actual Azure::SQL::Mgmt::V2017_03_01_preview::Models::AutomaticTuningOptionModeActual end - def job_list_result - Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobListResult - end def capability_status Azure::SQL::Mgmt::V2017_10_01_preview::Models::CapabilityStatus end diff --git a/azure_sdk/lib/latest/modules/storage_profile_module.rb b/azure_sdk/lib/latest/modules/storage_profile_module.rb index 807fbcd787..1da1ce6e82 100644 --- a/azure_sdk/lib/latest/modules/storage_profile_module.rb +++ b/azure_sdk/lib/latest/modules/storage_profile_module.rb @@ -7,15 +7,16 @@ module Azure::Profiles::Latest module Storage module Mgmt + Operations = Azure::Storage::Mgmt::V2018_07_01::Operations StorageAccounts = Azure::Storage::Mgmt::V2018_07_01::StorageAccounts Skus = Azure::Storage::Mgmt::V2018_07_01::Skus Usages = Azure::Storage::Mgmt::V2018_07_01::Usages BlobContainers = Azure::Storage::Mgmt::V2018_07_01::BlobContainers - Operations = Azure::Storage::Mgmt::V2018_07_01::Operations module Models ManagementPoliciesRulesSetParameter = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ManagementPoliciesRulesSetParameter StorageAccountManagementPolicies = Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountManagementPolicies + LeaseDuration = Azure::Storage::Mgmt::V2018_07_01::Models::LeaseDuration ProvisioningState = Azure::Storage::Mgmt::V2018_07_01::Models::ProvisioningState StorageAccountCheckNameAvailabilityParameters = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountCheckNameAvailabilityParameters StorageAccountKey = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountKey @@ -33,13 +34,13 @@ module Models SkuTier = Azure::Storage::Mgmt::V2018_07_01::Models::SkuTier Kind = Azure::Storage::Mgmt::V2018_07_01::Models::Kind VirtualNetworkRule = Azure::Storage::Mgmt::V2018_07_01::Models::VirtualNetworkRule - AccessTier = Azure::Storage::Mgmt::V2018_07_01::Models::AccessTier Reason = Azure::Storage::Mgmt::V2018_07_01::Models::Reason - AccountStatus = Azure::Storage::Mgmt::V2018_07_01::Models::AccountStatus + KeyPermission = Azure::Storage::Mgmt::V2018_07_01::Models::KeyPermission State = Azure::Storage::Mgmt::V2018_07_01::Models::State + AccessTier = Azure::Storage::Mgmt::V2018_07_01::Models::AccessTier UsageUnit = Azure::Storage::Mgmt::V2018_07_01::Models::UsageUnit UsageName = Azure::Storage::Mgmt::V2018_07_01::Models::UsageName - KeyPermission = Azure::Storage::Mgmt::V2018_07_01::Models::KeyPermission + AccountStatus = Azure::Storage::Mgmt::V2018_07_01::Models::AccountStatus StorageAccountCreateParameters = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountCreateParameters Permissions = Azure::Storage::Mgmt::V2018_07_01::Models::Permissions StorageAccountUpdateParameters = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountUpdateParameters @@ -68,20 +69,20 @@ module Models ListContainerItem = Azure::Storage::Mgmt::V2018_07_01::Models::ListContainerItem BlobContainer = Azure::Storage::Mgmt::V2018_07_01::Models::BlobContainer Usage = Azure::Storage::Mgmt::V2018_07_01::Models::Usage - Bypass = Azure::Storage::Mgmt::V2018_07_01::Models::Bypass + Action = Azure::Storage::Mgmt::V2018_07_01::Models::Action ReasonCode = Azure::Storage::Mgmt::V2018_07_01::Models::ReasonCode SkuName = Azure::Storage::Mgmt::V2018_07_01::Models::SkuName ImmutabilityPolicy = Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicy - Action = Azure::Storage::Mgmt::V2018_07_01::Models::Action + DefaultAction = Azure::Storage::Mgmt::V2018_07_01::Models::DefaultAction SignedResourceTypes = Azure::Storage::Mgmt::V2018_07_01::Models::SignedResourceTypes KeySource = Azure::Storage::Mgmt::V2018_07_01::Models::KeySource - SignedResource = Azure::Storage::Mgmt::V2018_07_01::Models::SignedResource + Bypass = Azure::Storage::Mgmt::V2018_07_01::Models::Bypass Sku = Azure::Storage::Mgmt::V2018_07_01::Models::Sku Services = Azure::Storage::Mgmt::V2018_07_01::Models::Services HttpProtocol = Azure::Storage::Mgmt::V2018_07_01::Models::HttpProtocol - LeaseDuration = Azure::Storage::Mgmt::V2018_07_01::Models::LeaseDuration + SignedResource = Azure::Storage::Mgmt::V2018_07_01::Models::SignedResource PublicAccess = Azure::Storage::Mgmt::V2018_07_01::Models::PublicAccess - DefaultAction = Azure::Storage::Mgmt::V2018_07_01::Models::DefaultAction + LeaseStatus = Azure::Storage::Mgmt::V2018_07_01::Models::LeaseStatus LeaseState = Azure::Storage::Mgmt::V2018_07_01::Models::LeaseState TrackedResource = Azure::Storage::Mgmt::V2018_07_01::Models::TrackedResource ImmutabilityPolicyState = Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicyState @@ -90,11 +91,10 @@ module Models AzureEntityResource = Azure::Storage::Mgmt::V2018_07_01::Models::AzureEntityResource ProxyResource = Azure::Storage::Mgmt::V2018_07_01::Models::ProxyResource ImmutabilityPolicyUpdateType = Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicyUpdateType - LeaseStatus = Azure::Storage::Mgmt::V2018_07_01::Models::LeaseStatus end class StorageManagementClass - attr_reader :storage_accounts, :skus, :usages, :blob_containers, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :storage_accounts, :skus, :usages, :blob_containers, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -110,11 +110,11 @@ def initialize(configurable, base_url=nil, options=nil) @client_1.subscription_id = configurable.subscription_id end add_telemetry(@client_1) + @operations = @client_1.operations @storage_accounts = @client_1.storage_accounts @skus = @client_1.skus @usages = @client_1.usages @blob_containers = @client_1.blob_containers - @operations = @client_1.operations @model_classes = ModelClasses.new end @@ -141,6 +141,9 @@ def management_policies_rules_set_parameter def storage_account_management_policies Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountManagementPolicies end + def lease_duration + Azure::Storage::Mgmt::V2018_07_01::Models::LeaseDuration + end def provisioning_state Azure::Storage::Mgmt::V2018_07_01::Models::ProvisioningState end @@ -192,26 +195,26 @@ def kind def virtual_network_rule Azure::Storage::Mgmt::V2018_07_01::Models::VirtualNetworkRule end - def access_tier - Azure::Storage::Mgmt::V2018_07_01::Models::AccessTier - end def reason Azure::Storage::Mgmt::V2018_07_01::Models::Reason end - def account_status - Azure::Storage::Mgmt::V2018_07_01::Models::AccountStatus + def key_permission + Azure::Storage::Mgmt::V2018_07_01::Models::KeyPermission end def state Azure::Storage::Mgmt::V2018_07_01::Models::State end + def access_tier + Azure::Storage::Mgmt::V2018_07_01::Models::AccessTier + end def usage_unit Azure::Storage::Mgmt::V2018_07_01::Models::UsageUnit end def usage_name Azure::Storage::Mgmt::V2018_07_01::Models::UsageName end - def key_permission - Azure::Storage::Mgmt::V2018_07_01::Models::KeyPermission + def account_status + Azure::Storage::Mgmt::V2018_07_01::Models::AccountStatus end def storage_account_create_parameters Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountCreateParameters @@ -297,8 +300,8 @@ def blob_container def usage Azure::Storage::Mgmt::V2018_07_01::Models::Usage end - def bypass - Azure::Storage::Mgmt::V2018_07_01::Models::Bypass + def action + Azure::Storage::Mgmt::V2018_07_01::Models::Action end def reason_code Azure::Storage::Mgmt::V2018_07_01::Models::ReasonCode @@ -309,8 +312,8 @@ def sku_name def immutability_policy Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicy end - def action - Azure::Storage::Mgmt::V2018_07_01::Models::Action + def default_action + Azure::Storage::Mgmt::V2018_07_01::Models::DefaultAction end def signed_resource_types Azure::Storage::Mgmt::V2018_07_01::Models::SignedResourceTypes @@ -318,8 +321,8 @@ def signed_resource_types def key_source Azure::Storage::Mgmt::V2018_07_01::Models::KeySource end - def signed_resource - Azure::Storage::Mgmt::V2018_07_01::Models::SignedResource + def bypass + Azure::Storage::Mgmt::V2018_07_01::Models::Bypass end def sku Azure::Storage::Mgmt::V2018_07_01::Models::Sku @@ -330,14 +333,14 @@ def services def http_protocol Azure::Storage::Mgmt::V2018_07_01::Models::HttpProtocol end - def lease_duration - Azure::Storage::Mgmt::V2018_07_01::Models::LeaseDuration + def signed_resource + Azure::Storage::Mgmt::V2018_07_01::Models::SignedResource end def public_access Azure::Storage::Mgmt::V2018_07_01::Models::PublicAccess end - def default_action - Azure::Storage::Mgmt::V2018_07_01::Models::DefaultAction + def lease_status + Azure::Storage::Mgmt::V2018_07_01::Models::LeaseStatus end def lease_state Azure::Storage::Mgmt::V2018_07_01::Models::LeaseState @@ -363,9 +366,6 @@ def proxy_resource def immutability_policy_update_type Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicyUpdateType end - def lease_status - Azure::Storage::Mgmt::V2018_07_01::Models::LeaseStatus - end end end end diff --git a/azure_sdk/lib/latest/modules/storsimple8000series_profile_module.rb b/azure_sdk/lib/latest/modules/storsimple8000series_profile_module.rb index eecd531c34..dd9b323a8f 100644 --- a/azure_sdk/lib/latest/modules/storsimple8000series_profile_module.rb +++ b/azure_sdk/lib/latest/modules/storsimple8000series_profile_module.rb @@ -25,6 +25,7 @@ module Mgmt Jobs = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Jobs module Models + EncryptionAlgorithm = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::EncryptionAlgorithm DayOfWeek = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::DayOfWeek BackupType = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::BackupType BackupPolicyCreationType = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::BackupPolicyCreationType @@ -131,16 +132,16 @@ module Models NetworkAdapters = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::NetworkAdapters SecuritySettingsPatch = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::SecuritySettingsPatch ManagerList = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::ManagerList - DeviceRolloverDetails = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::DeviceRolloverDetails Time = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::Time - ManagerPatch = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::ManagerPatch + DeviceRolloverDetails = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::DeviceRolloverDetails + DimensionFilter = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::DimensionFilter MetricAvailablity = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::MetricAvailablity + ManagerPatch = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::ManagerPatch AvailableProviderOperationDisplay = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::AvailableProviderOperationDisplay - DimensionFilter = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::DimensionFilter - MetricData = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::MetricData + BackupPolicyList = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::BackupPolicyList ChapSettings = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::ChapSettings + MetricData = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::MetricData SecondaryDNSSettings = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::SecondaryDNSSettings - BackupPolicyList = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::BackupPolicyList DeviceList = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::DeviceList MetricDimension = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::MetricDimension VolumeList = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::VolumeList @@ -183,7 +184,6 @@ module Models VolumeType = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::VolumeType ScheduledBackupStatus = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::ScheduledBackupStatus AlertEmailNotificationStatus = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::AlertEmailNotificationStatus - EncryptionAlgorithm = Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::EncryptionAlgorithm end class StorSimple8000SeriesManagementClass @@ -231,6 +231,9 @@ def method_missing(method, *args) end class ModelClasses + def encryption_algorithm + Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::EncryptionAlgorithm + end def day_of_week Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::DayOfWeek end @@ -549,36 +552,36 @@ def security_settings_patch def manager_list Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::ManagerList end - def device_rollover_details - Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::DeviceRolloverDetails - end def time Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::Time end - def manager_patch - Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::ManagerPatch + def device_rollover_details + Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::DeviceRolloverDetails + end + def dimension_filter + Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::DimensionFilter end def metric_availablity Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::MetricAvailablity end + def manager_patch + Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::ManagerPatch + end def available_provider_operation_display Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::AvailableProviderOperationDisplay end - def dimension_filter - Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::DimensionFilter - end - def metric_data - Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::MetricData + def backup_policy_list + Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::BackupPolicyList end def chap_settings Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::ChapSettings end + def metric_data + Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::MetricData + end def secondary_dnssettings Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::SecondaryDNSSettings end - def backup_policy_list - Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::BackupPolicyList - end def device_list Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::DeviceList end @@ -705,9 +708,6 @@ def scheduled_backup_status def alert_email_notification_status Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::AlertEmailNotificationStatus end - def encryption_algorithm - Azure::StorSimple8000Series::Mgmt::V2017_06_01::Models::EncryptionAlgorithm - end end end end diff --git a/azure_sdk/lib/latest/modules/streamanalytics_profile_module.rb b/azure_sdk/lib/latest/modules/streamanalytics_profile_module.rb index 35b204876f..29566430ae 100644 --- a/azure_sdk/lib/latest/modules/streamanalytics_profile_module.rb +++ b/azure_sdk/lib/latest/modules/streamanalytics_profile_module.rb @@ -7,13 +7,13 @@ module Azure::Profiles::Latest module StreamAnalytics module Mgmt - Subscriptions = Azure::StreamAnalytics::Mgmt::V2016_03_01::Subscriptions + Operations = Azure::StreamAnalytics::Mgmt::V2016_03_01::Operations StreamingJobs = Azure::StreamAnalytics::Mgmt::V2016_03_01::StreamingJobs Inputs = Azure::StreamAnalytics::Mgmt::V2016_03_01::Inputs Outputs = Azure::StreamAnalytics::Mgmt::V2016_03_01::Outputs Transformations = Azure::StreamAnalytics::Mgmt::V2016_03_01::Transformations Functions = Azure::StreamAnalytics::Mgmt::V2016_03_01::Functions - Operations = Azure::StreamAnalytics::Mgmt::V2016_03_01::Operations + Subscriptions = Azure::StreamAnalytics::Mgmt::V2016_03_01::Subscriptions module Models AzureMachineLearningWebServiceInputColumn = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::AzureMachineLearningWebServiceInputColumn @@ -45,53 +45,53 @@ module Models FunctionListResult = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::FunctionListResult Function = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Function StreamingJob = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::StreamingJob - Output = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Output + JavaScriptFunctionBinding = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::JavaScriptFunctionBinding AzureMachineLearningWebServiceFunctionBinding = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::AzureMachineLearningWebServiceFunctionBinding ScalarFunctionProperties = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::ScalarFunctionProperties AvroSerialization = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::AvroSerialization Diagnostics = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Diagnostics JsonSerialization = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::JsonSerialization Transformation = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Transformation - AzureDataLakeStoreOutputDataSource = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::AzureDataLakeStoreOutputDataSource + Output = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Output CsvSerialization = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::CsvSerialization - EventHubDataSourceProperties = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::EventHubDataSourceProperties - JavaScriptFunctionBinding = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::JavaScriptFunctionBinding + AzureDataLakeStoreOutputDataSource = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::AzureDataLakeStoreOutputDataSource + PowerBIOutputDataSource = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::PowerBIOutputDataSource Resource = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Resource ServiceBusTopicOutputDataSource = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::ServiceBusTopicOutputDataSource - PowerBIOutputDataSource = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::PowerBIOutputDataSource - DocumentDbOutputDataSource = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::DocumentDbOutputDataSource - AzureSqlDatabaseOutputDataSource = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::AzureSqlDatabaseOutputDataSource ServiceBusQueueOutputDataSource = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::ServiceBusQueueOutputDataSource - AzureTableOutputDataSource = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::AzureTableOutputDataSource + EventHubDataSourceProperties = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::EventHubDataSourceProperties + AzureSqlDatabaseOutputDataSource = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::AzureSqlDatabaseOutputDataSource + EventHubOutputDataSource = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::EventHubOutputDataSource + DocumentDbOutputDataSource = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::DocumentDbOutputDataSource BlobOutputDataSource = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::BlobOutputDataSource OperationDisplay = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::OperationDisplay - ReferenceInputProperties = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::ReferenceInputProperties + AzureTableOutputDataSource = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::AzureTableOutputDataSource Operation = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Operation BlobReferenceInputDataSource = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::BlobReferenceInputDataSource OperationListResult = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::OperationListResult SubResource = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::SubResource EventHubStreamInputDataSource = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::EventHubStreamInputDataSource BlobStreamInputDataSource = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::BlobStreamInputDataSource - StreamInputProperties = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::StreamInputProperties - EventHubOutputDataSource = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::EventHubOutputDataSource + ReferenceInputProperties = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::ReferenceInputProperties + IoTHubStreamInputDataSource = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::IoTHubStreamInputDataSource JavaScriptFunctionRetrieveDefaultDefinitionParameters = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::JavaScriptFunctionRetrieveDefaultDefinitionParameters SubscriptionQuota = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::SubscriptionQuota - OutputStartMode = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::OutputStartMode + StreamInputProperties = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::StreamInputProperties AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters - IoTHubStreamInputDataSource = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::IoTHubStreamInputDataSource + OutputErrorPolicy = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::OutputErrorPolicy CompatibilityLevel = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::CompatibilityLevel - JsonOutputSerializationFormat = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::JsonOutputSerializationFormat + OutputStartMode = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::OutputStartMode EventsOutOfOrderPolicy = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::EventsOutOfOrderPolicy - OutputErrorPolicy = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::OutputErrorPolicy SkuName = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::SkuName - Encoding = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Encoding + JsonOutputSerializationFormat = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::JsonOutputSerializationFormat UdfType = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::UdfType + Encoding = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Encoding Sku = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Sku ErrorResponse = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::ErrorResponse end class StreamAnalyticsManagementClass - attr_reader :subscriptions, :streaming_jobs, :inputs, :outputs, :transformations, :functions, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :streaming_jobs, :inputs, :outputs, :transformations, :functions, :subscriptions, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -101,13 +101,13 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) - @subscriptions = @client_0.subscriptions + @operations = @client_0.operations @streaming_jobs = @client_0.streaming_jobs @inputs = @client_0.inputs @outputs = @client_0.outputs @transformations = @client_0.transformations @functions = @client_0.functions - @operations = @client_0.operations + @subscriptions = @client_0.subscriptions @model_classes = ModelClasses.new end @@ -213,8 +213,8 @@ def function def streaming_job Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::StreamingJob end - def output - Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Output + def java_script_function_binding + Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::JavaScriptFunctionBinding end def azure_machine_learning_web_service_function_binding Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::AzureMachineLearningWebServiceFunctionBinding @@ -234,17 +234,17 @@ def json_serialization def transformation Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Transformation end - def azure_data_lake_store_output_data_source - Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::AzureDataLakeStoreOutputDataSource + def output + Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Output end def csv_serialization Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::CsvSerialization end - def event_hub_data_source_properties - Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::EventHubDataSourceProperties + def azure_data_lake_store_output_data_source + Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::AzureDataLakeStoreOutputDataSource end - def java_script_function_binding - Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::JavaScriptFunctionBinding + def power_bioutput_data_source + Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::PowerBIOutputDataSource end def resource Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Resource @@ -252,20 +252,20 @@ def resource def service_bus_topic_output_data_source Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::ServiceBusTopicOutputDataSource end - def power_bioutput_data_source - Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::PowerBIOutputDataSource + def service_bus_queue_output_data_source + Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::ServiceBusQueueOutputDataSource end - def document_db_output_data_source - Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::DocumentDbOutputDataSource + def event_hub_data_source_properties + Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::EventHubDataSourceProperties end def azure_sql_database_output_data_source Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::AzureSqlDatabaseOutputDataSource end - def service_bus_queue_output_data_source - Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::ServiceBusQueueOutputDataSource + def event_hub_output_data_source + Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::EventHubOutputDataSource end - def azure_table_output_data_source - Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::AzureTableOutputDataSource + def document_db_output_data_source + Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::DocumentDbOutputDataSource end def blob_output_data_source Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::BlobOutputDataSource @@ -273,8 +273,8 @@ def blob_output_data_source def operation_display Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::OperationDisplay end - def reference_input_properties - Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::ReferenceInputProperties + def azure_table_output_data_source + Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::AzureTableOutputDataSource end def operation Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Operation @@ -294,11 +294,11 @@ def event_hub_stream_input_data_source def blob_stream_input_data_source Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::BlobStreamInputDataSource end - def stream_input_properties - Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::StreamInputProperties + def reference_input_properties + Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::ReferenceInputProperties end - def event_hub_output_data_source - Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::EventHubOutputDataSource + def io_thub_stream_input_data_source + Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::IoTHubStreamInputDataSource end def java_script_function_retrieve_default_definition_parameters Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::JavaScriptFunctionRetrieveDefaultDefinitionParameters @@ -306,36 +306,36 @@ def java_script_function_retrieve_default_definition_parameters def subscription_quota Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::SubscriptionQuota end - def output_start_mode - Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::OutputStartMode + def stream_input_properties + Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::StreamInputProperties end def azure_machine_learning_web_service_function_retrieve_default_definition_parameters Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters end - def io_thub_stream_input_data_source - Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::IoTHubStreamInputDataSource + def output_error_policy + Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::OutputErrorPolicy end def compatibility_level Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::CompatibilityLevel end - def json_output_serialization_format - Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::JsonOutputSerializationFormat + def output_start_mode + Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::OutputStartMode end def events_out_of_order_policy Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::EventsOutOfOrderPolicy end - def output_error_policy - Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::OutputErrorPolicy - end def sku_name Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::SkuName end - def encoding - Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Encoding + def json_output_serialization_format + Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::JsonOutputSerializationFormat end def udf_type Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::UdfType end + def encoding + Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Encoding + end def sku Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Sku end diff --git a/azure_sdk/lib/latest/modules/web_profile_module.rb b/azure_sdk/lib/latest/modules/web_profile_module.rb index 049e6299fe..d2edcd71e7 100644 --- a/azure_sdk/lib/latest/modules/web_profile_module.rb +++ b/azure_sdk/lib/latest/modules/web_profile_module.rb @@ -23,6 +23,7 @@ module Mgmt ResourceHealthMetadataOperations = Azure::Web::Mgmt::V2018_02_01::ResourceHealthMetadataOperations module Models + Experiments = Azure::Web::Mgmt::V2018_02_01::Models::Experiments DataSource = Azure::Web::Mgmt::V2018_02_01::Models::DataSource SiteMachineKey = Azure::Web::Mgmt::V2018_02_01::Models::SiteMachineKey ResponseMetaData = Azure::Web::Mgmt::V2018_02_01::Models::ResponseMetaData @@ -57,7 +58,7 @@ module Models NameValuePair = Azure::Web::Mgmt::V2018_02_01::Models::NameValuePair StackMinorVersion = Azure::Web::Mgmt::V2018_02_01::Models::StackMinorVersion AutoHealTriggers = Azure::Web::Mgmt::V2018_02_01::Models::AutoHealTriggers - DiagnosticMetricSet = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticMetricSet + ResourceMetricName = Azure::Web::Mgmt::V2018_02_01::Models::ResourceMetricName DetectorAbnormalTimePeriod = Azure::Web::Mgmt::V2018_02_01::Models::DetectorAbnormalTimePeriod ConnStringInfo = Azure::Web::Mgmt::V2018_02_01::Models::ConnStringInfo AppServiceCertificateOrder = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateOrder @@ -66,13 +67,13 @@ module Models CorsSettings = Azure::Web::Mgmt::V2018_02_01::Models::CorsSettings DiagnosticMetricSample = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticMetricSample ReissueCertificateOrderRequest = Azure::Web::Mgmt::V2018_02_01::Models::ReissueCertificateOrderRequest - RenewCertificateOrderRequest = Azure::Web::Mgmt::V2018_02_01::Models::RenewCertificateOrderRequest - Experiments = Azure::Web::Mgmt::V2018_02_01::Models::Experiments + DiagnosticMetricSet = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticMetricSet + VnetRoute = Azure::Web::Mgmt::V2018_02_01::Models::VnetRoute VnetInfo = Azure::Web::Mgmt::V2018_02_01::Models::VnetInfo VnetGateway = Azure::Web::Mgmt::V2018_02_01::Models::VnetGateway User = Azure::Web::Mgmt::V2018_02_01::Models::User HybridConnection = Azure::Web::Mgmt::V2018_02_01::Models::HybridConnection - VnetRoute = Azure::Web::Mgmt::V2018_02_01::Models::VnetRoute + ResourceMetricDefinition = Azure::Web::Mgmt::V2018_02_01::Models::ResourceMetricDefinition AppServiceCertificateResource = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateResource HybridConnectionKey = Azure::Web::Mgmt::V2018_02_01::Models::HybridConnectionKey AppServiceCertificateOrderPatchResource = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateOrderPatchResource @@ -80,32 +81,32 @@ module Models CertificateEmail = Azure::Web::Mgmt::V2018_02_01::Models::CertificateEmail CertificateOrderAction = Azure::Web::Mgmt::V2018_02_01::Models::CertificateOrderAction AnalysisDefinition = Azure::Web::Mgmt::V2018_02_01::Models::AnalysisDefinition - DetectorResponse = Azure::Web::Mgmt::V2018_02_01::Models::DetectorResponse + RenewCertificateOrderRequest = Azure::Web::Mgmt::V2018_02_01::Models::RenewCertificateOrderRequest Site = Azure::Web::Mgmt::V2018_02_01::Models::Site AppServicePlan = Azure::Web::Mgmt::V2018_02_01::Models::AppServicePlan - ResourceMetricDefinition = Azure::Web::Mgmt::V2018_02_01::Models::ResourceMetricDefinition + TopLevelDomain = Azure::Web::Mgmt::V2018_02_01::Models::TopLevelDomain PushSettings = Azure::Web::Mgmt::V2018_02_01::Models::PushSettings DeletedSite = Azure::Web::Mgmt::V2018_02_01::Models::DeletedSite DiagnosticAnalysis = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticAnalysis - DiagnosticCategory = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticCategory Identifier = Azure::Web::Mgmt::V2018_02_01::Models::Identifier + DiagnosticDetectorResponse = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticDetectorResponse DetectorDefinition = Azure::Web::Mgmt::V2018_02_01::Models::DetectorDefinition RecommendationRule = Azure::Web::Mgmt::V2018_02_01::Models::RecommendationRule - VnetParameters = Azure::Web::Mgmt::V2018_02_01::Models::VnetParameters + DetectorResponse = Azure::Web::Mgmt::V2018_02_01::Models::DetectorResponse CertificatePatchResource = Azure::Web::Mgmt::V2018_02_01::Models::CertificatePatchResource - GeoRegion = Azure::Web::Mgmt::V2018_02_01::Models::GeoRegion - DiagnosticDetectorResponse = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticDetectorResponse + DiagnosticCategory = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticCategory + PremierAddOnOffer = Azure::Web::Mgmt::V2018_02_01::Models::PremierAddOnOffer Recommendation = Azure::Web::Mgmt::V2018_02_01::Models::Recommendation DomainOwnershipIdentifier = Azure::Web::Mgmt::V2018_02_01::Models::DomainOwnershipIdentifier DomainPatchResource = Azure::Web::Mgmt::V2018_02_01::Models::DomainPatchResource - TopLevelDomain = Azure::Web::Mgmt::V2018_02_01::Models::TopLevelDomain - AzureStoragePropertyDictionaryResource = Azure::Web::Mgmt::V2018_02_01::Models::AzureStoragePropertyDictionaryResource - PremierAddOnOffer = Azure::Web::Mgmt::V2018_02_01::Models::PremierAddOnOffer + BillingMeter = Azure::Web::Mgmt::V2018_02_01::Models::BillingMeter + GeoRegion = Azure::Web::Mgmt::V2018_02_01::Models::GeoRegion + DeletedAppRestoreRequest = Azure::Web::Mgmt::V2018_02_01::Models::DeletedAppRestoreRequest SourceControl = Azure::Web::Mgmt::V2018_02_01::Models::SourceControl - PrivateAccess = Azure::Web::Mgmt::V2018_02_01::Models::PrivateAccess + VnetParameters = Azure::Web::Mgmt::V2018_02_01::Models::VnetParameters VnetValidationTestFailure = Azure::Web::Mgmt::V2018_02_01::Models::VnetValidationTestFailure Operation = Azure::Web::Mgmt::V2018_02_01::Models::Operation - BillingMeter = Azure::Web::Mgmt::V2018_02_01::Models::BillingMeter + SlotConfigNamesResource = Azure::Web::Mgmt::V2018_02_01::Models::SlotConfigNamesResource SlotDifference = Azure::Web::Mgmt::V2018_02_01::Models::SlotDifference StorageMigrationOptions = Azure::Web::Mgmt::V2018_02_01::Models::StorageMigrationOptions StorageMigrationResponse = Azure::Web::Mgmt::V2018_02_01::Models::StorageMigrationResponse @@ -116,14 +117,14 @@ module Models WebJob = Azure::Web::Mgmt::V2018_02_01::Models::WebJob ManagedServiceIdentityType = Azure::Web::Mgmt::V2018_02_01::Models::ManagedServiceIdentityType LogSpecification = Azure::Web::Mgmt::V2018_02_01::Models::LogSpecification - DeletedAppRestoreRequest = Azure::Web::Mgmt::V2018_02_01::Models::DeletedAppRestoreRequest + SiteConfigurationSnapshotInfo = Azure::Web::Mgmt::V2018_02_01::Models::SiteConfigurationSnapshotInfo ServiceSpecification = Azure::Web::Mgmt::V2018_02_01::Models::ServiceSpecification - SiteInstance = Azure::Web::Mgmt::V2018_02_01::Models::SiteInstance + PrivateAccess = Azure::Web::Mgmt::V2018_02_01::Models::PrivateAccess SiteLogsConfig = Azure::Web::Mgmt::V2018_02_01::Models::SiteLogsConfig SitePatchResource = Azure::Web::Mgmt::V2018_02_01::Models::SitePatchResource SitePhpErrorLogFlag = Azure::Web::Mgmt::V2018_02_01::Models::SitePhpErrorLogFlag SiteSourceControl = Azure::Web::Mgmt::V2018_02_01::Models::SiteSourceControl - SlotConfigNamesResource = Azure::Web::Mgmt::V2018_02_01::Models::SlotConfigNamesResource + CertificateOrderActionType = Azure::Web::Mgmt::V2018_02_01::Models::CertificateOrderActionType IpFilterTag = Azure::Web::Mgmt::V2018_02_01::Models::IpFilterTag AzureStorageType = Azure::Web::Mgmt::V2018_02_01::Models::AzureStorageType AzureStorageState = Azure::Web::Mgmt::V2018_02_01::Models::AzureStorageState @@ -132,30 +133,30 @@ module Models TriggeredJobHistory = Azure::Web::Mgmt::V2018_02_01::Models::TriggeredJobHistory RouteType = Azure::Web::Mgmt::V2018_02_01::Models::RouteType ResourceHealthMetadata = Azure::Web::Mgmt::V2018_02_01::Models::ResourceHealthMetadata - AutoHealActionType = Azure::Web::Mgmt::V2018_02_01::Models::AutoHealActionType + AzureStoragePropertyDictionaryResource = Azure::Web::Mgmt::V2018_02_01::Models::AzureStoragePropertyDictionaryResource ConnectionStringType = Azure::Web::Mgmt::V2018_02_01::Models::ConnectionStringType PremierAddOnPatchResource = Azure::Web::Mgmt::V2018_02_01::Models::PremierAddOnPatchResource - SiteConfigurationSnapshotInfo = Azure::Web::Mgmt::V2018_02_01::Models::SiteConfigurationSnapshotInfo + ManagedPipelineMode = Azure::Web::Mgmt::V2018_02_01::Models::ManagedPipelineMode SiteExtensionInfo = Azure::Web::Mgmt::V2018_02_01::Models::SiteExtensionInfo - SwiftVirtualNetwork = Azure::Web::Mgmt::V2018_02_01::Models::SwiftVirtualNetwork + SiteInstance = Azure::Web::Mgmt::V2018_02_01::Models::SiteInstance CertificateProductType = Azure::Web::Mgmt::V2018_02_01::Models::CertificateProductType KeyVaultSecretStatus = Azure::Web::Mgmt::V2018_02_01::Models::KeyVaultSecretStatus - CertificateOrderActionType = Azure::Web::Mgmt::V2018_02_01::Models::CertificateOrderActionType - SiteAvailabilityState = Azure::Web::Mgmt::V2018_02_01::Models::SiteAvailabilityState + UsageState = Azure::Web::Mgmt::V2018_02_01::Models::UsageState Certificate = Azure::Web::Mgmt::V2018_02_01::Models::Certificate + AutoHealActionType = Azure::Web::Mgmt::V2018_02_01::Models::AutoHealActionType HostNameType = Azure::Web::Mgmt::V2018_02_01::Models::HostNameType ScmType = Azure::Web::Mgmt::V2018_02_01::Models::ScmType - ManagedPipelineMode = Azure::Web::Mgmt::V2018_02_01::Models::ManagedPipelineMode + DomainStatus = Azure::Web::Mgmt::V2018_02_01::Models::DomainStatus DnsType = Azure::Web::Mgmt::V2018_02_01::Models::DnsType DomainType = Azure::Web::Mgmt::V2018_02_01::Models::DomainType SslState = Azure::Web::Mgmt::V2018_02_01::Models::SslState HostType = Azure::Web::Mgmt::V2018_02_01::Models::HostType - UsageState = Azure::Web::Mgmt::V2018_02_01::Models::UsageState - NotificationLevel = Azure::Web::Mgmt::V2018_02_01::Models::NotificationLevel + ResourceScopeType = Azure::Web::Mgmt::V2018_02_01::Models::ResourceScopeType + SiteAvailabilityState = Azure::Web::Mgmt::V2018_02_01::Models::SiteAvailabilityState StatusOptions = Azure::Web::Mgmt::V2018_02_01::Models::StatusOptions HostingEnvironmentStatus = Azure::Web::Mgmt::V2018_02_01::Models::HostingEnvironmentStatus SiteConfigResource = Azure::Web::Mgmt::V2018_02_01::Models::SiteConfigResource - ComputeModeOptions = Azure::Web::Mgmt::V2018_02_01::Models::ComputeModeOptions + SwiftVirtualNetwork = Azure::Web::Mgmt::V2018_02_01::Models::SwiftVirtualNetwork WorkerSizeOptions = Azure::Web::Mgmt::V2018_02_01::Models::WorkerSizeOptions CertificateOrderStatus = Azure::Web::Mgmt::V2018_02_01::Models::CertificateOrderStatus ProvisioningState = Azure::Web::Mgmt::V2018_02_01::Models::ProvisioningState @@ -163,10 +164,10 @@ module Models AzureResourceType = Azure::Web::Mgmt::V2018_02_01::Models::AzureResourceType CustomHostNameDnsRecordType = Azure::Web::Mgmt::V2018_02_01::Models::CustomHostNameDnsRecordType FtpsState = Azure::Web::Mgmt::V2018_02_01::Models::FtpsState - DomainStatus = Azure::Web::Mgmt::V2018_02_01::Models::DomainStatus + AppServicePlanRestrictions = Azure::Web::Mgmt::V2018_02_01::Models::AppServicePlanRestrictions InAvailabilityReasonType = Azure::Web::Mgmt::V2018_02_01::Models::InAvailabilityReasonType InternalLoadBalancingMode = Azure::Web::Mgmt::V2018_02_01::Models::InternalLoadBalancingMode - IssueType = Azure::Web::Mgmt::V2018_02_01::Models::IssueType + ComputeModeOptions = Azure::Web::Mgmt::V2018_02_01::Models::ComputeModeOptions AppServiceEnvironmentCollection = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceEnvironmentCollection HostingEnvironmentDiagnostics = Azure::Web::Mgmt::V2018_02_01::Models::HostingEnvironmentDiagnostics AddressResponse = Azure::Web::Mgmt::V2018_02_01::Models::AddressResponse @@ -184,24 +185,26 @@ module Models WorkerPoolResource = Azure::Web::Mgmt::V2018_02_01::Models::WorkerPoolResource AppServicePlanPatchResource = Azure::Web::Mgmt::V2018_02_01::Models::AppServicePlanPatchResource HybridConnectionLimits = Azure::Web::Mgmt::V2018_02_01::Models::HybridConnectionLimits - MSDeployProvisioningState = Azure::Web::Mgmt::V2018_02_01::Models::MSDeployProvisioningState + NotificationLevel = Azure::Web::Mgmt::V2018_02_01::Models::NotificationLevel Channels = Azure::Web::Mgmt::V2018_02_01::Models::Channels - AppServicePlanRestrictions = Azure::Web::Mgmt::V2018_02_01::Models::AppServicePlanRestrictions + PublicCertificateLocation = Azure::Web::Mgmt::V2018_02_01::Models::PublicCertificateLocation UnauthenticatedClientAction = Azure::Web::Mgmt::V2018_02_01::Models::UnauthenticatedClientAction CheckNameResourceTypes = Azure::Web::Mgmt::V2018_02_01::Models::CheckNameResourceTypes - ValidateResourceTypes = Azure::Web::Mgmt::V2018_02_01::Models::ValidateResourceTypes + IssueType = Azure::Web::Mgmt::V2018_02_01::Models::IssueType SiteExtensionType = Azure::Web::Mgmt::V2018_02_01::Models::SiteExtensionType TriggeredWebJobStatus = Azure::Web::Mgmt::V2018_02_01::Models::TriggeredWebJobStatus LogLevel = Azure::Web::Mgmt::V2018_02_01::Models::LogLevel SnapshotRestoreRequest = Azure::Web::Mgmt::V2018_02_01::Models::SnapshotRestoreRequest SolutionType = Azure::Web::Mgmt::V2018_02_01::Models::SolutionType FrequencyUnit = Azure::Web::Mgmt::V2018_02_01::Models::FrequencyUnit - ResourceScopeType = Azure::Web::Mgmt::V2018_02_01::Models::ResourceScopeType + BackupRestoreOperationType = Azure::Web::Mgmt::V2018_02_01::Models::BackupRestoreOperationType ContinuousWebJobStatus = Azure::Web::Mgmt::V2018_02_01::Models::ContinuousWebJobStatus WebJobType = Azure::Web::Mgmt::V2018_02_01::Models::WebJobType PublishingProfileFormat = Azure::Web::Mgmt::V2018_02_01::Models::PublishingProfileFormat DnsVerificationTestResult = Azure::Web::Mgmt::V2018_02_01::Models::DnsVerificationTestResult + ValidateResourceTypes = Azure::Web::Mgmt::V2018_02_01::Models::ValidateResourceTypes MSDeployLogEntryType = Azure::Web::Mgmt::V2018_02_01::Models::MSDeployLogEntryType + MSDeployProvisioningState = Azure::Web::Mgmt::V2018_02_01::Models::MSDeployProvisioningState MySqlMigrationType = Azure::Web::Mgmt::V2018_02_01::Models::MySqlMigrationType Contact = Azure::Web::Mgmt::V2018_02_01::Models::Contact BuiltInAuthenticationProvider = Azure::Web::Mgmt::V2018_02_01::Models::BuiltInAuthenticationProvider @@ -209,9 +212,7 @@ module Models SkuName = Azure::Web::Mgmt::V2018_02_01::Models::SkuName BackupItemStatus = Azure::Web::Mgmt::V2018_02_01::Models::BackupItemStatus DatabaseType = Azure::Web::Mgmt::V2018_02_01::Models::DatabaseType - BackupRestoreOperationType = Azure::Web::Mgmt::V2018_02_01::Models::BackupRestoreOperationType AccessControlEntryAction = Azure::Web::Mgmt::V2018_02_01::Models::AccessControlEntryAction - PublicCertificateLocation = Azure::Web::Mgmt::V2018_02_01::Models::PublicCertificateLocation Dimension = Azure::Web::Mgmt::V2018_02_01::Models::Dimension MetricSpecification = Azure::Web::Mgmt::V2018_02_01::Models::MetricSpecification Usage = Azure::Web::Mgmt::V2018_02_01::Models::Usage @@ -285,9 +286,9 @@ module Models AppServiceCertificateOrderCollection = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateOrderCollection SnapshotRecoverySource = Azure::Web::Mgmt::V2018_02_01::Models::SnapshotRecoverySource SiteSealRequest = Azure::Web::Mgmt::V2018_02_01::Models::SiteSealRequest - ManagedServiceIdentity = Azure::Web::Mgmt::V2018_02_01::Models::ManagedServiceIdentity AppServiceCertificate = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificate AzureStorageInfoValue = Azure::Web::Mgmt::V2018_02_01::Models::AzureStorageInfoValue + ManagedServiceIdentity = Azure::Web::Mgmt::V2018_02_01::Models::ManagedServiceIdentity DomainAvailablilityCheckResult = Azure::Web::Mgmt::V2018_02_01::Models::DomainAvailablilityCheckResult DomainControlCenterSsoRequest = Azure::Web::Mgmt::V2018_02_01::Models::DomainControlCenterSsoRequest DomainPurchaseConsent = Azure::Web::Mgmt::V2018_02_01::Models::DomainPurchaseConsent @@ -358,7 +359,6 @@ module Models DeletedWebAppCollection = Azure::Web::Mgmt::V2018_02_01::Models::DeletedWebAppCollection ResourceNameAvailability = Azure::Web::Mgmt::V2018_02_01::Models::ResourceNameAvailability AbnormalTimePeriod = Azure::Web::Mgmt::V2018_02_01::Models::AbnormalTimePeriod - ResourceMetricName = Azure::Web::Mgmt::V2018_02_01::Models::ResourceMetricName end class WebManagementClass @@ -404,6 +404,9 @@ def method_missing(method, *args) end class ModelClasses + def experiments + Azure::Web::Mgmt::V2018_02_01::Models::Experiments + end def data_source Azure::Web::Mgmt::V2018_02_01::Models::DataSource end @@ -506,8 +509,8 @@ def stack_minor_version def auto_heal_triggers Azure::Web::Mgmt::V2018_02_01::Models::AutoHealTriggers end - def diagnostic_metric_set - Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticMetricSet + def resource_metric_name + Azure::Web::Mgmt::V2018_02_01::Models::ResourceMetricName end def detector_abnormal_time_period Azure::Web::Mgmt::V2018_02_01::Models::DetectorAbnormalTimePeriod @@ -533,11 +536,11 @@ def diagnostic_metric_sample def reissue_certificate_order_request Azure::Web::Mgmt::V2018_02_01::Models::ReissueCertificateOrderRequest end - def renew_certificate_order_request - Azure::Web::Mgmt::V2018_02_01::Models::RenewCertificateOrderRequest + def diagnostic_metric_set + Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticMetricSet end - def experiments - Azure::Web::Mgmt::V2018_02_01::Models::Experiments + def vnet_route + Azure::Web::Mgmt::V2018_02_01::Models::VnetRoute end def vnet_info Azure::Web::Mgmt::V2018_02_01::Models::VnetInfo @@ -551,8 +554,8 @@ def user def hybrid_connection Azure::Web::Mgmt::V2018_02_01::Models::HybridConnection end - def vnet_route - Azure::Web::Mgmt::V2018_02_01::Models::VnetRoute + def resource_metric_definition + Azure::Web::Mgmt::V2018_02_01::Models::ResourceMetricDefinition end def app_service_certificate_resource Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateResource @@ -575,8 +578,8 @@ def certificate_order_action def analysis_definition Azure::Web::Mgmt::V2018_02_01::Models::AnalysisDefinition end - def detector_response - Azure::Web::Mgmt::V2018_02_01::Models::DetectorResponse + def renew_certificate_order_request + Azure::Web::Mgmt::V2018_02_01::Models::RenewCertificateOrderRequest end def site Azure::Web::Mgmt::V2018_02_01::Models::Site @@ -584,8 +587,8 @@ def site def app_service_plan Azure::Web::Mgmt::V2018_02_01::Models::AppServicePlan end - def resource_metric_definition - Azure::Web::Mgmt::V2018_02_01::Models::ResourceMetricDefinition + def top_level_domain + Azure::Web::Mgmt::V2018_02_01::Models::TopLevelDomain end def push_settings Azure::Web::Mgmt::V2018_02_01::Models::PushSettings @@ -596,29 +599,29 @@ def deleted_site def diagnostic_analysis Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticAnalysis end - def diagnostic_category - Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticCategory - end def identifier Azure::Web::Mgmt::V2018_02_01::Models::Identifier end + def diagnostic_detector_response + Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticDetectorResponse + end def detector_definition Azure::Web::Mgmt::V2018_02_01::Models::DetectorDefinition end def recommendation_rule Azure::Web::Mgmt::V2018_02_01::Models::RecommendationRule end - def vnet_parameters - Azure::Web::Mgmt::V2018_02_01::Models::VnetParameters + def detector_response + Azure::Web::Mgmt::V2018_02_01::Models::DetectorResponse end def certificate_patch_resource Azure::Web::Mgmt::V2018_02_01::Models::CertificatePatchResource end - def geo_region - Azure::Web::Mgmt::V2018_02_01::Models::GeoRegion + def diagnostic_category + Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticCategory end - def diagnostic_detector_response - Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticDetectorResponse + def premier_add_on_offer + Azure::Web::Mgmt::V2018_02_01::Models::PremierAddOnOffer end def recommendation Azure::Web::Mgmt::V2018_02_01::Models::Recommendation @@ -629,20 +632,20 @@ def domain_ownership_identifier def domain_patch_resource Azure::Web::Mgmt::V2018_02_01::Models::DomainPatchResource end - def top_level_domain - Azure::Web::Mgmt::V2018_02_01::Models::TopLevelDomain + def billing_meter + Azure::Web::Mgmt::V2018_02_01::Models::BillingMeter end - def azure_storage_property_dictionary_resource - Azure::Web::Mgmt::V2018_02_01::Models::AzureStoragePropertyDictionaryResource + def geo_region + Azure::Web::Mgmt::V2018_02_01::Models::GeoRegion end - def premier_add_on_offer - Azure::Web::Mgmt::V2018_02_01::Models::PremierAddOnOffer + def deleted_app_restore_request + Azure::Web::Mgmt::V2018_02_01::Models::DeletedAppRestoreRequest end def source_control Azure::Web::Mgmt::V2018_02_01::Models::SourceControl end - def private_access - Azure::Web::Mgmt::V2018_02_01::Models::PrivateAccess + def vnet_parameters + Azure::Web::Mgmt::V2018_02_01::Models::VnetParameters end def vnet_validation_test_failure Azure::Web::Mgmt::V2018_02_01::Models::VnetValidationTestFailure @@ -650,8 +653,8 @@ def vnet_validation_test_failure def operation Azure::Web::Mgmt::V2018_02_01::Models::Operation end - def billing_meter - Azure::Web::Mgmt::V2018_02_01::Models::BillingMeter + def slot_config_names_resource + Azure::Web::Mgmt::V2018_02_01::Models::SlotConfigNamesResource end def slot_difference Azure::Web::Mgmt::V2018_02_01::Models::SlotDifference @@ -683,14 +686,14 @@ def managed_service_identity_type def log_specification Azure::Web::Mgmt::V2018_02_01::Models::LogSpecification end - def deleted_app_restore_request - Azure::Web::Mgmt::V2018_02_01::Models::DeletedAppRestoreRequest + def site_configuration_snapshot_info + Azure::Web::Mgmt::V2018_02_01::Models::SiteConfigurationSnapshotInfo end def service_specification Azure::Web::Mgmt::V2018_02_01::Models::ServiceSpecification end - def site_instance - Azure::Web::Mgmt::V2018_02_01::Models::SiteInstance + def private_access + Azure::Web::Mgmt::V2018_02_01::Models::PrivateAccess end def site_logs_config Azure::Web::Mgmt::V2018_02_01::Models::SiteLogsConfig @@ -704,8 +707,8 @@ def site_php_error_log_flag def site_source_control Azure::Web::Mgmt::V2018_02_01::Models::SiteSourceControl end - def slot_config_names_resource - Azure::Web::Mgmt::V2018_02_01::Models::SlotConfigNamesResource + def certificate_order_action_type + Azure::Web::Mgmt::V2018_02_01::Models::CertificateOrderActionType end def ip_filter_tag Azure::Web::Mgmt::V2018_02_01::Models::IpFilterTag @@ -731,8 +734,8 @@ def route_type def resource_health_metadata Azure::Web::Mgmt::V2018_02_01::Models::ResourceHealthMetadata end - def auto_heal_action_type - Azure::Web::Mgmt::V2018_02_01::Models::AutoHealActionType + def azure_storage_property_dictionary_resource + Azure::Web::Mgmt::V2018_02_01::Models::AzureStoragePropertyDictionaryResource end def connection_string_type Azure::Web::Mgmt::V2018_02_01::Models::ConnectionStringType @@ -740,14 +743,14 @@ def connection_string_type def premier_add_on_patch_resource Azure::Web::Mgmt::V2018_02_01::Models::PremierAddOnPatchResource end - def site_configuration_snapshot_info - Azure::Web::Mgmt::V2018_02_01::Models::SiteConfigurationSnapshotInfo + def managed_pipeline_mode + Azure::Web::Mgmt::V2018_02_01::Models::ManagedPipelineMode end def site_extension_info Azure::Web::Mgmt::V2018_02_01::Models::SiteExtensionInfo end - def swift_virtual_network - Azure::Web::Mgmt::V2018_02_01::Models::SwiftVirtualNetwork + def site_instance + Azure::Web::Mgmt::V2018_02_01::Models::SiteInstance end def certificate_product_type Azure::Web::Mgmt::V2018_02_01::Models::CertificateProductType @@ -755,23 +758,23 @@ def certificate_product_type def key_vault_secret_status Azure::Web::Mgmt::V2018_02_01::Models::KeyVaultSecretStatus end - def certificate_order_action_type - Azure::Web::Mgmt::V2018_02_01::Models::CertificateOrderActionType - end - def site_availability_state - Azure::Web::Mgmt::V2018_02_01::Models::SiteAvailabilityState + def usage_state + Azure::Web::Mgmt::V2018_02_01::Models::UsageState end def certificate Azure::Web::Mgmt::V2018_02_01::Models::Certificate end + def auto_heal_action_type + Azure::Web::Mgmt::V2018_02_01::Models::AutoHealActionType + end def host_name_type Azure::Web::Mgmt::V2018_02_01::Models::HostNameType end def scm_type Azure::Web::Mgmt::V2018_02_01::Models::ScmType end - def managed_pipeline_mode - Azure::Web::Mgmt::V2018_02_01::Models::ManagedPipelineMode + def domain_status + Azure::Web::Mgmt::V2018_02_01::Models::DomainStatus end def dns_type Azure::Web::Mgmt::V2018_02_01::Models::DnsType @@ -785,11 +788,11 @@ def ssl_state def host_type Azure::Web::Mgmt::V2018_02_01::Models::HostType end - def usage_state - Azure::Web::Mgmt::V2018_02_01::Models::UsageState + def resource_scope_type + Azure::Web::Mgmt::V2018_02_01::Models::ResourceScopeType end - def notification_level - Azure::Web::Mgmt::V2018_02_01::Models::NotificationLevel + def site_availability_state + Azure::Web::Mgmt::V2018_02_01::Models::SiteAvailabilityState end def status_options Azure::Web::Mgmt::V2018_02_01::Models::StatusOptions @@ -800,8 +803,8 @@ def hosting_environment_status def site_config_resource Azure::Web::Mgmt::V2018_02_01::Models::SiteConfigResource end - def compute_mode_options - Azure::Web::Mgmt::V2018_02_01::Models::ComputeModeOptions + def swift_virtual_network + Azure::Web::Mgmt::V2018_02_01::Models::SwiftVirtualNetwork end def worker_size_options Azure::Web::Mgmt::V2018_02_01::Models::WorkerSizeOptions @@ -824,8 +827,8 @@ def custom_host_name_dns_record_type def ftps_state Azure::Web::Mgmt::V2018_02_01::Models::FtpsState end - def domain_status - Azure::Web::Mgmt::V2018_02_01::Models::DomainStatus + def app_service_plan_restrictions + Azure::Web::Mgmt::V2018_02_01::Models::AppServicePlanRestrictions end def in_availability_reason_type Azure::Web::Mgmt::V2018_02_01::Models::InAvailabilityReasonType @@ -833,8 +836,8 @@ def in_availability_reason_type def internal_load_balancing_mode Azure::Web::Mgmt::V2018_02_01::Models::InternalLoadBalancingMode end - def issue_type - Azure::Web::Mgmt::V2018_02_01::Models::IssueType + def compute_mode_options + Azure::Web::Mgmt::V2018_02_01::Models::ComputeModeOptions end def app_service_environment_collection Azure::Web::Mgmt::V2018_02_01::Models::AppServiceEnvironmentCollection @@ -887,14 +890,14 @@ def app_service_plan_patch_resource def hybrid_connection_limits Azure::Web::Mgmt::V2018_02_01::Models::HybridConnectionLimits end - def msdeploy_provisioning_state - Azure::Web::Mgmt::V2018_02_01::Models::MSDeployProvisioningState + def notification_level + Azure::Web::Mgmt::V2018_02_01::Models::NotificationLevel end def channels Azure::Web::Mgmt::V2018_02_01::Models::Channels end - def app_service_plan_restrictions - Azure::Web::Mgmt::V2018_02_01::Models::AppServicePlanRestrictions + def public_certificate_location + Azure::Web::Mgmt::V2018_02_01::Models::PublicCertificateLocation end def unauthenticated_client_action Azure::Web::Mgmt::V2018_02_01::Models::UnauthenticatedClientAction @@ -902,8 +905,8 @@ def unauthenticated_client_action def check_name_resource_types Azure::Web::Mgmt::V2018_02_01::Models::CheckNameResourceTypes end - def validate_resource_types - Azure::Web::Mgmt::V2018_02_01::Models::ValidateResourceTypes + def issue_type + Azure::Web::Mgmt::V2018_02_01::Models::IssueType end def site_extension_type Azure::Web::Mgmt::V2018_02_01::Models::SiteExtensionType @@ -923,8 +926,8 @@ def solution_type def frequency_unit Azure::Web::Mgmt::V2018_02_01::Models::FrequencyUnit end - def resource_scope_type - Azure::Web::Mgmt::V2018_02_01::Models::ResourceScopeType + def backup_restore_operation_type + Azure::Web::Mgmt::V2018_02_01::Models::BackupRestoreOperationType end def continuous_web_job_status Azure::Web::Mgmt::V2018_02_01::Models::ContinuousWebJobStatus @@ -938,9 +941,15 @@ def publishing_profile_format def dns_verification_test_result Azure::Web::Mgmt::V2018_02_01::Models::DnsVerificationTestResult end + def validate_resource_types + Azure::Web::Mgmt::V2018_02_01::Models::ValidateResourceTypes + end def msdeploy_log_entry_type Azure::Web::Mgmt::V2018_02_01::Models::MSDeployLogEntryType end + def msdeploy_provisioning_state + Azure::Web::Mgmt::V2018_02_01::Models::MSDeployProvisioningState + end def my_sql_migration_type Azure::Web::Mgmt::V2018_02_01::Models::MySqlMigrationType end @@ -962,15 +971,9 @@ def backup_item_status def database_type Azure::Web::Mgmt::V2018_02_01::Models::DatabaseType end - def backup_restore_operation_type - Azure::Web::Mgmt::V2018_02_01::Models::BackupRestoreOperationType - end def access_control_entry_action Azure::Web::Mgmt::V2018_02_01::Models::AccessControlEntryAction end - def public_certificate_location - Azure::Web::Mgmt::V2018_02_01::Models::PublicCertificateLocation - end def dimension Azure::Web::Mgmt::V2018_02_01::Models::Dimension end @@ -1190,15 +1193,15 @@ def snapshot_recovery_source def site_seal_request Azure::Web::Mgmt::V2018_02_01::Models::SiteSealRequest end - def managed_service_identity - Azure::Web::Mgmt::V2018_02_01::Models::ManagedServiceIdentity - end def app_service_certificate Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificate end def azure_storage_info_value Azure::Web::Mgmt::V2018_02_01::Models::AzureStorageInfoValue end + def managed_service_identity + Azure::Web::Mgmt::V2018_02_01::Models::ManagedServiceIdentity + end def domain_availablility_check_result Azure::Web::Mgmt::V2018_02_01::Models::DomainAvailablilityCheckResult end @@ -1409,9 +1412,6 @@ def resource_name_availability def abnormal_time_period Azure::Web::Mgmt::V2018_02_01::Models::AbnormalTimePeriod end - def resource_metric_name - Azure::Web::Mgmt::V2018_02_01::Models::ResourceMetricName - end end end end diff --git a/azure_sdk/lib/latest/modules/websearch_profile_module.rb b/azure_sdk/lib/latest/modules/websearch_profile_module.rb index b3900e0b76..a2fdf3798f 100644 --- a/azure_sdk/lib/latest/modules/websearch_profile_module.rb +++ b/azure_sdk/lib/latest/modules/websearch_profile_module.rb @@ -14,14 +14,14 @@ module Models Videos = Azure::CognitiveServices::WebSearch::V1_0::Models::Videos AnswerType = Azure::CognitiveServices::WebSearch::V1_0::Models::AnswerType NewsArticle = Azure::CognitiveServices::WebSearch::V1_0::Models::NewsArticle - News = Azure::CognitiveServices::WebSearch::V1_0::Models::News Response = Azure::CognitiveServices::WebSearch::V1_0::Models::Response + News = Azure::CognitiveServices::WebSearch::V1_0::Models::News ResponseBase = Azure::CognitiveServices::WebSearch::V1_0::Models::ResponseBase QueryContext = Azure::CognitiveServices::WebSearch::V1_0::Models::QueryContext VideoObject = Azure::CognitiveServices::WebSearch::V1_0::Models::VideoObject - RankingRankingItem = Azure::CognitiveServices::WebSearch::V1_0::Models::RankingRankingItem - RankingRankingGroup = Azure::CognitiveServices::WebSearch::V1_0::Models::RankingRankingGroup + Query = Azure::CognitiveServices::WebSearch::V1_0::Models::Query RankingRankingResponse = Azure::CognitiveServices::WebSearch::V1_0::Models::RankingRankingResponse + RankingRankingItem = Azure::CognitiveServices::WebSearch::V1_0::Models::RankingRankingItem SearchResponse = Azure::CognitiveServices::WebSearch::V1_0::Models::SearchResponse Computation = Azure::CognitiveServices::WebSearch::V1_0::Models::Computation Identifiable = Azure::CognitiveServices::WebSearch::V1_0::Models::Identifiable @@ -33,14 +33,14 @@ module Models WebPage = Azure::CognitiveServices::WebSearch::V1_0::Models::WebPage WebWebGrouping = Azure::CognitiveServices::WebSearch::V1_0::Models::WebWebGrouping TimeZone = Azure::CognitiveServices::WebSearch::V1_0::Models::TimeZone - Query = Azure::CognitiveServices::WebSearch::V1_0::Models::Query - WebMetaTag = Azure::CognitiveServices::WebSearch::V1_0::Models::WebMetaTag + SafeSearch = Azure::CognitiveServices::WebSearch::V1_0::Models::SafeSearch + RankingRankingGroup = Azure::CognitiveServices::WebSearch::V1_0::Models::RankingRankingGroup SpellSuggestions = Azure::CognitiveServices::WebSearch::V1_0::Models::SpellSuggestions WebWebAnswer = Azure::CognitiveServices::WebSearch::V1_0::Models::WebWebAnswer Article = Azure::CognitiveServices::WebSearch::V1_0::Models::Article ErrorCode = Azure::CognitiveServices::WebSearch::V1_0::Models::ErrorCode RelatedSearchesRelatedSearchAnswer = Azure::CognitiveServices::WebSearch::V1_0::Models::RelatedSearchesRelatedSearchAnswer - SafeSearch = Azure::CognitiveServices::WebSearch::V1_0::Models::SafeSearch + WebMetaTag = Azure::CognitiveServices::WebSearch::V1_0::Models::WebMetaTag TextFormat = Azure::CognitiveServices::WebSearch::V1_0::Models::TextFormat ErrorSubCode = Azure::CognitiveServices::WebSearch::V1_0::Models::ErrorSubCode ErrorResponse = Azure::CognitiveServices::WebSearch::V1_0::Models::ErrorResponse @@ -48,8 +48,8 @@ module Models ImageObject = Azure::CognitiveServices::WebSearch::V1_0::Models::ImageObject Places = Azure::CognitiveServices::WebSearch::V1_0::Models::Places Intangible = Azure::CognitiveServices::WebSearch::V1_0::Models::Intangible - MediaObject = Azure::CognitiveServices::WebSearch::V1_0::Models::MediaObject Error = Azure::CognitiveServices::WebSearch::V1_0::Models::Error + MediaObject = Azure::CognitiveServices::WebSearch::V1_0::Models::MediaObject end class WebSearchDataClass @@ -97,12 +97,12 @@ def answer_type def news_article Azure::CognitiveServices::WebSearch::V1_0::Models::NewsArticle end - def news - Azure::CognitiveServices::WebSearch::V1_0::Models::News - end def response Azure::CognitiveServices::WebSearch::V1_0::Models::Response end + def news + Azure::CognitiveServices::WebSearch::V1_0::Models::News + end def response_base Azure::CognitiveServices::WebSearch::V1_0::Models::ResponseBase end @@ -112,15 +112,15 @@ def query_context def video_object Azure::CognitiveServices::WebSearch::V1_0::Models::VideoObject end - def ranking_ranking_item - Azure::CognitiveServices::WebSearch::V1_0::Models::RankingRankingItem - end - def ranking_ranking_group - Azure::CognitiveServices::WebSearch::V1_0::Models::RankingRankingGroup + def query + Azure::CognitiveServices::WebSearch::V1_0::Models::Query end def ranking_ranking_response Azure::CognitiveServices::WebSearch::V1_0::Models::RankingRankingResponse end + def ranking_ranking_item + Azure::CognitiveServices::WebSearch::V1_0::Models::RankingRankingItem + end def search_response Azure::CognitiveServices::WebSearch::V1_0::Models::SearchResponse end @@ -154,11 +154,11 @@ def web_web_grouping def time_zone Azure::CognitiveServices::WebSearch::V1_0::Models::TimeZone end - def query - Azure::CognitiveServices::WebSearch::V1_0::Models::Query + def safe_search + Azure::CognitiveServices::WebSearch::V1_0::Models::SafeSearch end - def web_meta_tag - Azure::CognitiveServices::WebSearch::V1_0::Models::WebMetaTag + def ranking_ranking_group + Azure::CognitiveServices::WebSearch::V1_0::Models::RankingRankingGroup end def spell_suggestions Azure::CognitiveServices::WebSearch::V1_0::Models::SpellSuggestions @@ -175,8 +175,8 @@ def error_code def related_searches_related_search_answer Azure::CognitiveServices::WebSearch::V1_0::Models::RelatedSearchesRelatedSearchAnswer end - def safe_search - Azure::CognitiveServices::WebSearch::V1_0::Models::SafeSearch + def web_meta_tag + Azure::CognitiveServices::WebSearch::V1_0::Models::WebMetaTag end def text_format Azure::CognitiveServices::WebSearch::V1_0::Models::TextFormat @@ -199,12 +199,12 @@ def places def intangible Azure::CognitiveServices::WebSearch::V1_0::Models::Intangible end - def media_object - Azure::CognitiveServices::WebSearch::V1_0::Models::MediaObject - end def error Azure::CognitiveServices::WebSearch::V1_0::Models::Error end + def media_object + Azure::CognitiveServices::WebSearch::V1_0::Models::MediaObject + end end end end diff --git a/azure_sdk/lib/v2017_03_09/modules/compute_profile_module.rb b/azure_sdk/lib/v2017_03_09/modules/compute_profile_module.rb index b9f1f65840..6c7c83cd37 100644 --- a/azure_sdk/lib/v2017_03_09/modules/compute_profile_module.rb +++ b/azure_sdk/lib/v2017_03_09/modules/compute_profile_module.rb @@ -18,6 +18,7 @@ module Mgmt VirtualMachineScaleSetVMs = Azure::Compute::Mgmt::V2016_03_30::VirtualMachineScaleSetVMs module Models + NetworkProfile = Azure::Compute::Mgmt::V2016_03_30::Models::NetworkProfile DiagnosticsProfile = Azure::Compute::Mgmt::V2016_03_30::Models::DiagnosticsProfile VirtualMachineAgentInstanceView = Azure::Compute::Mgmt::V2016_03_30::Models::VirtualMachineAgentInstanceView BootDiagnosticsInstanceView = Azure::Compute::Mgmt::V2016_03_30::Models::BootDiagnosticsInstanceView @@ -118,7 +119,6 @@ module Models SshConfiguration = Azure::Compute::Mgmt::V2016_03_30::Models::SshConfiguration VaultCertificate = Azure::Compute::Mgmt::V2016_03_30::Models::VaultCertificate OSProfile = Azure::Compute::Mgmt::V2016_03_30::Models::OSProfile - NetworkProfile = Azure::Compute::Mgmt::V2016_03_30::Models::NetworkProfile end class ComputeManagementClass @@ -159,6 +159,9 @@ def method_missing(method, *args) end class ModelClasses + def network_profile + Azure::Compute::Mgmt::V2016_03_30::Models::NetworkProfile + end def diagnostics_profile Azure::Compute::Mgmt::V2016_03_30::Models::DiagnosticsProfile end @@ -459,9 +462,6 @@ def vault_certificate def osprofile Azure::Compute::Mgmt::V2016_03_30::Models::OSProfile end - def network_profile - Azure::Compute::Mgmt::V2016_03_30::Models::NetworkProfile - end end end end diff --git a/azure_sdk/lib/v2017_03_09/modules/dns_profile_module.rb b/azure_sdk/lib/v2017_03_09/modules/dns_profile_module.rb index 9699702a9b..1a8f74bacb 100644 --- a/azure_sdk/lib/v2017_03_09/modules/dns_profile_module.rb +++ b/azure_sdk/lib/v2017_03_09/modules/dns_profile_module.rb @@ -19,10 +19,10 @@ module Models MxRecord = Azure::Dns::Mgmt::V2016_04_01::Models::MxRecord PtrRecord = Azure::Dns::Mgmt::V2016_04_01::Models::PtrRecord SrvRecord = Azure::Dns::Mgmt::V2016_04_01::Models::SrvRecord - CnameRecord = Azure::Dns::Mgmt::V2016_04_01::Models::CnameRecord + ZoneDeleteResult = Azure::Dns::Mgmt::V2016_04_01::Models::ZoneDeleteResult RecordSet = Azure::Dns::Mgmt::V2016_04_01::Models::RecordSet + CnameRecord = Azure::Dns::Mgmt::V2016_04_01::Models::CnameRecord ZoneListResult = Azure::Dns::Mgmt::V2016_04_01::Models::ZoneListResult - ZoneDeleteResult = Azure::Dns::Mgmt::V2016_04_01::Models::ZoneDeleteResult TxtRecord = Azure::Dns::Mgmt::V2016_04_01::Models::TxtRecord NsRecord = Azure::Dns::Mgmt::V2016_04_01::Models::NsRecord SoaRecord = Azure::Dns::Mgmt::V2016_04_01::Models::SoaRecord @@ -90,18 +90,18 @@ def ptr_record def srv_record Azure::Dns::Mgmt::V2016_04_01::Models::SrvRecord end - def cname_record - Azure::Dns::Mgmt::V2016_04_01::Models::CnameRecord + def zone_delete_result + Azure::Dns::Mgmt::V2016_04_01::Models::ZoneDeleteResult end def record_set Azure::Dns::Mgmt::V2016_04_01::Models::RecordSet end + def cname_record + Azure::Dns::Mgmt::V2016_04_01::Models::CnameRecord + end def zone_list_result Azure::Dns::Mgmt::V2016_04_01::Models::ZoneListResult end - def zone_delete_result - Azure::Dns::Mgmt::V2016_04_01::Models::ZoneDeleteResult - end def txt_record Azure::Dns::Mgmt::V2016_04_01::Models::TxtRecord end diff --git a/azure_sdk/lib/v2017_03_09/modules/features_profile_module.rb b/azure_sdk/lib/v2017_03_09/modules/features_profile_module.rb index 1fd5c1063d..45dc82f0df 100644 --- a/azure_sdk/lib/v2017_03_09/modules/features_profile_module.rb +++ b/azure_sdk/lib/v2017_03_09/modules/features_profile_module.rb @@ -10,12 +10,12 @@ module Mgmt Features = Azure::Features::Mgmt::V2015_12_01::Features module Models + OperationDisplay = Azure::Features::Mgmt::V2015_12_01::Models::OperationDisplay Operation = Azure::Features::Mgmt::V2015_12_01::Models::Operation OperationListResult = Azure::Features::Mgmt::V2015_12_01::Models::OperationListResult FeatureProperties = Azure::Features::Mgmt::V2015_12_01::Models::FeatureProperties FeatureOperationsListResult = Azure::Features::Mgmt::V2015_12_01::Models::FeatureOperationsListResult FeatureResult = Azure::Features::Mgmt::V2015_12_01::Models::FeatureResult - OperationDisplay = Azure::Features::Mgmt::V2015_12_01::Models::OperationDisplay end class FeaturesManagementClass @@ -48,6 +48,9 @@ def method_missing(method, *args) end class ModelClasses + def operation_display + Azure::Features::Mgmt::V2015_12_01::Models::OperationDisplay + end def operation Azure::Features::Mgmt::V2015_12_01::Models::Operation end @@ -63,9 +66,6 @@ def feature_operations_list_result def feature_result Azure::Features::Mgmt::V2015_12_01::Models::FeatureResult end - def operation_display - Azure::Features::Mgmt::V2015_12_01::Models::OperationDisplay - end end end end diff --git a/azure_sdk/lib/v2017_03_09/modules/keyvault_profile_module.rb b/azure_sdk/lib/v2017_03_09/modules/keyvault_profile_module.rb index 060cc39542..963b151852 100644 --- a/azure_sdk/lib/v2017_03_09/modules/keyvault_profile_module.rb +++ b/azure_sdk/lib/v2017_03_09/modules/keyvault_profile_module.rb @@ -65,8 +65,8 @@ module Models BackupKeyResult = Azure::KeyVault::V2016_10_01::Models::BackupKeyResult SecretItem = Azure::KeyVault::V2016_10_01::Models::SecretItem BackupSecretResult = Azure::KeyVault::V2016_10_01::Models::BackupSecretResult - SecretProperties = Azure::KeyVault::V2016_10_01::Models::SecretProperties Error = Azure::KeyVault::V2016_10_01::Models::Error + SecretProperties = Azure::KeyVault::V2016_10_01::Models::SecretProperties PendingCertificateSigningRequestResult = Azure::KeyVault::V2016_10_01::Models::PendingCertificateSigningRequestResult CertificateBundle = Azure::KeyVault::V2016_10_01::Models::CertificateBundle StorageAccountAttributes = Azure::KeyVault::V2016_10_01::Models::StorageAccountAttributes @@ -295,12 +295,12 @@ def secret_item def backup_secret_result Azure::KeyVault::V2016_10_01::Models::BackupSecretResult end - def secret_properties - Azure::KeyVault::V2016_10_01::Models::SecretProperties - end def error Azure::KeyVault::V2016_10_01::Models::Error end + def secret_properties + Azure::KeyVault::V2016_10_01::Models::SecretProperties + end def pending_certificate_signing_request_result Azure::KeyVault::V2016_10_01::Models::PendingCertificateSigningRequestResult end @@ -391,8 +391,8 @@ def json_web_key_signature_algorithm end end module Mgmt - Vaults = Azure::KeyVault::Mgmt::V2016_10_01::Vaults Operations = Azure::KeyVault::Mgmt::V2016_10_01::Operations + Vaults = Azure::KeyVault::Mgmt::V2016_10_01::Vaults module Models Permissions = Azure::KeyVault::Mgmt::V2016_10_01::Models::Permissions @@ -412,24 +412,24 @@ module Models VaultPatchProperties = Azure::KeyVault::Mgmt::V2016_10_01::Models::VaultPatchProperties CheckNameAvailabilityResult = Azure::KeyVault::Mgmt::V2016_10_01::Models::CheckNameAvailabilityResult VaultPatchParameters = Azure::KeyVault::Mgmt::V2016_10_01::Models::VaultPatchParameters - LogSpecification = Azure::KeyVault::Mgmt::V2016_10_01::Models::LogSpecification + AccessPolicyEntry = Azure::KeyVault::Mgmt::V2016_10_01::Models::AccessPolicyEntry DeletedVaultProperties = Azure::KeyVault::Mgmt::V2016_10_01::Models::DeletedVaultProperties ServiceSpecification = Azure::KeyVault::Mgmt::V2016_10_01::Models::ServiceSpecification - AccessPolicyEntry = Azure::KeyVault::Mgmt::V2016_10_01::Models::AccessPolicyEntry + LogSpecification = Azure::KeyVault::Mgmt::V2016_10_01::Models::LogSpecification SkuName = Azure::KeyVault::Mgmt::V2016_10_01::Models::SkuName Vault = Azure::KeyVault::Mgmt::V2016_10_01::Models::Vault SecretPermissions = Azure::KeyVault::Mgmt::V2016_10_01::Models::SecretPermissions KeyPermissions = Azure::KeyVault::Mgmt::V2016_10_01::Models::KeyPermissions StoragePermissions = Azure::KeyVault::Mgmt::V2016_10_01::Models::StoragePermissions CertificatePermissions = Azure::KeyVault::Mgmt::V2016_10_01::Models::CertificatePermissions - AccessPolicyUpdateKind = Azure::KeyVault::Mgmt::V2016_10_01::Models::AccessPolicyUpdateKind + Reason = Azure::KeyVault::Mgmt::V2016_10_01::Models::Reason CreateMode = Azure::KeyVault::Mgmt::V2016_10_01::Models::CreateMode + AccessPolicyUpdateKind = Azure::KeyVault::Mgmt::V2016_10_01::Models::AccessPolicyUpdateKind Sku = Azure::KeyVault::Mgmt::V2016_10_01::Models::Sku - Reason = Azure::KeyVault::Mgmt::V2016_10_01::Models::Reason end class KeyVaultManagementClass - attr_reader :vaults, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :vaults, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -439,8 +439,8 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) - @vaults = @client_0.vaults @operations = @client_0.operations + @vaults = @client_0.vaults @model_classes = ModelClasses.new end @@ -510,8 +510,8 @@ def check_name_availability_result def vault_patch_parameters Azure::KeyVault::Mgmt::V2016_10_01::Models::VaultPatchParameters end - def log_specification - Azure::KeyVault::Mgmt::V2016_10_01::Models::LogSpecification + def access_policy_entry + Azure::KeyVault::Mgmt::V2016_10_01::Models::AccessPolicyEntry end def deleted_vault_properties Azure::KeyVault::Mgmt::V2016_10_01::Models::DeletedVaultProperties @@ -519,8 +519,8 @@ def deleted_vault_properties def service_specification Azure::KeyVault::Mgmt::V2016_10_01::Models::ServiceSpecification end - def access_policy_entry - Azure::KeyVault::Mgmt::V2016_10_01::Models::AccessPolicyEntry + def log_specification + Azure::KeyVault::Mgmt::V2016_10_01::Models::LogSpecification end def sku_name Azure::KeyVault::Mgmt::V2016_10_01::Models::SkuName @@ -540,18 +540,18 @@ def storage_permissions def certificate_permissions Azure::KeyVault::Mgmt::V2016_10_01::Models::CertificatePermissions end - def access_policy_update_kind - Azure::KeyVault::Mgmt::V2016_10_01::Models::AccessPolicyUpdateKind + def reason + Azure::KeyVault::Mgmt::V2016_10_01::Models::Reason end def create_mode Azure::KeyVault::Mgmt::V2016_10_01::Models::CreateMode end + def access_policy_update_kind + Azure::KeyVault::Mgmt::V2016_10_01::Models::AccessPolicyUpdateKind + end def sku Azure::KeyVault::Mgmt::V2016_10_01::Models::Sku end - def reason - Azure::KeyVault::Mgmt::V2016_10_01::Models::Reason - end end end end diff --git a/azure_sdk/lib/v2017_03_09/modules/links_profile_module.rb b/azure_sdk/lib/v2017_03_09/modules/links_profile_module.rb index a8d8957bb6..c854930966 100644 --- a/azure_sdk/lib/v2017_03_09/modules/links_profile_module.rb +++ b/azure_sdk/lib/v2017_03_09/modules/links_profile_module.rb @@ -7,10 +7,11 @@ module Azure::Profiles::V2017_03_09 module Links module Mgmt - ResourceLinks = Azure::Links::Mgmt::V2016_09_01::ResourceLinks Operations = Azure::Links::Mgmt::V2016_09_01::Operations + ResourceLinks = Azure::Links::Mgmt::V2016_09_01::ResourceLinks module Models + OperationDisplay = Azure::Links::Mgmt::V2016_09_01::Models::OperationDisplay Operation = Azure::Links::Mgmt::V2016_09_01::Models::Operation OperationListResult = Azure::Links::Mgmt::V2016_09_01::Models::OperationListResult ResourceLinkResult = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkResult @@ -18,11 +19,10 @@ module Models ResourceLinkFilter = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkFilter ResourceLink = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLink Filter = Azure::Links::Mgmt::V2016_09_01::Models::Filter - OperationDisplay = Azure::Links::Mgmt::V2016_09_01::Models::OperationDisplay end class LinksManagementClass - attr_reader :resource_links, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :resource_links, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -32,8 +32,8 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) - @resource_links = @client_0.resource_links @operations = @client_0.operations + @resource_links = @client_0.resource_links @model_classes = ModelClasses.new end @@ -52,6 +52,9 @@ def method_missing(method, *args) end class ModelClasses + def operation_display + Azure::Links::Mgmt::V2016_09_01::Models::OperationDisplay + end def operation Azure::Links::Mgmt::V2016_09_01::Models::Operation end @@ -73,9 +76,6 @@ def resource_link def filter Azure::Links::Mgmt::V2016_09_01::Models::Filter end - def operation_display - Azure::Links::Mgmt::V2016_09_01::Models::OperationDisplay - end end end end diff --git a/azure_sdk/lib/v2017_03_09/modules/network_profile_module.rb b/azure_sdk/lib/v2017_03_09/modules/network_profile_module.rb index 44b879f9e8..1dd59375c2 100644 --- a/azure_sdk/lib/v2017_03_09/modules/network_profile_module.rb +++ b/azure_sdk/lib/v2017_03_09/modules/network_profile_module.rb @@ -68,35 +68,35 @@ module Models ExpressRouteCircuitAuthorization = Azure::Network::Mgmt::V2015_06_15::Models::ExpressRouteCircuitAuthorization ApplicationGatewayBackendHttpSettings = Azure::Network::Mgmt::V2015_06_15::Models::ApplicationGatewayBackendHttpSettings ApplicationGatewayBackendAddressPool = Azure::Network::Mgmt::V2015_06_15::Models::ApplicationGatewayBackendAddressPool - ExpressRouteServiceProvider = Azure::Network::Mgmt::V2015_06_15::Models::ExpressRouteServiceProvider + FrontendIPConfiguration = Azure::Network::Mgmt::V2015_06_15::Models::FrontendIPConfiguration LoadBalancingRule = Azure::Network::Mgmt::V2015_06_15::Models::LoadBalancingRule Probe = Azure::Network::Mgmt::V2015_06_15::Models::Probe InboundNatPool = Azure::Network::Mgmt::V2015_06_15::Models::InboundNatPool ExpressRouteCircuit = Azure::Network::Mgmt::V2015_06_15::Models::ExpressRouteCircuit - ApplicationGatewayPathRule = Azure::Network::Mgmt::V2015_06_15::Models::ApplicationGatewayPathRule + ExpressRouteServiceProvider = Azure::Network::Mgmt::V2015_06_15::Models::ExpressRouteServiceProvider ExpressRouteCircuitPeering = Azure::Network::Mgmt::V2015_06_15::Models::ExpressRouteCircuitPeering OutboundNatRule = Azure::Network::Mgmt::V2015_06_15::Models::OutboundNatRule IPConfiguration = Azure::Network::Mgmt::V2015_06_15::Models::IPConfiguration IPAllocationMethod = Azure::Network::Mgmt::V2015_06_15::Models::IPAllocationMethod NetworkInterfaceIPConfiguration = Azure::Network::Mgmt::V2015_06_15::Models::NetworkInterfaceIPConfiguration VirtualNetwork = Azure::Network::Mgmt::V2015_06_15::Models::VirtualNetwork - VirtualNetworkGatewayIPConfiguration = Azure::Network::Mgmt::V2015_06_15::Models::VirtualNetworkGatewayIPConfiguration + ApplicationGatewayPathRule = Azure::Network::Mgmt::V2015_06_15::Models::ApplicationGatewayPathRule VpnClientRootCertificate = Azure::Network::Mgmt::V2015_06_15::Models::VpnClientRootCertificate VpnClientRevokedCertificate = Azure::Network::Mgmt::V2015_06_15::Models::VpnClientRevokedCertificate - LoadBalancer = Azure::Network::Mgmt::V2015_06_15::Models::LoadBalancer + VirtualNetworkGatewayIPConfiguration = Azure::Network::Mgmt::V2015_06_15::Models::VirtualNetworkGatewayIPConfiguration VirtualNetworkGateway = Azure::Network::Mgmt::V2015_06_15::Models::VirtualNetworkGateway LocalNetworkGateway = Azure::Network::Mgmt::V2015_06_15::Models::LocalNetworkGateway VirtualNetworkGatewayConnection = Azure::Network::Mgmt::V2015_06_15::Models::VirtualNetworkGatewayConnection ApplicationGatewayHttpListener = Azure::Network::Mgmt::V2015_06_15::Models::ApplicationGatewayHttpListener - ApplicationGatewayProtocol = Azure::Network::Mgmt::V2015_06_15::Models::ApplicationGatewayProtocol + LoadBalancer = Azure::Network::Mgmt::V2015_06_15::Models::LoadBalancer ApplicationGatewayProbe = Azure::Network::Mgmt::V2015_06_15::Models::ApplicationGatewayProbe ApplicationGatewaySkuName = Azure::Network::Mgmt::V2015_06_15::Models::ApplicationGatewaySkuName ApplicationGatewayTier = Azure::Network::Mgmt::V2015_06_15::Models::ApplicationGatewayTier SecurityRuleAccess = Azure::Network::Mgmt::V2015_06_15::Models::SecurityRuleAccess SecurityRuleDirection = Azure::Network::Mgmt::V2015_06_15::Models::SecurityRuleDirection TransportProtocol = Azure::Network::Mgmt::V2015_06_15::Models::TransportProtocol - FrontendIPConfiguration = Azure::Network::Mgmt::V2015_06_15::Models::FrontendIPConfiguration ApplicationGatewayRequestRoutingRuleType = Azure::Network::Mgmt::V2015_06_15::Models::ApplicationGatewayRequestRoutingRuleType + ApplicationGatewayProtocol = Azure::Network::Mgmt::V2015_06_15::Models::ApplicationGatewayProtocol RouteNextHopType = Azure::Network::Mgmt::V2015_06_15::Models::RouteNextHopType SecurityRuleProtocol = Azure::Network::Mgmt::V2015_06_15::Models::SecurityRuleProtocol AuthorizationUseStatus = Azure::Network::Mgmt::V2015_06_15::Models::AuthorizationUseStatus @@ -317,8 +317,8 @@ def application_gateway_backend_http_settings def application_gateway_backend_address_pool Azure::Network::Mgmt::V2015_06_15::Models::ApplicationGatewayBackendAddressPool end - def express_route_service_provider - Azure::Network::Mgmt::V2015_06_15::Models::ExpressRouteServiceProvider + def frontend_ipconfiguration + Azure::Network::Mgmt::V2015_06_15::Models::FrontendIPConfiguration end def load_balancing_rule Azure::Network::Mgmt::V2015_06_15::Models::LoadBalancingRule @@ -332,8 +332,8 @@ def inbound_nat_pool def express_route_circuit Azure::Network::Mgmt::V2015_06_15::Models::ExpressRouteCircuit end - def application_gateway_path_rule - Azure::Network::Mgmt::V2015_06_15::Models::ApplicationGatewayPathRule + def express_route_service_provider + Azure::Network::Mgmt::V2015_06_15::Models::ExpressRouteServiceProvider end def express_route_circuit_peering Azure::Network::Mgmt::V2015_06_15::Models::ExpressRouteCircuitPeering @@ -353,8 +353,8 @@ def network_interface_ipconfiguration def virtual_network Azure::Network::Mgmt::V2015_06_15::Models::VirtualNetwork end - def virtual_network_gateway_ipconfiguration - Azure::Network::Mgmt::V2015_06_15::Models::VirtualNetworkGatewayIPConfiguration + def application_gateway_path_rule + Azure::Network::Mgmt::V2015_06_15::Models::ApplicationGatewayPathRule end def vpn_client_root_certificate Azure::Network::Mgmt::V2015_06_15::Models::VpnClientRootCertificate @@ -362,8 +362,8 @@ def vpn_client_root_certificate def vpn_client_revoked_certificate Azure::Network::Mgmt::V2015_06_15::Models::VpnClientRevokedCertificate end - def load_balancer - Azure::Network::Mgmt::V2015_06_15::Models::LoadBalancer + def virtual_network_gateway_ipconfiguration + Azure::Network::Mgmt::V2015_06_15::Models::VirtualNetworkGatewayIPConfiguration end def virtual_network_gateway Azure::Network::Mgmt::V2015_06_15::Models::VirtualNetworkGateway @@ -377,8 +377,8 @@ def virtual_network_gateway_connection def application_gateway_http_listener Azure::Network::Mgmt::V2015_06_15::Models::ApplicationGatewayHttpListener end - def application_gateway_protocol - Azure::Network::Mgmt::V2015_06_15::Models::ApplicationGatewayProtocol + def load_balancer + Azure::Network::Mgmt::V2015_06_15::Models::LoadBalancer end def application_gateway_probe Azure::Network::Mgmt::V2015_06_15::Models::ApplicationGatewayProbe @@ -398,12 +398,12 @@ def security_rule_direction def transport_protocol Azure::Network::Mgmt::V2015_06_15::Models::TransportProtocol end - def frontend_ipconfiguration - Azure::Network::Mgmt::V2015_06_15::Models::FrontendIPConfiguration - end def application_gateway_request_routing_rule_type Azure::Network::Mgmt::V2015_06_15::Models::ApplicationGatewayRequestRoutingRuleType end + def application_gateway_protocol + Azure::Network::Mgmt::V2015_06_15::Models::ApplicationGatewayProtocol + end def route_next_hop_type Azure::Network::Mgmt::V2015_06_15::Models::RouteNextHopType end diff --git a/azure_sdk/lib/v2017_03_09/modules/resources_profile_module.rb b/azure_sdk/lib/v2017_03_09/modules/resources_profile_module.rb index 734edd59a4..97f6ea3e16 100644 --- a/azure_sdk/lib/v2017_03_09/modules/resources_profile_module.rb +++ b/azure_sdk/lib/v2017_03_09/modules/resources_profile_module.rb @@ -11,8 +11,8 @@ module Mgmt Providers = Azure::Resources::Mgmt::V2016_02_01::Providers ResourceGroups = Azure::Resources::Mgmt::V2016_02_01::ResourceGroups Tags = Azure::Resources::Mgmt::V2016_02_01::Tags - DeploymentOperations = Azure::Resources::Mgmt::V2016_02_01::DeploymentOperations Resources = Azure::Resources::Mgmt::V2016_02_01::Resources + DeploymentOperations = Azure::Resources::Mgmt::V2016_02_01::DeploymentOperations module Models GenericResourceFilter = Azure::Resources::Mgmt::V2016_02_01::Models::GenericResourceFilter @@ -24,10 +24,11 @@ module Models ResourceManagementErrorWithDetails = Azure::Resources::Mgmt::V2016_02_01::Models::ResourceManagementErrorWithDetails ResourceGroup = Azure::Resources::Mgmt::V2016_02_01::Models::ResourceGroup AliasType = Azure::Resources::Mgmt::V2016_02_01::Models::AliasType + Dependency = Azure::Resources::Mgmt::V2016_02_01::Models::Dependency Provider = Azure::Resources::Mgmt::V2016_02_01::Models::Provider ResourceGroupListResult = Azure::Resources::Mgmt::V2016_02_01::Models::ResourceGroupListResult ResourcesMoveInfo = Azure::Resources::Mgmt::V2016_02_01::Models::ResourcesMoveInfo - Dependency = Azure::Resources::Mgmt::V2016_02_01::Models::Dependency + DeploymentPropertiesExtended = Azure::Resources::Mgmt::V2016_02_01::Models::DeploymentPropertiesExtended ExportTemplateRequest = Azure::Resources::Mgmt::V2016_02_01::Models::ExportTemplateRequest DeploymentExtended = Azure::Resources::Mgmt::V2016_02_01::Models::DeploymentExtended TagCount = Azure::Resources::Mgmt::V2016_02_01::Models::TagCount @@ -37,7 +38,7 @@ module Models TagDetails = Azure::Resources::Mgmt::V2016_02_01::Models::TagDetails DeploymentProperties = Azure::Resources::Mgmt::V2016_02_01::Models::DeploymentProperties TagsListResult = Azure::Resources::Mgmt::V2016_02_01::Models::TagsListResult - DeploymentPropertiesExtended = Azure::Resources::Mgmt::V2016_02_01::Models::DeploymentPropertiesExtended + AliasPathType = Azure::Resources::Mgmt::V2016_02_01::Models::AliasPathType TargetResource = Azure::Resources::Mgmt::V2016_02_01::Models::TargetResource BasicDependency = Azure::Resources::Mgmt::V2016_02_01::Models::BasicDependency HttpMessage = Azure::Resources::Mgmt::V2016_02_01::Models::HttpMessage @@ -47,7 +48,6 @@ module Models DeploymentOperation = Azure::Resources::Mgmt::V2016_02_01::Models::DeploymentOperation DeploymentExportResult = Azure::Resources::Mgmt::V2016_02_01::Models::DeploymentExportResult DeploymentOperationsListResult = Azure::Resources::Mgmt::V2016_02_01::Models::DeploymentOperationsListResult - AliasPathType = Azure::Resources::Mgmt::V2016_02_01::Models::AliasPathType ResourceProviderOperationDisplayProperties = Azure::Resources::Mgmt::V2016_02_01::Models::ResourceProviderOperationDisplayProperties DebugSetting = Azure::Resources::Mgmt::V2016_02_01::Models::DebugSetting DeploymentListResult = Azure::Resources::Mgmt::V2016_02_01::Models::DeploymentListResult @@ -64,7 +64,7 @@ module Models end class ResourcesManagementClass - attr_reader :deployments, :providers, :resource_groups, :tags, :deployment_operations, :resources, :configurable, :base_url, :options, :model_classes + attr_reader :deployments, :providers, :resource_groups, :tags, :resources, :deployment_operations, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -78,8 +78,8 @@ def initialize(configurable, base_url=nil, options=nil) @providers = @client_0.providers @resource_groups = @client_0.resource_groups @tags = @client_0.tags - @deployment_operations = @client_0.deployment_operations @resources = @client_0.resources + @deployment_operations = @client_0.deployment_operations @model_classes = ModelClasses.new end @@ -125,6 +125,9 @@ def resource_group def alias_type Azure::Resources::Mgmt::V2016_02_01::Models::AliasType end + def dependency + Azure::Resources::Mgmt::V2016_02_01::Models::Dependency + end def provider Azure::Resources::Mgmt::V2016_02_01::Models::Provider end @@ -134,8 +137,8 @@ def resource_group_list_result def resources_move_info Azure::Resources::Mgmt::V2016_02_01::Models::ResourcesMoveInfo end - def dependency - Azure::Resources::Mgmt::V2016_02_01::Models::Dependency + def deployment_properties_extended + Azure::Resources::Mgmt::V2016_02_01::Models::DeploymentPropertiesExtended end def export_template_request Azure::Resources::Mgmt::V2016_02_01::Models::ExportTemplateRequest @@ -164,8 +167,8 @@ def deployment_properties def tags_list_result Azure::Resources::Mgmt::V2016_02_01::Models::TagsListResult end - def deployment_properties_extended - Azure::Resources::Mgmt::V2016_02_01::Models::DeploymentPropertiesExtended + def alias_path_type + Azure::Resources::Mgmt::V2016_02_01::Models::AliasPathType end def target_resource Azure::Resources::Mgmt::V2016_02_01::Models::TargetResource @@ -194,9 +197,6 @@ def deployment_export_result def deployment_operations_list_result Azure::Resources::Mgmt::V2016_02_01::Models::DeploymentOperationsListResult end - def alias_path_type - Azure::Resources::Mgmt::V2016_02_01::Models::AliasPathType - end def resource_provider_operation_display_properties Azure::Resources::Mgmt::V2016_02_01::Models::ResourceProviderOperationDisplayProperties end diff --git a/azure_sdk/lib/v2017_03_09/modules/storage_profile_module.rb b/azure_sdk/lib/v2017_03_09/modules/storage_profile_module.rb index 3d44440141..7c9e8c0bb7 100644 --- a/azure_sdk/lib/v2017_03_09/modules/storage_profile_module.rb +++ b/azure_sdk/lib/v2017_03_09/modules/storage_profile_module.rb @@ -7,8 +7,8 @@ module Azure::Profiles::V2017_03_09 module Storage module Mgmt - UsageOperations = Azure::Storage::Mgmt::V2016_01_01::UsageOperations StorageAccounts = Azure::Storage::Mgmt::V2016_01_01::StorageAccounts + UsageOperations = Azure::Storage::Mgmt::V2016_01_01::UsageOperations module Models StorageAccountCreateParameters = Azure::Storage::Mgmt::V2016_01_01::Models::StorageAccountCreateParameters @@ -21,7 +21,7 @@ module Models StorageAccountListResult = Azure::Storage::Mgmt::V2016_01_01::Models::StorageAccountListResult EncryptionService = Azure::Storage::Mgmt::V2016_01_01::Models::EncryptionService StorageAccountListKeysResult = Azure::Storage::Mgmt::V2016_01_01::Models::StorageAccountListKeysResult - Encryption = Azure::Storage::Mgmt::V2016_01_01::Models::Encryption + StorageAccountRegenerateKeyParameters = Azure::Storage::Mgmt::V2016_01_01::Models::StorageAccountRegenerateKeyParameters Endpoints = Azure::Storage::Mgmt::V2016_01_01::Models::Endpoints CustomDomain = Azure::Storage::Mgmt::V2016_01_01::Models::CustomDomain EncryptionServices = Azure::Storage::Mgmt::V2016_01_01::Models::EncryptionServices @@ -29,20 +29,20 @@ module Models StorageAccount = Azure::Storage::Mgmt::V2016_01_01::Models::StorageAccount Usage = Azure::Storage::Mgmt::V2016_01_01::Models::Usage SkuTier = Azure::Storage::Mgmt::V2016_01_01::Models::SkuTier - Reason = Azure::Storage::Mgmt::V2016_01_01::Models::Reason + AccessTier = Azure::Storage::Mgmt::V2016_01_01::Models::AccessTier SkuName = Azure::Storage::Mgmt::V2016_01_01::Models::SkuName - StorageAccountRegenerateKeyParameters = Azure::Storage::Mgmt::V2016_01_01::Models::StorageAccountRegenerateKeyParameters + Reason = Azure::Storage::Mgmt::V2016_01_01::Models::Reason Kind = Azure::Storage::Mgmt::V2016_01_01::Models::Kind AccountStatus = Azure::Storage::Mgmt::V2016_01_01::Models::AccountStatus - AccessTier = Azure::Storage::Mgmt::V2016_01_01::Models::AccessTier - UsageUnit = Azure::Storage::Mgmt::V2016_01_01::Models::UsageUnit + KeyPermission = Azure::Storage::Mgmt::V2016_01_01::Models::KeyPermission + Encryption = Azure::Storage::Mgmt::V2016_01_01::Models::Encryption Sku = Azure::Storage::Mgmt::V2016_01_01::Models::Sku UsageName = Azure::Storage::Mgmt::V2016_01_01::Models::UsageName - KeyPermission = Azure::Storage::Mgmt::V2016_01_01::Models::KeyPermission + UsageUnit = Azure::Storage::Mgmt::V2016_01_01::Models::UsageUnit end class StorageManagementClass - attr_reader :usage_operations, :storage_accounts, :configurable, :base_url, :options, :model_classes + attr_reader :storage_accounts, :usage_operations, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -52,8 +52,8 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) - @usage_operations = @client_0.usage_operations @storage_accounts = @client_0.storage_accounts + @usage_operations = @client_0.usage_operations @model_classes = ModelClasses.new end @@ -102,8 +102,8 @@ def encryption_service def storage_account_list_keys_result Azure::Storage::Mgmt::V2016_01_01::Models::StorageAccountListKeysResult end - def encryption - Azure::Storage::Mgmt::V2016_01_01::Models::Encryption + def storage_account_regenerate_key_parameters + Azure::Storage::Mgmt::V2016_01_01::Models::StorageAccountRegenerateKeyParameters end def endpoints Azure::Storage::Mgmt::V2016_01_01::Models::Endpoints @@ -126,14 +126,14 @@ def usage def sku_tier Azure::Storage::Mgmt::V2016_01_01::Models::SkuTier end - def reason - Azure::Storage::Mgmt::V2016_01_01::Models::Reason + def access_tier + Azure::Storage::Mgmt::V2016_01_01::Models::AccessTier end def sku_name Azure::Storage::Mgmt::V2016_01_01::Models::SkuName end - def storage_account_regenerate_key_parameters - Azure::Storage::Mgmt::V2016_01_01::Models::StorageAccountRegenerateKeyParameters + def reason + Azure::Storage::Mgmt::V2016_01_01::Models::Reason end def kind Azure::Storage::Mgmt::V2016_01_01::Models::Kind @@ -141,11 +141,11 @@ def kind def account_status Azure::Storage::Mgmt::V2016_01_01::Models::AccountStatus end - def access_tier - Azure::Storage::Mgmt::V2016_01_01::Models::AccessTier + def key_permission + Azure::Storage::Mgmt::V2016_01_01::Models::KeyPermission end - def usage_unit - Azure::Storage::Mgmt::V2016_01_01::Models::UsageUnit + def encryption + Azure::Storage::Mgmt::V2016_01_01::Models::Encryption end def sku Azure::Storage::Mgmt::V2016_01_01::Models::Sku @@ -153,8 +153,8 @@ def sku def usage_name Azure::Storage::Mgmt::V2016_01_01::Models::UsageName end - def key_permission - Azure::Storage::Mgmt::V2016_01_01::Models::KeyPermission + def usage_unit + Azure::Storage::Mgmt::V2016_01_01::Models::UsageUnit end end end diff --git a/azure_sdk/lib/v2018_03_01/modules/compute_profile_module.rb b/azure_sdk/lib/v2018_03_01/modules/compute_profile_module.rb index 4726bc6af2..3c5710c0c4 100644 --- a/azure_sdk/lib/v2018_03_01/modules/compute_profile_module.rb +++ b/azure_sdk/lib/v2018_03_01/modules/compute_profile_module.rb @@ -25,6 +25,7 @@ module Mgmt VirtualMachineRunCommands = Azure::Compute::Mgmt::V2017_03_30::VirtualMachineRunCommands module Models + NetworkProfile = Azure::Compute::Mgmt::V2017_03_30::Models::NetworkProfile KeyVaultAndSecretReference = Azure::Compute::Mgmt::V2017_03_30::Models::KeyVaultAndSecretReference DiagnosticsProfile = Azure::Compute::Mgmt::V2017_03_30::Models::DiagnosticsProfile SourceVault = Azure::Compute::Mgmt::V2017_03_30::Models::SourceVault @@ -193,7 +194,6 @@ module Models VirtualMachineScaleSetPublicIPAddressConfiguration = Azure::Compute::Mgmt::V2017_03_30::Models::VirtualMachineScaleSetPublicIPAddressConfiguration OSProfile = Azure::Compute::Mgmt::V2017_03_30::Models::OSProfile VirtualMachineScaleSetUpdatePublicIPAddressConfiguration = Azure::Compute::Mgmt::V2017_03_30::Models::VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - NetworkProfile = Azure::Compute::Mgmt::V2017_03_30::Models::NetworkProfile end class ComputeManagementClass @@ -241,6 +241,9 @@ def method_missing(method, *args) end class ModelClasses + def network_profile + Azure::Compute::Mgmt::V2017_03_30::Models::NetworkProfile + end def key_vault_and_secret_reference Azure::Compute::Mgmt::V2017_03_30::Models::KeyVaultAndSecretReference end @@ -745,9 +748,6 @@ def osprofile def virtual_machine_scale_set_update_public_ipaddress_configuration Azure::Compute::Mgmt::V2017_03_30::Models::VirtualMachineScaleSetUpdatePublicIPAddressConfiguration end - def network_profile - Azure::Compute::Mgmt::V2017_03_30::Models::NetworkProfile - end end end end diff --git a/azure_sdk/lib/v2018_03_01/modules/dns_profile_module.rb b/azure_sdk/lib/v2018_03_01/modules/dns_profile_module.rb index 5702f19cdb..f1aacc7d8c 100644 --- a/azure_sdk/lib/v2018_03_01/modules/dns_profile_module.rb +++ b/azure_sdk/lib/v2018_03_01/modules/dns_profile_module.rb @@ -19,10 +19,10 @@ module Models MxRecord = Azure::Dns::Mgmt::V2016_04_01::Models::MxRecord PtrRecord = Azure::Dns::Mgmt::V2016_04_01::Models::PtrRecord SrvRecord = Azure::Dns::Mgmt::V2016_04_01::Models::SrvRecord - CnameRecord = Azure::Dns::Mgmt::V2016_04_01::Models::CnameRecord + ZoneDeleteResult = Azure::Dns::Mgmt::V2016_04_01::Models::ZoneDeleteResult RecordSet = Azure::Dns::Mgmt::V2016_04_01::Models::RecordSet + CnameRecord = Azure::Dns::Mgmt::V2016_04_01::Models::CnameRecord ZoneListResult = Azure::Dns::Mgmt::V2016_04_01::Models::ZoneListResult - ZoneDeleteResult = Azure::Dns::Mgmt::V2016_04_01::Models::ZoneDeleteResult TxtRecord = Azure::Dns::Mgmt::V2016_04_01::Models::TxtRecord NsRecord = Azure::Dns::Mgmt::V2016_04_01::Models::NsRecord SoaRecord = Azure::Dns::Mgmt::V2016_04_01::Models::SoaRecord @@ -90,18 +90,18 @@ def ptr_record def srv_record Azure::Dns::Mgmt::V2016_04_01::Models::SrvRecord end - def cname_record - Azure::Dns::Mgmt::V2016_04_01::Models::CnameRecord + def zone_delete_result + Azure::Dns::Mgmt::V2016_04_01::Models::ZoneDeleteResult end def record_set Azure::Dns::Mgmt::V2016_04_01::Models::RecordSet end + def cname_record + Azure::Dns::Mgmt::V2016_04_01::Models::CnameRecord + end def zone_list_result Azure::Dns::Mgmt::V2016_04_01::Models::ZoneListResult end - def zone_delete_result - Azure::Dns::Mgmt::V2016_04_01::Models::ZoneDeleteResult - end def txt_record Azure::Dns::Mgmt::V2016_04_01::Models::TxtRecord end diff --git a/azure_sdk/lib/v2018_03_01/modules/keyvault_profile_module.rb b/azure_sdk/lib/v2018_03_01/modules/keyvault_profile_module.rb index bf21241f68..249acff709 100644 --- a/azure_sdk/lib/v2018_03_01/modules/keyvault_profile_module.rb +++ b/azure_sdk/lib/v2018_03_01/modules/keyvault_profile_module.rb @@ -65,8 +65,8 @@ module Models BackupKeyResult = Azure::KeyVault::V2016_10_01::Models::BackupKeyResult SecretItem = Azure::KeyVault::V2016_10_01::Models::SecretItem BackupSecretResult = Azure::KeyVault::V2016_10_01::Models::BackupSecretResult - SecretProperties = Azure::KeyVault::V2016_10_01::Models::SecretProperties Error = Azure::KeyVault::V2016_10_01::Models::Error + SecretProperties = Azure::KeyVault::V2016_10_01::Models::SecretProperties PendingCertificateSigningRequestResult = Azure::KeyVault::V2016_10_01::Models::PendingCertificateSigningRequestResult CertificateBundle = Azure::KeyVault::V2016_10_01::Models::CertificateBundle StorageAccountAttributes = Azure::KeyVault::V2016_10_01::Models::StorageAccountAttributes @@ -295,12 +295,12 @@ def secret_item def backup_secret_result Azure::KeyVault::V2016_10_01::Models::BackupSecretResult end - def secret_properties - Azure::KeyVault::V2016_10_01::Models::SecretProperties - end def error Azure::KeyVault::V2016_10_01::Models::Error end + def secret_properties + Azure::KeyVault::V2016_10_01::Models::SecretProperties + end def pending_certificate_signing_request_result Azure::KeyVault::V2016_10_01::Models::PendingCertificateSigningRequestResult end @@ -391,8 +391,8 @@ def json_web_key_signature_algorithm end end module Mgmt - Vaults = Azure::KeyVault::Mgmt::V2016_10_01::Vaults Operations = Azure::KeyVault::Mgmt::V2016_10_01::Operations + Vaults = Azure::KeyVault::Mgmt::V2016_10_01::Vaults module Models Permissions = Azure::KeyVault::Mgmt::V2016_10_01::Models::Permissions @@ -412,24 +412,24 @@ module Models VaultPatchProperties = Azure::KeyVault::Mgmt::V2016_10_01::Models::VaultPatchProperties CheckNameAvailabilityResult = Azure::KeyVault::Mgmt::V2016_10_01::Models::CheckNameAvailabilityResult VaultPatchParameters = Azure::KeyVault::Mgmt::V2016_10_01::Models::VaultPatchParameters - LogSpecification = Azure::KeyVault::Mgmt::V2016_10_01::Models::LogSpecification + AccessPolicyEntry = Azure::KeyVault::Mgmt::V2016_10_01::Models::AccessPolicyEntry DeletedVaultProperties = Azure::KeyVault::Mgmt::V2016_10_01::Models::DeletedVaultProperties ServiceSpecification = Azure::KeyVault::Mgmt::V2016_10_01::Models::ServiceSpecification - AccessPolicyEntry = Azure::KeyVault::Mgmt::V2016_10_01::Models::AccessPolicyEntry + LogSpecification = Azure::KeyVault::Mgmt::V2016_10_01::Models::LogSpecification SkuName = Azure::KeyVault::Mgmt::V2016_10_01::Models::SkuName Vault = Azure::KeyVault::Mgmt::V2016_10_01::Models::Vault SecretPermissions = Azure::KeyVault::Mgmt::V2016_10_01::Models::SecretPermissions KeyPermissions = Azure::KeyVault::Mgmt::V2016_10_01::Models::KeyPermissions StoragePermissions = Azure::KeyVault::Mgmt::V2016_10_01::Models::StoragePermissions CertificatePermissions = Azure::KeyVault::Mgmt::V2016_10_01::Models::CertificatePermissions - AccessPolicyUpdateKind = Azure::KeyVault::Mgmt::V2016_10_01::Models::AccessPolicyUpdateKind + Reason = Azure::KeyVault::Mgmt::V2016_10_01::Models::Reason CreateMode = Azure::KeyVault::Mgmt::V2016_10_01::Models::CreateMode + AccessPolicyUpdateKind = Azure::KeyVault::Mgmt::V2016_10_01::Models::AccessPolicyUpdateKind Sku = Azure::KeyVault::Mgmt::V2016_10_01::Models::Sku - Reason = Azure::KeyVault::Mgmt::V2016_10_01::Models::Reason end class KeyVaultManagementClass - attr_reader :vaults, :operations, :configurable, :base_url, :options, :model_classes + attr_reader :operations, :vaults, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -439,8 +439,8 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) - @vaults = @client_0.vaults @operations = @client_0.operations + @vaults = @client_0.vaults @model_classes = ModelClasses.new end @@ -510,8 +510,8 @@ def check_name_availability_result def vault_patch_parameters Azure::KeyVault::Mgmt::V2016_10_01::Models::VaultPatchParameters end - def log_specification - Azure::KeyVault::Mgmt::V2016_10_01::Models::LogSpecification + def access_policy_entry + Azure::KeyVault::Mgmt::V2016_10_01::Models::AccessPolicyEntry end def deleted_vault_properties Azure::KeyVault::Mgmt::V2016_10_01::Models::DeletedVaultProperties @@ -519,8 +519,8 @@ def deleted_vault_properties def service_specification Azure::KeyVault::Mgmt::V2016_10_01::Models::ServiceSpecification end - def access_policy_entry - Azure::KeyVault::Mgmt::V2016_10_01::Models::AccessPolicyEntry + def log_specification + Azure::KeyVault::Mgmt::V2016_10_01::Models::LogSpecification end def sku_name Azure::KeyVault::Mgmt::V2016_10_01::Models::SkuName @@ -540,18 +540,18 @@ def storage_permissions def certificate_permissions Azure::KeyVault::Mgmt::V2016_10_01::Models::CertificatePermissions end - def access_policy_update_kind - Azure::KeyVault::Mgmt::V2016_10_01::Models::AccessPolicyUpdateKind + def reason + Azure::KeyVault::Mgmt::V2016_10_01::Models::Reason end def create_mode Azure::KeyVault::Mgmt::V2016_10_01::Models::CreateMode end + def access_policy_update_kind + Azure::KeyVault::Mgmt::V2016_10_01::Models::AccessPolicyUpdateKind + end def sku Azure::KeyVault::Mgmt::V2016_10_01::Models::Sku end - def reason - Azure::KeyVault::Mgmt::V2016_10_01::Models::Reason - end end end end diff --git a/azure_sdk/lib/v2018_03_01/modules/locks_profile_module.rb b/azure_sdk/lib/v2018_03_01/modules/locks_profile_module.rb index c7e24cfc18..970e0b4e60 100644 --- a/azure_sdk/lib/v2018_03_01/modules/locks_profile_module.rb +++ b/azure_sdk/lib/v2018_03_01/modules/locks_profile_module.rb @@ -11,13 +11,13 @@ module Mgmt ManagementLocks = Azure::Locks::Mgmt::V2016_09_01::ManagementLocks module Models + OperationDisplay = Azure::Locks::Mgmt::V2016_09_01::Models::OperationDisplay ManagementLockOwner = Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockOwner Operation = Azure::Locks::Mgmt::V2016_09_01::Models::Operation ManagementLockListResult = Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockListResult OperationListResult = Azure::Locks::Mgmt::V2016_09_01::Models::OperationListResult ManagementLockObject = Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockObject LockLevel = Azure::Locks::Mgmt::V2016_09_01::Models::LockLevel - OperationDisplay = Azure::Locks::Mgmt::V2016_09_01::Models::OperationDisplay end class LocksManagementClass @@ -51,6 +51,9 @@ def method_missing(method, *args) end class ModelClasses + def operation_display + Azure::Locks::Mgmt::V2016_09_01::Models::OperationDisplay + end def management_lock_owner Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockOwner end @@ -69,9 +72,6 @@ def management_lock_object def lock_level Azure::Locks::Mgmt::V2016_09_01::Models::LockLevel end - def operation_display - Azure::Locks::Mgmt::V2016_09_01::Models::OperationDisplay - end end end end diff --git a/azure_sdk/lib/v2018_03_01/modules/network_profile_module.rb b/azure_sdk/lib/v2018_03_01/modules/network_profile_module.rb index 487aafb222..04d6ff4f05 100644 --- a/azure_sdk/lib/v2018_03_01/modules/network_profile_module.rb +++ b/azure_sdk/lib/v2018_03_01/modules/network_profile_module.rb @@ -88,10 +88,10 @@ module Models InboundNatRuleListResult = Azure::Network::Mgmt::V2017_10_01::Models::InboundNatRuleListResult LoadBalancerBackendAddressPoolListResult = Azure::Network::Mgmt::V2017_10_01::Models::LoadBalancerBackendAddressPoolListResult ConnectionResetSharedKey = Azure::Network::Mgmt::V2017_10_01::Models::ConnectionResetSharedKey - LoadBalancerFrontendIPConfigurationListResult = Azure::Network::Mgmt::V2017_10_01::Models::LoadBalancerFrontendIPConfigurationListResult Error = Azure::Network::Mgmt::V2017_10_01::Models::Error + LoadBalancerFrontendIPConfigurationListResult = Azure::Network::Mgmt::V2017_10_01::Models::LoadBalancerFrontendIPConfigurationListResult IpsecPolicy = Azure::Network::Mgmt::V2017_10_01::Models::IpsecPolicy - LoadBalancerLoadBalancingRuleListResult = Azure::Network::Mgmt::V2017_10_01::Models::LoadBalancerLoadBalancingRuleListResult + GatewayRouteListResult = Azure::Network::Mgmt::V2017_10_01::Models::GatewayRouteListResult LoadBalancerProbeListResult = Azure::Network::Mgmt::V2017_10_01::Models::LoadBalancerProbeListResult BgpPeerStatusListResult = Azure::Network::Mgmt::V2017_10_01::Models::BgpPeerStatusListResult VirtualNetworkGatewayListResult = Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewayListResult @@ -119,22 +119,20 @@ module Models ApplicationGatewayFirewallRuleGroup = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayFirewallRuleGroup NetworkSecurityGroupListResult = Azure::Network::Mgmt::V2017_10_01::Models::NetworkSecurityGroupListResult SecurityRuleListResult = Azure::Network::Mgmt::V2017_10_01::Models::SecurityRuleListResult - GatewayRouteListResult = Azure::Network::Mgmt::V2017_10_01::Models::GatewayRouteListResult AddressSpace = Azure::Network::Mgmt::V2017_10_01::Models::AddressSpace + NetworkWatcherListResult = Azure::Network::Mgmt::V2017_10_01::Models::NetworkWatcherListResult ApplicationGatewayAvailableWafRuleSetsResult = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayAvailableWafRuleSetsResult TopologyParameters = Azure::Network::Mgmt::V2017_10_01::Models::TopologyParameters - NetworkWatcherListResult = Azure::Network::Mgmt::V2017_10_01::Models::NetworkWatcherListResult DnsNameAvailabilityResult = Azure::Network::Mgmt::V2017_10_01::Models::DnsNameAvailabilityResult - ApplicationSecurityGroupListResult = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationSecurityGroupListResult - EndpointServicesListResult = Azure::Network::Mgmt::V2017_10_01::Models::EndpointServicesListResult Dimension = Azure::Network::Mgmt::V2017_10_01::Models::Dimension + ApplicationSecurityGroupListResult = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationSecurityGroupListResult + LoadBalancerLoadBalancingRuleListResult = Azure::Network::Mgmt::V2017_10_01::Models::LoadBalancerLoadBalancingRuleListResult AuthorizationListResult = Azure::Network::Mgmt::V2017_10_01::Models::AuthorizationListResult + Topology = Azure::Network::Mgmt::V2017_10_01::Models::Topology Usage = Azure::Network::Mgmt::V2017_10_01::Models::Usage VerificationIPFlowParameters = Azure::Network::Mgmt::V2017_10_01::Models::VerificationIPFlowParameters - Topology = Azure::Network::Mgmt::V2017_10_01::Models::Topology - MetricSpecification = Azure::Network::Mgmt::V2017_10_01::Models::MetricSpecification - BgpServiceCommunityListResult = Azure::Network::Mgmt::V2017_10_01::Models::BgpServiceCommunityListResult VerificationIPFlowResult = Azure::Network::Mgmt::V2017_10_01::Models::VerificationIPFlowResult + MetricSpecification = Azure::Network::Mgmt::V2017_10_01::Models::MetricSpecification Ipv6ExpressRouteCircuitPeeringConfig = Azure::Network::Mgmt::V2017_10_01::Models::Ipv6ExpressRouteCircuitPeeringConfig NextHopParameters = Azure::Network::Mgmt::V2017_10_01::Models::NextHopParameters ExpressRouteCircuitSku = Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteCircuitSku @@ -142,18 +140,20 @@ module Models RouteListResult = Azure::Network::Mgmt::V2017_10_01::Models::RouteListResult SecurityGroupViewParameters = Azure::Network::Mgmt::V2017_10_01::Models::SecurityGroupViewParameters ExpressRouteCircuitsArpTableListResult = Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteCircuitsArpTableListResult - NetworkInterfaceAssociation = Azure::Network::Mgmt::V2017_10_01::Models::NetworkInterfaceAssociation + EndpointServicesListResult = Azure::Network::Mgmt::V2017_10_01::Models::EndpointServicesListResult ExpressRouteCircuitsRoutesTableListResult = Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteCircuitsRoutesTableListResult - SubnetAssociation = Azure::Network::Mgmt::V2017_10_01::Models::SubnetAssociation + NetworkInterfaceAssociation = Azure::Network::Mgmt::V2017_10_01::Models::NetworkInterfaceAssociation ExpressRouteCircuitsRoutesTableSummaryListResult = Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteCircuitsRoutesTableSummaryListResult - SecurityRuleAssociations = Azure::Network::Mgmt::V2017_10_01::Models::SecurityRuleAssociations + SubnetAssociation = Azure::Network::Mgmt::V2017_10_01::Models::SubnetAssociation + BgpServiceCommunityListResult = Azure::Network::Mgmt::V2017_10_01::Models::BgpServiceCommunityListResult + SecurityGroupNetworkInterface = Azure::Network::Mgmt::V2017_10_01::Models::SecurityGroupNetworkInterface ExpressRouteServiceProviderListResult = Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteServiceProviderListResult SecurityGroupViewResult = Azure::Network::Mgmt::V2017_10_01::Models::SecurityGroupViewResult RouteFilterRuleListResult = Azure::Network::Mgmt::V2017_10_01::Models::RouteFilterRuleListResult PacketCaptureStorageLocation = Azure::Network::Mgmt::V2017_10_01::Models::PacketCaptureStorageLocation PacketCaptureFilter = Azure::Network::Mgmt::V2017_10_01::Models::PacketCaptureFilter VirtualNetworkGatewayListConnectionsResult = Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewayListConnectionsResult - PacketCaptureParameters = Azure::Network::Mgmt::V2017_10_01::Models::PacketCaptureParameters + PacketCapture = Azure::Network::Mgmt::V2017_10_01::Models::PacketCapture VirtualNetworkGatewayConnectionListResult = Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewayConnectionListResult PacketCaptureResult = Azure::Network::Mgmt::V2017_10_01::Models::PacketCaptureResult PacketCaptureListResult = Azure::Network::Mgmt::V2017_10_01::Models::PacketCaptureListResult @@ -230,53 +230,53 @@ module Models Resource = Azure::Network::Mgmt::V2017_10_01::Models::Resource ApplicationGatewaySslCertificate = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewaySslCertificate ApplicationGatewayAuthenticationCertificate = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayAuthenticationCertificate + PacketCaptureParameters = Azure::Network::Mgmt::V2017_10_01::Models::PacketCaptureParameters + ApplicationGatewayFrontendIPConfiguration = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayFrontendIPConfiguration ApplicationGatewayFrontendPort = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayFrontendPort - PacketCapture = Azure::Network::Mgmt::V2017_10_01::Models::PacketCapture - ApplicationGatewayPathRule = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayPathRule ApplicationGatewayHttpListener = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayHttpListener - ApplicationGatewayFrontendIPConfiguration = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayFrontendIPConfiguration + SecurityRuleAssociations = Azure::Network::Mgmt::V2017_10_01::Models::SecurityRuleAssociations ExpressRouteServiceProviderBandwidthsOffered = Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteServiceProviderBandwidthsOffered - SecurityGroupNetworkInterface = Azure::Network::Mgmt::V2017_10_01::Models::SecurityGroupNetworkInterface - ApplicationGatewayRedirectConfiguration = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayRedirectConfiguration - ApplicationGatewayProbe = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayProbe ApplicationGatewayRequestRoutingRule = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayRequestRoutingRule - ApplicationGatewayFirewallRuleSet = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayFirewallRuleSet - ApplicationGatewayUrlPathMap = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayUrlPathMap + ApplicationGatewayPathRule = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayPathRule + ApplicationGatewayProbe = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayProbe ApplicationGateway = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGateway - EndpointServiceResult = Azure::Network::Mgmt::V2017_10_01::Models::EndpointServiceResult - ApplicationGatewayAvailableSslOptions = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayAvailableSslOptions + ApplicationGatewayRedirectConfiguration = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayRedirectConfiguration + ApplicationGatewayUrlPathMap = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayUrlPathMap ApplicationGatewaySslPredefinedPolicy = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewaySslPredefinedPolicy - ExpressRouteCircuitPeering = Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteCircuitPeering - ExpressRouteCircuitAuthorization = Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteCircuitAuthorization + ApplicationGatewayFirewallRuleSet = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayFirewallRuleSet + ApplicationGatewayAvailableSslOptions = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayAvailableSslOptions RouteFilterRule = Azure::Network::Mgmt::V2017_10_01::Models::RouteFilterRule - ExpressRouteServiceProvider = Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteServiceProvider - RouteFilter = Azure::Network::Mgmt::V2017_10_01::Models::RouteFilter + EndpointServiceResult = Azure::Network::Mgmt::V2017_10_01::Models::EndpointServiceResult + ExpressRouteCircuitAuthorization = Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteCircuitAuthorization ExpressRouteCircuit = Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteCircuit - Probe = Azure::Network::Mgmt::V2017_10_01::Models::Probe - FrontendIPConfiguration = Azure::Network::Mgmt::V2017_10_01::Models::FrontendIPConfiguration + ExpressRouteCircuitPeering = Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteCircuitPeering + RouteFilter = Azure::Network::Mgmt::V2017_10_01::Models::RouteFilter LoadBalancingRule = Azure::Network::Mgmt::V2017_10_01::Models::LoadBalancingRule - LoadBalancer = Azure::Network::Mgmt::V2017_10_01::Models::LoadBalancer - InboundNatPool = Azure::Network::Mgmt::V2017_10_01::Models::InboundNatPool + ExpressRouteServiceProvider = Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteServiceProvider + FrontendIPConfiguration = Azure::Network::Mgmt::V2017_10_01::Models::FrontendIPConfiguration OutboundNatRule = Azure::Network::Mgmt::V2017_10_01::Models::OutboundNatRule - PatchRouteFilter = Azure::Network::Mgmt::V2017_10_01::Models::PatchRouteFilter - NetworkWatcher = Azure::Network::Mgmt::V2017_10_01::Models::NetworkWatcher + Probe = Azure::Network::Mgmt::V2017_10_01::Models::Probe + InboundNatPool = Azure::Network::Mgmt::V2017_10_01::Models::InboundNatPool PatchRouteFilterRule = Azure::Network::Mgmt::V2017_10_01::Models::PatchRouteFilterRule - VirtualNetwork = Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetwork - BgpServiceCommunity = Azure::Network::Mgmt::V2017_10_01::Models::BgpServiceCommunity + LoadBalancer = Azure::Network::Mgmt::V2017_10_01::Models::LoadBalancer + NetworkWatcher = Azure::Network::Mgmt::V2017_10_01::Models::NetworkWatcher VirtualNetworkPeering = Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkPeering - VpnClientRevokedCertificate = Azure::Network::Mgmt::V2017_10_01::Models::VpnClientRevokedCertificate - VirtualNetworkGatewayIPConfiguration = Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewayIPConfiguration + PatchRouteFilter = Azure::Network::Mgmt::V2017_10_01::Models::PatchRouteFilter + BgpServiceCommunity = Azure::Network::Mgmt::V2017_10_01::Models::BgpServiceCommunity VpnClientRootCertificate = Azure::Network::Mgmt::V2017_10_01::Models::VpnClientRootCertificate - VirtualNetworkGatewayConnection = Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewayConnection - VirtualNetworkGateway = Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGateway + VirtualNetwork = Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetwork + VirtualNetworkGatewayIPConfiguration = Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewayIPConfiguration LocalNetworkGateway = Azure::Network::Mgmt::V2017_10_01::Models::LocalNetworkGateway - ApplicationGatewayCookieBasedAffinity = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayCookieBasedAffinity + VpnClientRevokedCertificate = Azure::Network::Mgmt::V2017_10_01::Models::VpnClientRevokedCertificate + VirtualNetworkGateway = Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGateway + ApplicationGatewayProtocol = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayProtocol + VirtualNetworkGatewayConnection = Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewayConnection VirtualNetworkGatewayConnectionListEntity = Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewayConnectionListEntity IPVersion = Azure::Network::Mgmt::V2017_10_01::Models::IPVersion - ApplicationGatewayTier = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayTier + ApplicationGatewayCookieBasedAffinity = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayCookieBasedAffinity ApplicationGatewayBackendHealthServerHealth = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayBackendHealthServerHealth ApplicationGatewaySkuName = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewaySkuName - ApplicationGatewayProtocol = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayProtocol + ApplicationGatewayTier = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayTier ApplicationGatewaySslProtocol = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewaySslProtocol ApplicationGatewaySslPolicyType = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewaySslPolicyType ApplicationGatewaySslPolicyName = Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewaySslPolicyName @@ -309,28 +309,28 @@ module Models PcError = Azure::Network::Mgmt::V2017_10_01::Models::PcError Origin = Azure::Network::Mgmt::V2017_10_01::Models::Origin IssueType = Azure::Network::Mgmt::V2017_10_01::Models::IssueType - Severity = Azure::Network::Mgmt::V2017_10_01::Models::Severity Protocol = Azure::Network::Mgmt::V2017_10_01::Models::Protocol + ConnectionState = Azure::Network::Mgmt::V2017_10_01::Models::ConnectionState EvaluationState = Azure::Network::Mgmt::V2017_10_01::Models::EvaluationState VirtualNetworkPeeringState = Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkPeeringState ConnectionStatus = Azure::Network::Mgmt::V2017_10_01::Models::ConnectionStatus - ConnectionState = Azure::Network::Mgmt::V2017_10_01::Models::ConnectionState + VpnType = Azure::Network::Mgmt::V2017_10_01::Models::VpnType VirtualNetworkGatewaySkuName = Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewaySkuName VirtualNetworkGatewaySkuTier = Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewaySkuTier VirtualNetworkGatewayType = Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewayType - VpnType = Azure::Network::Mgmt::V2017_10_01::Models::VpnType + BgpPeerState = Azure::Network::Mgmt::V2017_10_01::Models::BgpPeerState ProcessorArchitecture = Azure::Network::Mgmt::V2017_10_01::Models::ProcessorArchitecture AuthenticationMethod = Azure::Network::Mgmt::V2017_10_01::Models::AuthenticationMethod VpnClientProtocol = Azure::Network::Mgmt::V2017_10_01::Models::VpnClientProtocol - BgpPeerState = Azure::Network::Mgmt::V2017_10_01::Models::BgpPeerState + VirtualNetworkGatewayConnectionType = Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewayConnectionType IpsecEncryption = Azure::Network::Mgmt::V2017_10_01::Models::IpsecEncryption IpsecIntegrity = Azure::Network::Mgmt::V2017_10_01::Models::IpsecIntegrity VirtualNetworkGatewayConnectionStatus = Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewayConnectionStatus - VirtualNetworkGatewayConnectionType = Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewayConnectionType - DhGroup = Azure::Network::Mgmt::V2017_10_01::Models::DhGroup + IkeIntegrity = Azure::Network::Mgmt::V2017_10_01::Models::IkeIntegrity + Severity = Azure::Network::Mgmt::V2017_10_01::Models::Severity PfsGroup = Azure::Network::Mgmt::V2017_10_01::Models::PfsGroup IkeEncryption = Azure::Network::Mgmt::V2017_10_01::Models::IkeEncryption - IkeIntegrity = Azure::Network::Mgmt::V2017_10_01::Models::IkeIntegrity + DhGroup = Azure::Network::Mgmt::V2017_10_01::Models::DhGroup end class NetworkManagementClass @@ -533,17 +533,17 @@ def load_balancer_backend_address_pool_list_result def connection_reset_shared_key Azure::Network::Mgmt::V2017_10_01::Models::ConnectionResetSharedKey end - def load_balancer_frontend_ipconfiguration_list_result - Azure::Network::Mgmt::V2017_10_01::Models::LoadBalancerFrontendIPConfigurationListResult - end def error Azure::Network::Mgmt::V2017_10_01::Models::Error end + def load_balancer_frontend_ipconfiguration_list_result + Azure::Network::Mgmt::V2017_10_01::Models::LoadBalancerFrontendIPConfigurationListResult + end def ipsec_policy Azure::Network::Mgmt::V2017_10_01::Models::IpsecPolicy end - def load_balancer_load_balancing_rule_list_result - Azure::Network::Mgmt::V2017_10_01::Models::LoadBalancerLoadBalancingRuleListResult + def gateway_route_list_result + Azure::Network::Mgmt::V2017_10_01::Models::GatewayRouteListResult end def load_balancer_probe_list_result Azure::Network::Mgmt::V2017_10_01::Models::LoadBalancerProbeListResult @@ -626,54 +626,48 @@ def network_security_group_list_result def security_rule_list_result Azure::Network::Mgmt::V2017_10_01::Models::SecurityRuleListResult end - def gateway_route_list_result - Azure::Network::Mgmt::V2017_10_01::Models::GatewayRouteListResult - end def address_space Azure::Network::Mgmt::V2017_10_01::Models::AddressSpace end + def network_watcher_list_result + Azure::Network::Mgmt::V2017_10_01::Models::NetworkWatcherListResult + end def application_gateway_available_waf_rule_sets_result Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayAvailableWafRuleSetsResult end def topology_parameters Azure::Network::Mgmt::V2017_10_01::Models::TopologyParameters end - def network_watcher_list_result - Azure::Network::Mgmt::V2017_10_01::Models::NetworkWatcherListResult - end def dns_name_availability_result Azure::Network::Mgmt::V2017_10_01::Models::DnsNameAvailabilityResult end + def dimension + Azure::Network::Mgmt::V2017_10_01::Models::Dimension + end def application_security_group_list_result Azure::Network::Mgmt::V2017_10_01::Models::ApplicationSecurityGroupListResult end - def endpoint_services_list_result - Azure::Network::Mgmt::V2017_10_01::Models::EndpointServicesListResult - end - def dimension - Azure::Network::Mgmt::V2017_10_01::Models::Dimension + def load_balancer_load_balancing_rule_list_result + Azure::Network::Mgmt::V2017_10_01::Models::LoadBalancerLoadBalancingRuleListResult end def authorization_list_result Azure::Network::Mgmt::V2017_10_01::Models::AuthorizationListResult end + def topology + Azure::Network::Mgmt::V2017_10_01::Models::Topology + end def usage Azure::Network::Mgmt::V2017_10_01::Models::Usage end def verification_ipflow_parameters Azure::Network::Mgmt::V2017_10_01::Models::VerificationIPFlowParameters end - def topology - Azure::Network::Mgmt::V2017_10_01::Models::Topology + def verification_ipflow_result + Azure::Network::Mgmt::V2017_10_01::Models::VerificationIPFlowResult end def metric_specification Azure::Network::Mgmt::V2017_10_01::Models::MetricSpecification end - def bgp_service_community_list_result - Azure::Network::Mgmt::V2017_10_01::Models::BgpServiceCommunityListResult - end - def verification_ipflow_result - Azure::Network::Mgmt::V2017_10_01::Models::VerificationIPFlowResult - end def ipv6_express_route_circuit_peering_config Azure::Network::Mgmt::V2017_10_01::Models::Ipv6ExpressRouteCircuitPeeringConfig end @@ -695,20 +689,26 @@ def security_group_view_parameters def express_route_circuits_arp_table_list_result Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteCircuitsArpTableListResult end - def network_interface_association - Azure::Network::Mgmt::V2017_10_01::Models::NetworkInterfaceAssociation + def endpoint_services_list_result + Azure::Network::Mgmt::V2017_10_01::Models::EndpointServicesListResult end def express_route_circuits_routes_table_list_result Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteCircuitsRoutesTableListResult end - def subnet_association - Azure::Network::Mgmt::V2017_10_01::Models::SubnetAssociation + def network_interface_association + Azure::Network::Mgmt::V2017_10_01::Models::NetworkInterfaceAssociation end def express_route_circuits_routes_table_summary_list_result Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteCircuitsRoutesTableSummaryListResult end - def security_rule_associations - Azure::Network::Mgmt::V2017_10_01::Models::SecurityRuleAssociations + def subnet_association + Azure::Network::Mgmt::V2017_10_01::Models::SubnetAssociation + end + def bgp_service_community_list_result + Azure::Network::Mgmt::V2017_10_01::Models::BgpServiceCommunityListResult + end + def security_group_network_interface + Azure::Network::Mgmt::V2017_10_01::Models::SecurityGroupNetworkInterface end def express_route_service_provider_list_result Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteServiceProviderListResult @@ -728,8 +728,8 @@ def packet_capture_filter def virtual_network_gateway_list_connections_result Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewayListConnectionsResult end - def packet_capture_parameters - Azure::Network::Mgmt::V2017_10_01::Models::PacketCaptureParameters + def packet_capture + Azure::Network::Mgmt::V2017_10_01::Models::PacketCapture end def virtual_network_gateway_connection_list_result Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewayConnectionListResult @@ -959,128 +959,128 @@ def application_gateway_ssl_certificate def application_gateway_authentication_certificate Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayAuthenticationCertificate end - def application_gateway_frontend_port - Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayFrontendPort + def packet_capture_parameters + Azure::Network::Mgmt::V2017_10_01::Models::PacketCaptureParameters end - def packet_capture - Azure::Network::Mgmt::V2017_10_01::Models::PacketCapture + def application_gateway_frontend_ipconfiguration + Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayFrontendIPConfiguration end - def application_gateway_path_rule - Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayPathRule + def application_gateway_frontend_port + Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayFrontendPort end def application_gateway_http_listener Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayHttpListener end - def application_gateway_frontend_ipconfiguration - Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayFrontendIPConfiguration + def security_rule_associations + Azure::Network::Mgmt::V2017_10_01::Models::SecurityRuleAssociations end def express_route_service_provider_bandwidths_offered Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteServiceProviderBandwidthsOffered end - def security_group_network_interface - Azure::Network::Mgmt::V2017_10_01::Models::SecurityGroupNetworkInterface + def application_gateway_request_routing_rule + Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayRequestRoutingRule end - def application_gateway_redirect_configuration - Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayRedirectConfiguration + def application_gateway_path_rule + Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayPathRule end def application_gateway_probe Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayProbe end - def application_gateway_request_routing_rule - Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayRequestRoutingRule + def application_gateway + Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGateway end - def application_gateway_firewall_rule_set - Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayFirewallRuleSet + def application_gateway_redirect_configuration + Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayRedirectConfiguration end def application_gateway_url_path_map Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayUrlPathMap end - def application_gateway - Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGateway + def application_gateway_ssl_predefined_policy + Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewaySslPredefinedPolicy end - def endpoint_service_result - Azure::Network::Mgmt::V2017_10_01::Models::EndpointServiceResult + def application_gateway_firewall_rule_set + Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayFirewallRuleSet end def application_gateway_available_ssl_options Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayAvailableSslOptions end - def application_gateway_ssl_predefined_policy - Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewaySslPredefinedPolicy + def route_filter_rule + Azure::Network::Mgmt::V2017_10_01::Models::RouteFilterRule end - def express_route_circuit_peering - Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteCircuitPeering + def endpoint_service_result + Azure::Network::Mgmt::V2017_10_01::Models::EndpointServiceResult end def express_route_circuit_authorization Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteCircuitAuthorization end - def route_filter_rule - Azure::Network::Mgmt::V2017_10_01::Models::RouteFilterRule + def express_route_circuit + Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteCircuit end - def express_route_service_provider - Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteServiceProvider + def express_route_circuit_peering + Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteCircuitPeering end def route_filter Azure::Network::Mgmt::V2017_10_01::Models::RouteFilter end - def express_route_circuit - Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteCircuit + def load_balancing_rule + Azure::Network::Mgmt::V2017_10_01::Models::LoadBalancingRule end - def probe - Azure::Network::Mgmt::V2017_10_01::Models::Probe + def express_route_service_provider + Azure::Network::Mgmt::V2017_10_01::Models::ExpressRouteServiceProvider end def frontend_ipconfiguration Azure::Network::Mgmt::V2017_10_01::Models::FrontendIPConfiguration end - def load_balancing_rule - Azure::Network::Mgmt::V2017_10_01::Models::LoadBalancingRule + def outbound_nat_rule + Azure::Network::Mgmt::V2017_10_01::Models::OutboundNatRule end - def load_balancer - Azure::Network::Mgmt::V2017_10_01::Models::LoadBalancer + def probe + Azure::Network::Mgmt::V2017_10_01::Models::Probe end def inbound_nat_pool Azure::Network::Mgmt::V2017_10_01::Models::InboundNatPool end - def outbound_nat_rule - Azure::Network::Mgmt::V2017_10_01::Models::OutboundNatRule + def patch_route_filter_rule + Azure::Network::Mgmt::V2017_10_01::Models::PatchRouteFilterRule end - def patch_route_filter - Azure::Network::Mgmt::V2017_10_01::Models::PatchRouteFilter + def load_balancer + Azure::Network::Mgmt::V2017_10_01::Models::LoadBalancer end def network_watcher Azure::Network::Mgmt::V2017_10_01::Models::NetworkWatcher end - def patch_route_filter_rule - Azure::Network::Mgmt::V2017_10_01::Models::PatchRouteFilterRule + def virtual_network_peering + Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkPeering end - def virtual_network - Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetwork + def patch_route_filter + Azure::Network::Mgmt::V2017_10_01::Models::PatchRouteFilter end def bgp_service_community Azure::Network::Mgmt::V2017_10_01::Models::BgpServiceCommunity end - def virtual_network_peering - Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkPeering + def vpn_client_root_certificate + Azure::Network::Mgmt::V2017_10_01::Models::VpnClientRootCertificate end - def vpn_client_revoked_certificate - Azure::Network::Mgmt::V2017_10_01::Models::VpnClientRevokedCertificate + def virtual_network + Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetwork end def virtual_network_gateway_ipconfiguration Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewayIPConfiguration end - def vpn_client_root_certificate - Azure::Network::Mgmt::V2017_10_01::Models::VpnClientRootCertificate + def local_network_gateway + Azure::Network::Mgmt::V2017_10_01::Models::LocalNetworkGateway end - def virtual_network_gateway_connection - Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewayConnection + def vpn_client_revoked_certificate + Azure::Network::Mgmt::V2017_10_01::Models::VpnClientRevokedCertificate end def virtual_network_gateway Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGateway end - def local_network_gateway - Azure::Network::Mgmt::V2017_10_01::Models::LocalNetworkGateway + def application_gateway_protocol + Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayProtocol end - def application_gateway_cookie_based_affinity - Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayCookieBasedAffinity + def virtual_network_gateway_connection + Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewayConnection end def virtual_network_gateway_connection_list_entity Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewayConnectionListEntity @@ -1088,8 +1088,8 @@ def virtual_network_gateway_connection_list_entity def ipversion Azure::Network::Mgmt::V2017_10_01::Models::IPVersion end - def application_gateway_tier - Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayTier + def application_gateway_cookie_based_affinity + Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayCookieBasedAffinity end def application_gateway_backend_health_server_health Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayBackendHealthServerHealth @@ -1097,8 +1097,8 @@ def application_gateway_backend_health_server_health def application_gateway_sku_name Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewaySkuName end - def application_gateway_protocol - Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayProtocol + def application_gateway_tier + Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewayTier end def application_gateway_ssl_protocol Azure::Network::Mgmt::V2017_10_01::Models::ApplicationGatewaySslProtocol @@ -1196,12 +1196,12 @@ def origin def issue_type Azure::Network::Mgmt::V2017_10_01::Models::IssueType end - def severity - Azure::Network::Mgmt::V2017_10_01::Models::Severity - end def protocol Azure::Network::Mgmt::V2017_10_01::Models::Protocol end + def connection_state + Azure::Network::Mgmt::V2017_10_01::Models::ConnectionState + end def evaluation_state Azure::Network::Mgmt::V2017_10_01::Models::EvaluationState end @@ -1211,8 +1211,8 @@ def virtual_network_peering_state def connection_status Azure::Network::Mgmt::V2017_10_01::Models::ConnectionStatus end - def connection_state - Azure::Network::Mgmt::V2017_10_01::Models::ConnectionState + def vpn_type + Azure::Network::Mgmt::V2017_10_01::Models::VpnType end def virtual_network_gateway_sku_name Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewaySkuName @@ -1223,8 +1223,8 @@ def virtual_network_gateway_sku_tier def virtual_network_gateway_type Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewayType end - def vpn_type - Azure::Network::Mgmt::V2017_10_01::Models::VpnType + def bgp_peer_state + Azure::Network::Mgmt::V2017_10_01::Models::BgpPeerState end def processor_architecture Azure::Network::Mgmt::V2017_10_01::Models::ProcessorArchitecture @@ -1235,8 +1235,8 @@ def authentication_method def vpn_client_protocol Azure::Network::Mgmt::V2017_10_01::Models::VpnClientProtocol end - def bgp_peer_state - Azure::Network::Mgmt::V2017_10_01::Models::BgpPeerState + def virtual_network_gateway_connection_type + Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewayConnectionType end def ipsec_encryption Azure::Network::Mgmt::V2017_10_01::Models::IpsecEncryption @@ -1247,11 +1247,11 @@ def ipsec_integrity def virtual_network_gateway_connection_status Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewayConnectionStatus end - def virtual_network_gateway_connection_type - Azure::Network::Mgmt::V2017_10_01::Models::VirtualNetworkGatewayConnectionType + def ike_integrity + Azure::Network::Mgmt::V2017_10_01::Models::IkeIntegrity end - def dh_group - Azure::Network::Mgmt::V2017_10_01::Models::DhGroup + def severity + Azure::Network::Mgmt::V2017_10_01::Models::Severity end def pfs_group Azure::Network::Mgmt::V2017_10_01::Models::PfsGroup @@ -1259,8 +1259,8 @@ def pfs_group def ike_encryption Azure::Network::Mgmt::V2017_10_01::Models::IkeEncryption end - def ike_integrity - Azure::Network::Mgmt::V2017_10_01::Models::IkeIntegrity + def dh_group + Azure::Network::Mgmt::V2017_10_01::Models::DhGroup end end end diff --git a/azure_sdk/lib/v2018_03_01/modules/resources_profile_module.rb b/azure_sdk/lib/v2018_03_01/modules/resources_profile_module.rb index 43f922734a..2471cd9131 100644 --- a/azure_sdk/lib/v2018_03_01/modules/resources_profile_module.rb +++ b/azure_sdk/lib/v2018_03_01/modules/resources_profile_module.rb @@ -11,8 +11,8 @@ module Mgmt Providers = Azure::Resources::Mgmt::V2018_02_01::Providers ResourceGroups = Azure::Resources::Mgmt::V2018_02_01::ResourceGroups Tags = Azure::Resources::Mgmt::V2018_02_01::Tags - DeploymentOperations = Azure::Resources::Mgmt::V2018_02_01::DeploymentOperations Resources = Azure::Resources::Mgmt::V2018_02_01::Resources + DeploymentOperations = Azure::Resources::Mgmt::V2018_02_01::DeploymentOperations module Models GenericResourceFilter = Azure::Resources::Mgmt::V2018_02_01::Models::GenericResourceFilter @@ -28,15 +28,15 @@ module Models ResourceGroupPatchable = Azure::Resources::Mgmt::V2018_02_01::Models::ResourceGroupPatchable Provider = Azure::Resources::Mgmt::V2018_02_01::Models::Provider ResourceGroupListResult = Azure::Resources::Mgmt::V2018_02_01::Models::ResourceGroupListResult - ResourcesMoveInfo = Azure::Resources::Mgmt::V2018_02_01::Models::ResourcesMoveInfo + Dependency = Azure::Resources::Mgmt::V2018_02_01::Models::Dependency DeploymentPropertiesExtended = Azure::Resources::Mgmt::V2018_02_01::Models::DeploymentPropertiesExtended ExportTemplateRequest = Azure::Resources::Mgmt::V2018_02_01::Models::ExportTemplateRequest + ResourcesMoveInfo = Azure::Resources::Mgmt::V2018_02_01::Models::ResourcesMoveInfo DeploymentExtended = Azure::Resources::Mgmt::V2018_02_01::Models::DeploymentExtended - Dependency = Azure::Resources::Mgmt::V2018_02_01::Models::Dependency TagCount = Azure::Resources::Mgmt::V2018_02_01::Models::TagCount + ProviderListResult = Azure::Resources::Mgmt::V2018_02_01::Models::ProviderListResult TagValue = Azure::Resources::Mgmt::V2018_02_01::Models::TagValue ResourceGroupFilter = Azure::Resources::Mgmt::V2018_02_01::Models::ResourceGroupFilter - ProviderListResult = Azure::Resources::Mgmt::V2018_02_01::Models::ProviderListResult TagDetails = Azure::Resources::Mgmt::V2018_02_01::Models::TagDetails DeploymentProperties = Azure::Resources::Mgmt::V2018_02_01::Models::DeploymentProperties TagsListResult = Azure::Resources::Mgmt::V2018_02_01::Models::TagsListResult @@ -48,13 +48,13 @@ module Models DeploymentOperationProperties = Azure::Resources::Mgmt::V2018_02_01::Models::DeploymentOperationProperties DeploymentExtendedFilter = Azure::Resources::Mgmt::V2018_02_01::Models::DeploymentExtendedFilter DeploymentOperation = Azure::Resources::Mgmt::V2018_02_01::Models::DeploymentOperation - DeploymentExportResult = Azure::Resources::Mgmt::V2018_02_01::Models::DeploymentExportResult + DeploymentOperationsListResult = Azure::Resources::Mgmt::V2018_02_01::Models::DeploymentOperationsListResult OnErrorDeploymentExtended = Azure::Resources::Mgmt::V2018_02_01::Models::OnErrorDeploymentExtended ResourceProviderOperationDisplayProperties = Azure::Resources::Mgmt::V2018_02_01::Models::ResourceProviderOperationDisplayProperties DebugSetting = Azure::Resources::Mgmt::V2018_02_01::Models::DebugSetting DeploymentListResult = Azure::Resources::Mgmt::V2018_02_01::Models::DeploymentListResult + DeploymentExportResult = Azure::Resources::Mgmt::V2018_02_01::Models::DeploymentExportResult ProviderResourceType = Azure::Resources::Mgmt::V2018_02_01::Models::ProviderResourceType - DeploymentOperationsListResult = Azure::Resources::Mgmt::V2018_02_01::Models::DeploymentOperationsListResult ResourceGroupExportResult = Azure::Resources::Mgmt::V2018_02_01::Models::ResourceGroupExportResult GenericResource = Azure::Resources::Mgmt::V2018_02_01::Models::GenericResource DeploymentMode = Azure::Resources::Mgmt::V2018_02_01::Models::DeploymentMode @@ -68,7 +68,7 @@ module Models end class ResourcesManagementClass - attr_reader :deployments, :providers, :resource_groups, :tags, :deployment_operations, :resources, :configurable, :base_url, :options, :model_classes + attr_reader :deployments, :providers, :resource_groups, :tags, :resources, :deployment_operations, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -82,8 +82,8 @@ def initialize(configurable, base_url=nil, options=nil) @providers = @client_0.providers @resource_groups = @client_0.resource_groups @tags = @client_0.tags - @deployment_operations = @client_0.deployment_operations @resources = @client_0.resources + @deployment_operations = @client_0.deployment_operations @model_classes = ModelClasses.new end @@ -141,8 +141,8 @@ def provider def resource_group_list_result Azure::Resources::Mgmt::V2018_02_01::Models::ResourceGroupListResult end - def resources_move_info - Azure::Resources::Mgmt::V2018_02_01::Models::ResourcesMoveInfo + def dependency + Azure::Resources::Mgmt::V2018_02_01::Models::Dependency end def deployment_properties_extended Azure::Resources::Mgmt::V2018_02_01::Models::DeploymentPropertiesExtended @@ -150,24 +150,24 @@ def deployment_properties_extended def export_template_request Azure::Resources::Mgmt::V2018_02_01::Models::ExportTemplateRequest end + def resources_move_info + Azure::Resources::Mgmt::V2018_02_01::Models::ResourcesMoveInfo + end def deployment_extended Azure::Resources::Mgmt::V2018_02_01::Models::DeploymentExtended end - def dependency - Azure::Resources::Mgmt::V2018_02_01::Models::Dependency - end def tag_count Azure::Resources::Mgmt::V2018_02_01::Models::TagCount end + def provider_list_result + Azure::Resources::Mgmt::V2018_02_01::Models::ProviderListResult + end def tag_value Azure::Resources::Mgmt::V2018_02_01::Models::TagValue end def resource_group_filter Azure::Resources::Mgmt::V2018_02_01::Models::ResourceGroupFilter end - def provider_list_result - Azure::Resources::Mgmt::V2018_02_01::Models::ProviderListResult - end def tag_details Azure::Resources::Mgmt::V2018_02_01::Models::TagDetails end @@ -201,8 +201,8 @@ def deployment_extended_filter def deployment_operation Azure::Resources::Mgmt::V2018_02_01::Models::DeploymentOperation end - def deployment_export_result - Azure::Resources::Mgmt::V2018_02_01::Models::DeploymentExportResult + def deployment_operations_list_result + Azure::Resources::Mgmt::V2018_02_01::Models::DeploymentOperationsListResult end def on_error_deployment_extended Azure::Resources::Mgmt::V2018_02_01::Models::OnErrorDeploymentExtended @@ -216,12 +216,12 @@ def debug_setting def deployment_list_result Azure::Resources::Mgmt::V2018_02_01::Models::DeploymentListResult end + def deployment_export_result + Azure::Resources::Mgmt::V2018_02_01::Models::DeploymentExportResult + end def provider_resource_type Azure::Resources::Mgmt::V2018_02_01::Models::ProviderResourceType end - def deployment_operations_list_result - Azure::Resources::Mgmt::V2018_02_01::Models::DeploymentOperationsListResult - end def resource_group_export_result Azure::Resources::Mgmt::V2018_02_01::Models::ResourceGroupExportResult end diff --git a/azure_sdk/lib/v2018_03_01/modules/storage_profile_module.rb b/azure_sdk/lib/v2018_03_01/modules/storage_profile_module.rb index e15b392d59..c445ca6425 100644 --- a/azure_sdk/lib/v2018_03_01/modules/storage_profile_module.rb +++ b/azure_sdk/lib/v2018_03_01/modules/storage_profile_module.rb @@ -7,8 +7,8 @@ module Azure::Profiles::V2018_03_01 module Storage module Mgmt - UsageOperations = Azure::Storage::Mgmt::V2016_01_01::UsageOperations StorageAccounts = Azure::Storage::Mgmt::V2016_01_01::StorageAccounts + UsageOperations = Azure::Storage::Mgmt::V2016_01_01::UsageOperations module Models StorageAccountCreateParameters = Azure::Storage::Mgmt::V2016_01_01::Models::StorageAccountCreateParameters @@ -21,7 +21,7 @@ module Models StorageAccountListResult = Azure::Storage::Mgmt::V2016_01_01::Models::StorageAccountListResult EncryptionService = Azure::Storage::Mgmt::V2016_01_01::Models::EncryptionService StorageAccountListKeysResult = Azure::Storage::Mgmt::V2016_01_01::Models::StorageAccountListKeysResult - Encryption = Azure::Storage::Mgmt::V2016_01_01::Models::Encryption + StorageAccountRegenerateKeyParameters = Azure::Storage::Mgmt::V2016_01_01::Models::StorageAccountRegenerateKeyParameters Endpoints = Azure::Storage::Mgmt::V2016_01_01::Models::Endpoints CustomDomain = Azure::Storage::Mgmt::V2016_01_01::Models::CustomDomain EncryptionServices = Azure::Storage::Mgmt::V2016_01_01::Models::EncryptionServices @@ -29,20 +29,20 @@ module Models StorageAccount = Azure::Storage::Mgmt::V2016_01_01::Models::StorageAccount Usage = Azure::Storage::Mgmt::V2016_01_01::Models::Usage SkuTier = Azure::Storage::Mgmt::V2016_01_01::Models::SkuTier - Reason = Azure::Storage::Mgmt::V2016_01_01::Models::Reason + AccessTier = Azure::Storage::Mgmt::V2016_01_01::Models::AccessTier SkuName = Azure::Storage::Mgmt::V2016_01_01::Models::SkuName - StorageAccountRegenerateKeyParameters = Azure::Storage::Mgmt::V2016_01_01::Models::StorageAccountRegenerateKeyParameters + Reason = Azure::Storage::Mgmt::V2016_01_01::Models::Reason Kind = Azure::Storage::Mgmt::V2016_01_01::Models::Kind AccountStatus = Azure::Storage::Mgmt::V2016_01_01::Models::AccountStatus - AccessTier = Azure::Storage::Mgmt::V2016_01_01::Models::AccessTier - UsageUnit = Azure::Storage::Mgmt::V2016_01_01::Models::UsageUnit + KeyPermission = Azure::Storage::Mgmt::V2016_01_01::Models::KeyPermission + Encryption = Azure::Storage::Mgmt::V2016_01_01::Models::Encryption Sku = Azure::Storage::Mgmt::V2016_01_01::Models::Sku UsageName = Azure::Storage::Mgmt::V2016_01_01::Models::UsageName - KeyPermission = Azure::Storage::Mgmt::V2016_01_01::Models::KeyPermission + UsageUnit = Azure::Storage::Mgmt::V2016_01_01::Models::UsageUnit end class StorageManagementClass - attr_reader :usage_operations, :storage_accounts, :configurable, :base_url, :options, :model_classes + attr_reader :storage_accounts, :usage_operations, :configurable, :base_url, :options, :model_classes def initialize(configurable, base_url=nil, options=nil) @configurable, @base_url, @options = configurable, base_url, options @@ -52,8 +52,8 @@ def initialize(configurable, base_url=nil, options=nil) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) - @usage_operations = @client_0.usage_operations @storage_accounts = @client_0.storage_accounts + @usage_operations = @client_0.usage_operations @model_classes = ModelClasses.new end @@ -102,8 +102,8 @@ def encryption_service def storage_account_list_keys_result Azure::Storage::Mgmt::V2016_01_01::Models::StorageAccountListKeysResult end - def encryption - Azure::Storage::Mgmt::V2016_01_01::Models::Encryption + def storage_account_regenerate_key_parameters + Azure::Storage::Mgmt::V2016_01_01::Models::StorageAccountRegenerateKeyParameters end def endpoints Azure::Storage::Mgmt::V2016_01_01::Models::Endpoints @@ -126,14 +126,14 @@ def usage def sku_tier Azure::Storage::Mgmt::V2016_01_01::Models::SkuTier end - def reason - Azure::Storage::Mgmt::V2016_01_01::Models::Reason + def access_tier + Azure::Storage::Mgmt::V2016_01_01::Models::AccessTier end def sku_name Azure::Storage::Mgmt::V2016_01_01::Models::SkuName end - def storage_account_regenerate_key_parameters - Azure::Storage::Mgmt::V2016_01_01::Models::StorageAccountRegenerateKeyParameters + def reason + Azure::Storage::Mgmt::V2016_01_01::Models::Reason end def kind Azure::Storage::Mgmt::V2016_01_01::Models::Kind @@ -141,11 +141,11 @@ def kind def account_status Azure::Storage::Mgmt::V2016_01_01::Models::AccountStatus end - def access_tier - Azure::Storage::Mgmt::V2016_01_01::Models::AccessTier + def key_permission + Azure::Storage::Mgmt::V2016_01_01::Models::KeyPermission end - def usage_unit - Azure::Storage::Mgmt::V2016_01_01::Models::UsageUnit + def encryption + Azure::Storage::Mgmt::V2016_01_01::Models::Encryption end def sku Azure::Storage::Mgmt::V2016_01_01::Models::Sku @@ -153,8 +153,8 @@ def sku def usage_name Azure::Storage::Mgmt::V2016_01_01::Models::UsageName end - def key_permission - Azure::Storage::Mgmt::V2016_01_01::Models::KeyPermission + def usage_unit + Azure::Storage::Mgmt::V2016_01_01::Models::UsageUnit end end end diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb index 3564c73c16..6f7f40319a 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb @@ -25,16 +25,15 @@ class ApiManagementClient < MsRestAzure::AzureServiceClient # @return [String] Version of the API to be used with the client request. attr_reader :api_version - # @return [String] The preferred language for the response. + # @return [String] Gets or sets the preferred language for the response. attr_accessor :accept_language - # @return [Integer] The retry timeout in seconds for Long Running - # Operations. Default value is 30. + # @return [Integer] Gets or sets the retry timeout in seconds for Long + # Running Operations. Default value is 30. attr_accessor :long_running_operation_retry_timeout - # @return [Boolean] Whether a unique x-ms-client-request-id should be - # generated. When set to true a unique x-ms-client-request-id value is - # generated and included in each request. Default is true. + # @return [Boolean] When set to true a unique x-ms-client-request-id value + # is generated and included in each request. Default is true. attr_accessor :generate_client_request_id # @return [Apis] apis @@ -227,9 +226,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? @@ -246,7 +242,9 @@ def make_request_async(method, path, options = {}) # def add_telemetry sdk_information = 'azure_mgmt_api_management' - sdk_information = "#{sdk_information}/0.18.1" + if defined? Azure::ApiManagement::Mgmt::V2016_07_07::VERSION + sdk_information = "#{sdk_information}/#{Azure::ApiManagement::Mgmt::V2016_07_07::VERSION}" + end add_user_agent_information(sdk_information) end end diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/api_management_services.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/api_management_services.rb index e2292c5b18..62cfa0875b 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/api_management_services.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/api_management_services.rb @@ -36,8 +36,8 @@ def initialize(client) # # @return [ApiManagementServiceResource] operation results. # - def manage_deployments(resource_group_name, service_name, parameters, custom_headers:nil) - response = manage_deployments_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def manage_deployments(resource_group_name, service_name, parameters, custom_headers = nil) + response = manage_deployments_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -52,9 +52,9 @@ def manage_deployments(resource_group_name, service_name, parameters, custom_hea # @return [Concurrent::Promise] promise which provides async access to http # response. # - def manage_deployments_async(resource_group_name, service_name, parameters, custom_headers:nil) + def manage_deployments_async(resource_group_name, service_name, parameters, custom_headers = nil) # Send request - promise = begin_manage_deployments_async(resource_group_name, service_name, parameters, custom_headers:custom_headers) + promise = begin_manage_deployments_async(resource_group_name, service_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -84,8 +84,8 @@ def manage_deployments_async(resource_group_name, service_name, parameters, cust # # @return [ApiManagementServiceResource] operation results. # - def restore(resource_group_name, service_name, parameters, custom_headers:nil) - response = restore_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def restore(resource_group_name, service_name, parameters, custom_headers = nil) + response = restore_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -100,9 +100,9 @@ def restore(resource_group_name, service_name, parameters, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def restore_async(resource_group_name, service_name, parameters, custom_headers:nil) + def restore_async(resource_group_name, service_name, parameters, custom_headers = nil) # Send request - promise = begin_restore_async(resource_group_name, service_name, parameters, custom_headers:custom_headers) + promise = begin_restore_async(resource_group_name, service_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -132,8 +132,8 @@ def restore_async(resource_group_name, service_name, parameters, custom_headers: # # @return [ApiManagementServiceResource] operation results. # - def backup(resource_group_name, service_name, parameters, custom_headers:nil) - response = backup_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def backup(resource_group_name, service_name, parameters, custom_headers = nil) + response = backup_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -148,9 +148,9 @@ def backup(resource_group_name, service_name, parameters, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def backup_async(resource_group_name, service_name, parameters, custom_headers:nil) + def backup_async(resource_group_name, service_name, parameters, custom_headers = nil) # Send request - promise = begin_backup_async(resource_group_name, service_name, parameters, custom_headers:custom_headers) + promise = begin_backup_async(resource_group_name, service_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -179,8 +179,8 @@ def backup_async(resource_group_name, service_name, parameters, custom_headers:n # # @return [ApiManagementServiceResource] operation results. # - def create_or_update(resource_group_name, service_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -197,8 +197,8 @@ def create_or_update(resource_group_name, service_name, parameters, custom_heade # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, parameters, custom_headers).value! end # @@ -214,24 +214,22 @@ def create_or_update_with_http_info(resource_group_name, service_name, parameter # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_07_07::Models::ApiManagementServiceResource.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -300,8 +298,8 @@ def create_or_update_async(resource_group_name, service_name, parameters, custom # # @return [ApiManagementServiceResource] operation results. # - def update(resource_group_name, service_name, parameters, custom_headers:nil) - response = update_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -316,9 +314,9 @@ def update(resource_group_name, service_name, parameters, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def update_async(resource_group_name, service_name, parameters, custom_headers:nil) + def update_async(resource_group_name, service_name, parameters, custom_headers = nil) # Send request - promise = begin_update_async(resource_group_name, service_name, parameters, custom_headers:custom_headers) + promise = begin_update_async(resource_group_name, service_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -344,8 +342,8 @@ def update_async(resource_group_name, service_name, parameters, custom_headers:n # # @return [Object] operation results. # - def get(resource_group_name, service_name, custom_headers:nil) - response = get_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, custom_headers = nil) + response = get_async(resource_group_name, service_name, custom_headers).value! response.body unless response.nil? end @@ -359,8 +357,8 @@ def get(resource_group_name, service_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, custom_headers:nil) - get_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, custom_headers = nil) + get_async(resource_group_name, service_name, custom_headers).value! end # @@ -373,18 +371,14 @@ def get_with_http_info(resource_group_name, service_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, custom_headers:nil) + def get_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 @@ -449,8 +443,8 @@ def get_async(resource_group_name, service_name, custom_headers:nil) # # @return [ErrorResponse] operation results. # - def delete(resource_group_name, service_name, custom_headers:nil) - response = delete_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, custom_headers = nil) + response = delete_async(resource_group_name, service_name, custom_headers).value! response.body unless response.nil? end @@ -464,8 +458,8 @@ def delete(resource_group_name, service_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, custom_headers:nil) - delete_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, custom_headers = nil) + delete_async(resource_group_name, service_name, custom_headers).value! end # @@ -478,18 +472,14 @@ def delete_with_http_info(resource_group_name, service_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, custom_headers:nil) + def delete_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 @@ -543,8 +533,8 @@ def delete_async(resource_group_name, service_name, 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 @@ -557,8 +547,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 # @@ -570,14 +560,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.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 @@ -630,8 +619,8 @@ def list_by_resource_group_async(resource_group_name, custom_headers:nil) # # @return [Array] operation results. # - def list(custom_headers:nil) - first_page = list_as_lazy(custom_headers:custom_headers) + def list(custom_headers = nil) + first_page = list_as_lazy(custom_headers) first_page.get_all_items end @@ -643,8 +632,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 # @@ -655,13 +644,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 @@ -717,8 +705,8 @@ def list_async(custom_headers:nil) # # @return [ApiManagementServiceGetSsoTokenResult] operation results. # - def get_sso_token(resource_group_name, service_name, custom_headers:nil) - response = get_sso_token_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get_sso_token(resource_group_name, service_name, custom_headers = nil) + response = get_sso_token_async(resource_group_name, service_name, custom_headers).value! response.body unless response.nil? end @@ -733,8 +721,8 @@ def get_sso_token(resource_group_name, service_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_sso_token_with_http_info(resource_group_name, service_name, custom_headers:nil) - get_sso_token_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get_sso_token_with_http_info(resource_group_name, service_name, custom_headers = nil) + get_sso_token_async(resource_group_name, service_name, custom_headers).value! end # @@ -748,18 +736,14 @@ def get_sso_token_with_http_info(resource_group_name, service_name, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_sso_token_async(resource_group_name, service_name, custom_headers:nil) + def get_sso_token_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 @@ -814,8 +798,8 @@ def get_sso_token_async(resource_group_name, service_name, custom_headers:nil) # # @return [ApiManagementServiceNameAvailabilityResult] 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 @@ -829,8 +813,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 # @@ -843,19 +827,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, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + request_headers['Content-Type'] = 'application/json; charset=utf-8' + # Serialize Request request_mapper = Azure::ApiManagement::Mgmt::V2016_07_07::Models::ApiManagementServiceCheckNameAvailabilityParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -915,8 +900,8 @@ def check_name_availability_async(parameters, custom_headers:nil) # # @return [CertificateInformation] operation results. # - def upload_certificate(resource_group_name, service_name, parameters, custom_headers:nil) - response = upload_certificate_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def upload_certificate(resource_group_name, service_name, parameters, custom_headers = nil) + response = upload_certificate_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -933,8 +918,8 @@ def upload_certificate(resource_group_name, service_name, parameters, custom_hea # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def upload_certificate_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) - upload_certificate_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def upload_certificate_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + upload_certificate_async(resource_group_name, service_name, parameters, custom_headers).value! end # @@ -950,24 +935,22 @@ def upload_certificate_with_http_info(resource_group_name, service_name, paramet # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def upload_certificate_async(resource_group_name, service_name, parameters, custom_headers:nil) + def upload_certificate_async(resource_group_name, service_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_07_07::Models::ApiManagementServiceUploadCertificateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1028,8 +1011,8 @@ def upload_certificate_async(resource_group_name, service_name, parameters, cust # # @return [ApiManagementServiceResource] operation results. # - def update_hostname(resource_group_name, service_name, parameters, custom_headers:nil) - response = update_hostname_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def update_hostname(resource_group_name, service_name, parameters, custom_headers = nil) + response = update_hostname_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1044,9 +1027,9 @@ def update_hostname(resource_group_name, service_name, parameters, custom_header # @return [Concurrent::Promise] promise which provides async access to http # response. # - def update_hostname_async(resource_group_name, service_name, parameters, custom_headers:nil) + def update_hostname_async(resource_group_name, service_name, parameters, custom_headers = nil) # Send request - promise = begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers:custom_headers) + promise = begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -1077,8 +1060,8 @@ def update_hostname_async(resource_group_name, service_name, parameters, custom_ # # @return [ApiManagementServiceResource] operation results. # - def begin_manage_deployments(resource_group_name, service_name, parameters, custom_headers:nil) - response = begin_manage_deployments_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_manage_deployments(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_manage_deployments_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1097,8 +1080,8 @@ def begin_manage_deployments(resource_group_name, service_name, parameters, cust # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_manage_deployments_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) - begin_manage_deployments_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_manage_deployments_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_manage_deployments_async(resource_group_name, service_name, parameters, custom_headers).value! end # @@ -1116,24 +1099,22 @@ def begin_manage_deployments_with_http_info(resource_group_name, service_name, p # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_manage_deployments_async(resource_group_name, service_name, parameters, custom_headers:nil) + def begin_manage_deployments_async(resource_group_name, service_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_07_07::Models::ApiManagementServiceManageDeploymentsParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1194,8 +1175,8 @@ def begin_manage_deployments_async(resource_group_name, service_name, parameters # # @return [ApiManagementServiceResource] operation results. # - def begin_restore(resource_group_name, service_name, parameters, custom_headers:nil) - response = begin_restore_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_restore(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_restore_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1213,8 +1194,8 @@ def begin_restore(resource_group_name, service_name, parameters, custom_headers: # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_restore_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) - begin_restore_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_restore_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_restore_async(resource_group_name, service_name, parameters, custom_headers).value! end # @@ -1231,24 +1212,22 @@ def begin_restore_with_http_info(resource_group_name, service_name, parameters, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_restore_async(resource_group_name, service_name, parameters, custom_headers:nil) + def begin_restore_async(resource_group_name, service_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_07_07::Models::ApiManagementServiceBackupRestoreParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1309,8 +1288,8 @@ def begin_restore_async(resource_group_name, service_name, parameters, custom_he # # @return [ApiManagementServiceResource] operation results. # - def begin_backup(resource_group_name, service_name, parameters, custom_headers:nil) - response = begin_backup_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_backup(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_backup_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1328,8 +1307,8 @@ def begin_backup(resource_group_name, service_name, parameters, custom_headers:n # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_backup_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) - begin_backup_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_backup_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_backup_async(resource_group_name, service_name, parameters, custom_headers).value! end # @@ -1346,24 +1325,22 @@ def begin_backup_with_http_info(resource_group_name, service_name, parameters, c # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_backup_async(resource_group_name, service_name, parameters, custom_headers:nil) + def begin_backup_async(resource_group_name, service_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_07_07::Models::ApiManagementServiceBackupRestoreParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1422,8 +1399,8 @@ def begin_backup_async(resource_group_name, service_name, parameters, custom_hea # # @return [ApiManagementServiceResource] operation results. # - def begin_update(resource_group_name, service_name, parameters, custom_headers:nil) - response = begin_update_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_update(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_update_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1439,8 +1416,8 @@ def begin_update(resource_group_name, service_name, parameters, custom_headers:n # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_update_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) - begin_update_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_update_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_update_async(resource_group_name, service_name, parameters, custom_headers).value! end # @@ -1455,24 +1432,22 @@ def begin_update_with_http_info(resource_group_name, service_name, parameters, c # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_update_async(resource_group_name, service_name, parameters, custom_headers:nil) + def begin_update_async(resource_group_name, service_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_07_07::Models::ApiManagementServiceBaseParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1533,8 +1508,8 @@ def begin_update_async(resource_group_name, service_name, parameters, custom_hea # # @return [ApiManagementServiceResource] operation results. # - def begin_update_hostname(resource_group_name, service_name, parameters, custom_headers:nil) - response = begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_update_hostname(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1552,8 +1527,8 @@ def begin_update_hostname(resource_group_name, service_name, parameters, custom_ # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_update_hostname_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) - begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_update_hostname_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers).value! end # @@ -1570,24 +1545,22 @@ def begin_update_hostname_with_http_info(resource_group_name, service_name, para # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers:nil) + def begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_07_07::Models::ApiManagementServiceUpdateHostnameParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1644,8 +1617,8 @@ def begin_update_hostname_async(resource_group_name, service_name, parameters, c # # @return [ApiManagementServiceListResult] 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 @@ -1659,8 +1632,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 # @@ -1673,12 +1646,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 @@ -1732,8 +1704,8 @@ def list_by_resource_group_next_async(next_page_link, custom_headers:nil) # # @return [ApiManagementServiceListResult] 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 @@ -1747,8 +1719,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 # @@ -1761,12 +1733,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 @@ -1820,12 +1791,12 @@ def list_next_async(next_page_link, custom_headers:nil) # @return [ApiManagementServiceListResult] 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 @@ -1840,12 +1811,12 @@ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil) # @return [ApiManagementServiceListResult] 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_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/api_operations.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/api_operations.rb index f3e85ef535..93b018953b 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/api_operations.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/api_operations.rb @@ -42,8 +42,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_api(resource_group_name, service_name, api_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_api_as_lazy(resource_group_name, service_name, api_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_api(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_api_as_lazy(resource_group_name, service_name, api_id, filter, top, skip, custom_headers) first_page.get_all_items end @@ -68,8 +68,8 @@ def list_by_api(resource_group_name, service_name, api_id, filter:nil, top:nil, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_api_with_http_info(resource_group_name, service_name, api_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_api_async(resource_group_name, service_name, api_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_api_with_http_info(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_api_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! end # @@ -93,24 +93,15 @@ def list_by_api_with_http_info(resource_group_name, service_name, api_id, filter # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_api_async(resource_group_name, service_name, api_id, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_api_async(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -169,8 +160,8 @@ def list_by_api_async(resource_group_name, service_name, api_id, filter:nil, top # # @return [OperationContract] operation results. # - def get(resource_group_name, service_name, api_id, operation_id, custom_headers:nil) - response = get_async(resource_group_name, service_name, api_id, operation_id, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, api_id, operation_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, api_id, operation_id, custom_headers).value! response.body unless response.nil? end @@ -188,8 +179,8 @@ def get(resource_group_name, service_name, api_id, operation_id, custom_headers: # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, api_id, operation_id, custom_headers:nil) - get_async(resource_group_name, service_name, api_id, operation_id, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, api_id, operation_id, custom_headers = nil) + get_async(resource_group_name, service_name, api_id, operation_id, custom_headers).value! end # @@ -206,26 +197,16 @@ def get_with_http_info(resource_group_name, service_name, api_id, operation_id, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, api_id, operation_id, custom_headers:nil) + def get_async(resource_group_name, service_name, api_id, operation_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'operation_id is nil' if operation_id.nil? - fail ArgumentError, "'operation_id' should satisfy the constraint - 'MaxLength': '256'" if !operation_id.nil? && operation_id.length > 256 - fail ArgumentError, "'operation_id' should satisfy the constraint - 'MinLength': '1'" if !operation_id.nil? && operation_id.length < 1 - fail ArgumentError, "'operation_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !operation_id.nil? && operation_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -284,8 +265,8 @@ def get_async(resource_group_name, service_name, api_id, operation_id, custom_he # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, api_id, operation_id, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, api_id, operation_id, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, api_id, operation_id, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, api_id, operation_id, parameters, custom_headers).value! nil end @@ -304,8 +285,8 @@ def create_or_update(resource_group_name, service_name, api_id, operation_id, pa # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, api_id, operation_id, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, api_id, operation_id, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, api_id, operation_id, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, api_id, operation_id, parameters, custom_headers).value! end # @@ -323,32 +304,24 @@ def create_or_update_with_http_info(resource_group_name, service_name, api_id, o # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, api_id, operation_id, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, api_id, operation_id, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'operation_id is nil' if operation_id.nil? - fail ArgumentError, "'operation_id' should satisfy the constraint - 'MaxLength': '256'" if !operation_id.nil? && operation_id.length > 256 - fail ArgumentError, "'operation_id' should satisfy the constraint - 'MinLength': '1'" if !operation_id.nil? && operation_id.length < 1 - fail ArgumentError, "'operation_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !operation_id.nil? && operation_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_07_07::Models::OperationContract.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -402,8 +375,8 @@ def create_or_update_async(resource_group_name, service_name, api_id, operation_ # will be added to the HTTP request. # # - def update(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers).value! nil end @@ -425,8 +398,8 @@ def update(resource_group_name, service_name, api_id, operation_id, parameters, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers).value! end # @@ -447,20 +420,11 @@ def update_with_http_info(resource_group_name, service_name, api_id, operation_i # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'operation_id is nil' if operation_id.nil? - fail ArgumentError, "'operation_id' should satisfy the constraint - 'MaxLength': '256'" if !operation_id.nil? && operation_id.length > 256 - fail ArgumentError, "'operation_id' should satisfy the constraint - 'MinLength': '1'" if !operation_id.nil? && operation_id.length < 1 - fail ArgumentError, "'operation_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !operation_id.nil? && operation_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -468,13 +432,14 @@ def update_async(resource_group_name, service_name, api_id, operation_id, 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['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_07_07::Models::PatchParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -527,8 +492,8 @@ def update_async(resource_group_name, service_name, api_id, operation_id, parame # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers).value! nil end @@ -549,8 +514,8 @@ def delete(resource_group_name, service_name, api_id, operation_id, if_match, cu # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers).value! end # @@ -570,27 +535,17 @@ def delete_with_http_info(resource_group_name, service_name, api_id, operation_i # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'operation_id is nil' if operation_id.nil? - fail ArgumentError, "'operation_id' should satisfy the constraint - 'MaxLength': '256'" if !operation_id.nil? && operation_id.length > 256 - fail ArgumentError, "'operation_id' should satisfy the constraint - 'MinLength': '1'" if !operation_id.nil? && operation_id.length < 1 - fail ArgumentError, "'operation_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !operation_id.nil? && operation_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'if_match is nil' if if_match.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 @@ -636,8 +591,8 @@ def delete_async(resource_group_name, service_name, api_id, operation_id, if_mat # # @return [OperationCollection] operation results. # - def list_by_api_next(next_page_link, custom_headers:nil) - response = list_by_api_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_api_next(next_page_link, custom_headers = nil) + response = list_by_api_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -651,8 +606,8 @@ def list_by_api_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_api_next_with_http_info(next_page_link, custom_headers:nil) - list_by_api_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_api_next_with_http_info(next_page_link, custom_headers = nil) + list_by_api_next_async(next_page_link, custom_headers).value! end # @@ -665,12 +620,11 @@ def list_by_api_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_api_next_async(next_page_link, custom_headers:nil) + def list_by_api_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 @@ -736,12 +690,12 @@ def list_by_api_next_async(next_page_link, custom_headers:nil) # @return [OperationCollection] which provide lazy access to pages of the # response. # - def list_by_api_as_lazy(resource_group_name, service_name, api_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_api_async(resource_group_name, service_name, api_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_api_as_lazy(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_api_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_api_next_async(next_page_link, custom_headers:custom_headers) + list_by_api_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/api_products.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/api_products.rb index ca5eb25c97..6bee552064 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/api_products.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/api_products.rb @@ -40,8 +40,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_api(resource_group_name, service_name, api_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_api_as_lazy(resource_group_name, service_name, api_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_api(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_api_as_lazy(resource_group_name, service_name, api_id, filter, top, skip, custom_headers) first_page.get_all_items end @@ -64,8 +64,8 @@ def list_by_api(resource_group_name, service_name, api_id, filter:nil, top:nil, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_api_with_http_info(resource_group_name, service_name, api_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_api_async(resource_group_name, service_name, api_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_api_with_http_info(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_api_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! end # @@ -87,24 +87,15 @@ def list_by_api_with_http_info(resource_group_name, service_name, api_id, filter # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_api_async(resource_group_name, service_name, api_id, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_api_async(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -159,8 +150,8 @@ def list_by_api_async(resource_group_name, service_name, api_id, filter:nil, top # # @return [ProductCollection] operation results. # - def list_by_api_next(next_page_link, custom_headers:nil) - response = list_by_api_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_api_next(next_page_link, custom_headers = nil) + response = list_by_api_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -174,8 +165,8 @@ def list_by_api_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_api_next_with_http_info(next_page_link, custom_headers:nil) - list_by_api_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_api_next_with_http_info(next_page_link, custom_headers = nil) + list_by_api_next_async(next_page_link, custom_headers).value! end # @@ -188,12 +179,11 @@ def list_by_api_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_api_next_async(next_page_link, custom_headers:nil) + def list_by_api_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 @@ -257,12 +247,12 @@ def list_by_api_next_async(next_page_link, custom_headers:nil) # @return [ProductCollection] which provide lazy access to pages of the # response. # - def list_by_api_as_lazy(resource_group_name, service_name, api_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_api_async(resource_group_name, service_name, api_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_api_as_lazy(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_api_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_api_next_async(next_page_link, custom_headers:custom_headers) + list_by_api_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/apis.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/apis.rb index d86b93c6ec..36322450f0 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/apis.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/apis.rb @@ -41,8 +41,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_service_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) first_page.get_all_items end @@ -66,8 +66,8 @@ def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! end # @@ -90,20 +90,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, filter:nil # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -160,8 +154,8 @@ def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil # # @return [ApiContract] operation results. # - def get(resource_group_name, service_name, api_id, custom_headers:nil) - response = get_async(resource_group_name, service_name, api_id, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, api_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, api_id, custom_headers).value! response.body unless response.nil? end @@ -177,8 +171,8 @@ def get(resource_group_name, service_name, api_id, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, api_id, custom_headers:nil) - get_async(resource_group_name, service_name, api_id, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, api_id, custom_headers = nil) + get_async(resource_group_name, service_name, api_id, custom_headers).value! end # @@ -193,22 +187,15 @@ def get_with_http_info(resource_group_name, service_name, api_id, custom_headers # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, api_id, custom_headers:nil) + def get_async(resource_group_name, service_name, api_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -269,8 +256,8 @@ def get_async(resource_group_name, service_name, api_id, custom_headers:nil) # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, api_id, parameters, if_match:nil, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, api_id, parameters, if_match:if_match, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, api_id, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers).value! nil end @@ -291,8 +278,8 @@ def create_or_update(resource_group_name, service_name, api_id, parameters, if_m # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, api_id, parameters, if_match:nil, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, api_id, parameters, if_match:if_match, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, api_id, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers).value! end # @@ -312,29 +299,24 @@ def create_or_update_with_http_info(resource_group_name, service_name, api_id, p # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, api_id, parameters, if_match:nil, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, api_id, parameters, if_match = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_07_07::Models::ApiContract.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -386,8 +368,8 @@ def create_or_update_async(resource_group_name, service_name, api_id, parameters # will be added to the HTTP request. # # - def update(resource_group_name, service_name, api_id, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, api_id, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers).value! nil end @@ -407,8 +389,8 @@ def update(resource_group_name, service_name, api_id, parameters, if_match, cust # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, api_id, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, api_id, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers).value! end # @@ -427,16 +409,10 @@ def update_with_http_info(resource_group_name, service_name, api_id, parameters, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -444,13 +420,14 @@ def update_async(resource_group_name, service_name, api_id, parameters, if_match request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_07_07::Models::PatchParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -501,8 +478,8 @@ def update_async(resource_group_name, service_name, api_id, parameters, if_match # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, api_id, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, api_id, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, api_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, api_id, if_match, custom_headers).value! nil end @@ -521,8 +498,8 @@ def delete(resource_group_name, service_name, api_id, if_match, custom_headers:n # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, api_id, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, api_id, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, api_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, api_id, if_match, custom_headers).value! end # @@ -540,23 +517,16 @@ def delete_with_http_info(resource_group_name, service_name, api_id, if_match, c # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, api_id, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, api_id, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'if_match is nil' if if_match.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 @@ -604,8 +574,8 @@ def delete_async(resource_group_name, service_name, api_id, if_match, custom_hea # # @return [ApiExportResult] operation results. # - def export(resource_group_name, service_name, api_id, custom_headers:nil) - response = export_async(resource_group_name, service_name, api_id, custom_headers:custom_headers).value! + def export(resource_group_name, service_name, api_id, custom_headers = nil) + response = export_async(resource_group_name, service_name, api_id, custom_headers).value! response.body unless response.nil? end @@ -621,8 +591,8 @@ def export(resource_group_name, service_name, api_id, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def export_with_http_info(resource_group_name, service_name, api_id, custom_headers:nil) - export_async(resource_group_name, service_name, api_id, custom_headers:custom_headers).value! + def export_with_http_info(resource_group_name, service_name, api_id, custom_headers = nil) + export_async(resource_group_name, service_name, api_id, custom_headers).value! end # @@ -637,22 +607,15 @@ def export_with_http_info(resource_group_name, service_name, api_id, custom_head # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def export_async(resource_group_name, service_name, api_id, custom_headers:nil) + def export_async(resource_group_name, service_name, api_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -707,8 +670,8 @@ def export_async(resource_group_name, service_name, api_id, custom_headers:nil) # # @return [ApiCollection] operation results. # - def list_by_service_next(next_page_link, custom_headers:nil) - response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -722,8 +685,8 @@ def list_by_service_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) - list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! end # @@ -736,12 +699,11 @@ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_next_async(next_page_link, custom_headers:nil) + def list_by_service_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 @@ -805,12 +767,12 @@ def list_by_service_next_async(next_page_link, custom_headers:nil) # # @return [ApiCollection] which provide lazy access to pages of the response. # - def list_by_service_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_service_next_async(next_page_link, custom_headers:custom_headers) + list_by_service_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/authorization_servers.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/authorization_servers.rb index 12d861ac01..46accc1d50 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/authorization_servers.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/authorization_servers.rb @@ -41,8 +41,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_service_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) first_page.get_all_items end @@ -66,8 +66,8 @@ def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! end # @@ -90,20 +90,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, filter:nil # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -159,8 +153,8 @@ def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil # # @return [OAuth2AuthorizationServerContract] operation results. # - def get(resource_group_name, service_name, authsid, custom_headers:nil) - response = get_async(resource_group_name, service_name, authsid, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, authsid, custom_headers = nil) + response = get_async(resource_group_name, service_name, authsid, custom_headers).value! response.body unless response.nil? end @@ -175,8 +169,8 @@ def get(resource_group_name, service_name, authsid, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, authsid, custom_headers:nil) - get_async(resource_group_name, service_name, authsid, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, authsid, custom_headers = nil) + get_async(resource_group_name, service_name, authsid, custom_headers).value! end # @@ -190,21 +184,15 @@ def get_with_http_info(resource_group_name, service_name, authsid, custom_header # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, authsid, custom_headers:nil) + def get_async(resource_group_name, service_name, authsid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'authsid is nil' if authsid.nil? - fail ArgumentError, "'authsid' should satisfy the constraint - 'MaxLength': '256'" if !authsid.nil? && authsid.length > 256 - fail ArgumentError, "'authsid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !authsid.nil? && authsid.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -261,8 +249,8 @@ def get_async(resource_group_name, service_name, authsid, custom_headers:nil) # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, authsid, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, authsid, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, authsid, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, authsid, parameters, custom_headers).value! nil end @@ -279,8 +267,8 @@ def create_or_update(resource_group_name, service_name, authsid, parameters, cus # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, authsid, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, authsid, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, authsid, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, authsid, parameters, custom_headers).value! end # @@ -296,27 +284,23 @@ def create_or_update_with_http_info(resource_group_name, service_name, authsid, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, authsid, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, authsid, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'authsid is nil' if authsid.nil? - fail ArgumentError, "'authsid' should satisfy the constraint - 'MaxLength': '256'" if !authsid.nil? && authsid.length > 256 - fail ArgumentError, "'authsid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !authsid.nil? && authsid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_07_07::Models::OAuth2AuthorizationServerContract.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -368,8 +352,8 @@ def create_or_update_async(resource_group_name, service_name, authsid, parameter # will be added to the HTTP request. # # - def update(resource_group_name, service_name, authsid, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, authsid, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, authsid, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, authsid, parameters, if_match, custom_headers).value! nil end @@ -389,8 +373,8 @@ def update(resource_group_name, service_name, authsid, parameters, if_match, cus # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, authsid, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, authsid, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, authsid, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, authsid, parameters, if_match, custom_headers).value! end # @@ -409,12 +393,9 @@ def update_with_http_info(resource_group_name, service_name, authsid, parameters # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, authsid, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, authsid, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'authsid is nil' if authsid.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? @@ -423,13 +404,14 @@ def update_async(resource_group_name, service_name, authsid, parameters, if_matc request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_07_07::Models::OAuth2AuthorizationServerUpdateContract.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -479,8 +461,8 @@ def update_async(resource_group_name, service_name, authsid, parameters, if_matc # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, authsid, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, authsid, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, authsid, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, authsid, if_match, custom_headers).value! nil end @@ -498,8 +480,8 @@ def delete(resource_group_name, service_name, authsid, if_match, custom_headers: # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, authsid, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, authsid, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, authsid, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, authsid, if_match, custom_headers).value! end # @@ -516,12 +498,9 @@ def delete_with_http_info(resource_group_name, service_name, authsid, if_match, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, authsid, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, authsid, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'authsid is nil' if authsid.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -529,7 +508,6 @@ def delete_async(resource_group_name, service_name, authsid, if_match, custom_he request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -576,8 +554,8 @@ def delete_async(resource_group_name, service_name, authsid, if_match, custom_he # # @return [AuthorizationServerCollection] operation results. # - def list_by_service_next(next_page_link, custom_headers:nil) - response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -592,8 +570,8 @@ def list_by_service_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) - list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! end # @@ -607,12 +585,11 @@ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_next_async(next_page_link, custom_headers:nil) + def list_by_service_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 @@ -677,12 +654,12 @@ def list_by_service_next_async(next_page_link, custom_headers:nil) # @return [AuthorizationServerCollection] which provide lazy access to pages of # the response. # - def list_by_service_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_service_next_async(next_page_link, custom_headers:custom_headers) + list_by_service_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/backends.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/backends.rb index 90b9a7de3e..885f2fc8dd 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/backends.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/backends.rb @@ -40,8 +40,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_service_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) first_page.get_all_items end @@ -64,8 +64,8 @@ def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! end # @@ -87,20 +87,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, filter:nil # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -157,8 +151,8 @@ def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil # # @return [BackendResponse] operation results. # - def get(resource_group_name, service_name, backendid, custom_headers:nil) - response = get_async(resource_group_name, service_name, backendid, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, backendid, custom_headers = nil) + response = get_async(resource_group_name, service_name, backendid, custom_headers).value! response.body unless response.nil? end @@ -174,8 +168,8 @@ def get(resource_group_name, service_name, backendid, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, backendid, custom_headers:nil) - get_async(resource_group_name, service_name, backendid, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, backendid, custom_headers = nil) + get_async(resource_group_name, service_name, backendid, custom_headers).value! end # @@ -190,22 +184,15 @@ def get_with_http_info(resource_group_name, service_name, backendid, custom_head # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, backendid, custom_headers:nil) + def get_async(resource_group_name, service_name, backendid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'backendid is nil' if backendid.nil? - fail ArgumentError, "'backendid' should satisfy the constraint - 'MaxLength': '255'" if !backendid.nil? && backendid.length > 255 - fail ArgumentError, "'backendid' should satisfy the constraint - 'MinLength': '1'" if !backendid.nil? && backendid.length < 1 - fail ArgumentError, "'backendid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !backendid.nil? && backendid.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -262,8 +249,8 @@ def get_async(resource_group_name, service_name, backendid, custom_headers:nil) # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, backendid, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, backendid, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, backendid, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, backendid, parameters, custom_headers).value! nil end @@ -280,8 +267,8 @@ def create_or_update(resource_group_name, service_name, backendid, parameters, c # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, backendid, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, backendid, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, backendid, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, backendid, parameters, custom_headers).value! end # @@ -297,28 +284,23 @@ def create_or_update_with_http_info(resource_group_name, service_name, backendid # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, backendid, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, backendid, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'backendid is nil' if backendid.nil? - fail ArgumentError, "'backendid' should satisfy the constraint - 'MaxLength': '255'" if !backendid.nil? && backendid.length > 255 - fail ArgumentError, "'backendid' should satisfy the constraint - 'MinLength': '1'" if !backendid.nil? && backendid.length < 1 - fail ArgumentError, "'backendid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !backendid.nil? && backendid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_07_07::Models::BackendContract.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -370,8 +352,8 @@ def create_or_update_async(resource_group_name, service_name, backendid, paramet # will be added to the HTTP request. # # - def update(resource_group_name, service_name, backendid, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, backendid, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, backendid, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, backendid, parameters, if_match, custom_headers).value! nil end @@ -391,8 +373,8 @@ def update(resource_group_name, service_name, backendid, parameters, if_match, c # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, backendid, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, backendid, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, backendid, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, backendid, parameters, if_match, custom_headers).value! end # @@ -411,16 +393,10 @@ def update_with_http_info(resource_group_name, service_name, backendid, paramete # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, backendid, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, backendid, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'backendid is nil' if backendid.nil? - fail ArgumentError, "'backendid' should satisfy the constraint - 'MaxLength': '255'" if !backendid.nil? && backendid.length > 255 - fail ArgumentError, "'backendid' should satisfy the constraint - 'MinLength': '1'" if !backendid.nil? && backendid.length < 1 - fail ArgumentError, "'backendid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !backendid.nil? && backendid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -428,13 +404,14 @@ def update_async(resource_group_name, service_name, backendid, parameters, if_ma request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_07_07::Models::BackendUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -485,8 +462,8 @@ def update_async(resource_group_name, service_name, backendid, parameters, if_ma # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, backendid, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, backendid, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, backendid, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, backendid, if_match, custom_headers).value! nil end @@ -505,8 +482,8 @@ def delete(resource_group_name, service_name, backendid, if_match, custom_header # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, backendid, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, backendid, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, backendid, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, backendid, if_match, custom_headers).value! end # @@ -524,23 +501,16 @@ def delete_with_http_info(resource_group_name, service_name, backendid, if_match # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, backendid, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, backendid, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'backendid is nil' if backendid.nil? - fail ArgumentError, "'backendid' should satisfy the constraint - 'MaxLength': '255'" if !backendid.nil? && backendid.length > 255 - fail ArgumentError, "'backendid' should satisfy the constraint - 'MinLength': '1'" if !backendid.nil? && backendid.length < 1 - fail ArgumentError, "'backendid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !backendid.nil? && backendid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'if_match is nil' if if_match.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 @@ -586,8 +556,8 @@ def delete_async(resource_group_name, service_name, backendid, if_match, custom_ # # @return [BackendCollection] operation results. # - def list_by_service_next(next_page_link, custom_headers:nil) - response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -601,8 +571,8 @@ def list_by_service_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) - list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! end # @@ -615,12 +585,11 @@ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_next_async(next_page_link, custom_headers:nil) + def list_by_service_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 @@ -684,12 +653,12 @@ def list_by_service_next_async(next_page_link, custom_headers:nil) # @return [BackendCollection] which provide lazy access to pages of the # response. # - def list_by_service_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_service_next_async(next_page_link, custom_headers:custom_headers) + list_by_service_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/certificates.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/certificates.rb index 96855a8861..7204c721a6 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/certificates.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/certificates.rb @@ -44,8 +44,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_service_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) first_page.get_all_items end @@ -72,8 +72,8 @@ def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! end # @@ -99,20 +99,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, filter:nil # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -168,8 +162,8 @@ def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil # # @return [CertificateContract] operation results. # - def get(resource_group_name, service_name, certificate_id, custom_headers:nil) - response = get_async(resource_group_name, service_name, certificate_id, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, certificate_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, certificate_id, custom_headers).value! response.body unless response.nil? end @@ -184,8 +178,8 @@ def get(resource_group_name, service_name, certificate_id, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, certificate_id, custom_headers:nil) - get_async(resource_group_name, service_name, certificate_id, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, certificate_id, custom_headers = nil) + get_async(resource_group_name, service_name, certificate_id, custom_headers).value! end # @@ -199,19 +193,15 @@ def get_with_http_info(resource_group_name, service_name, certificate_id, custom # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, certificate_id, custom_headers:nil) + def get_async(resource_group_name, service_name, certificate_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'certificate_id is nil' if certificate_id.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 @@ -272,8 +262,8 @@ def get_async(resource_group_name, service_name, certificate_id, custom_headers: # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, certificate_id, parameters, if_match:nil, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, certificate_id, parameters, if_match:if_match, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, certificate_id, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, certificate_id, parameters, if_match, custom_headers).value! nil end @@ -294,8 +284,8 @@ def create_or_update(resource_group_name, service_name, certificate_id, paramete # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, certificate_id, parameters, if_match:nil, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, certificate_id, parameters, if_match:if_match, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, certificate_id, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, certificate_id, parameters, if_match, custom_headers).value! end # @@ -315,29 +305,24 @@ def create_or_update_with_http_info(resource_group_name, service_name, certifica # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, certificate_id, parameters, if_match:nil, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, certificate_id, parameters, if_match = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'certificate_id is nil' if certificate_id.nil? - fail ArgumentError, "'certificate_id' should satisfy the constraint - 'MaxLength': '256'" if !certificate_id.nil? && certificate_id.length > 256 - fail ArgumentError, "'certificate_id' should satisfy the constraint - 'MinLength': '1'" if !certificate_id.nil? && certificate_id.length < 1 - fail ArgumentError, "'certificate_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !certificate_id.nil? && certificate_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_07_07::Models::CertificateCreateOrUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -387,8 +372,8 @@ def create_or_update_async(resource_group_name, service_name, certificate_id, pa # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, certificate_id, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, certificate_id, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, certificate_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, certificate_id, if_match, custom_headers).value! nil end @@ -406,8 +391,8 @@ def delete(resource_group_name, service_name, certificate_id, if_match, custom_h # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, certificate_id, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, certificate_id, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, certificate_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, certificate_id, if_match, custom_headers).value! end # @@ -424,12 +409,9 @@ def delete_with_http_info(resource_group_name, service_name, certificate_id, if_ # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, certificate_id, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, certificate_id, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'certificate_id is nil' if certificate_id.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -437,7 +419,6 @@ def delete_async(resource_group_name, service_name, certificate_id, if_match, cu request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -483,8 +464,8 @@ def delete_async(resource_group_name, service_name, certificate_id, if_match, cu # # @return [CertificateCollection] operation results. # - def list_by_service_next(next_page_link, custom_headers:nil) - response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -498,8 +479,8 @@ def list_by_service_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) - list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! end # @@ -512,12 +493,11 @@ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_next_async(next_page_link, custom_headers:nil) + def list_by_service_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 @@ -585,12 +565,12 @@ def list_by_service_next_async(next_page_link, custom_headers:nil) # @return [CertificateCollection] which provide lazy access to pages of the # response. # - def list_by_service_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_service_next_async(next_page_link, custom_headers:custom_headers) + list_by_service_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/group_users.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/group_users.rb index 13f6ff825e..554ab2b332 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/group_users.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/group_users.rb @@ -52,8 +52,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_group(resource_group_name, service_name, group_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_group_as_lazy(resource_group_name, service_name, group_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_group(resource_group_name, service_name, group_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_group_as_lazy(resource_group_name, service_name, group_id, filter, top, skip, custom_headers) first_page.get_all_items end @@ -88,8 +88,8 @@ def list_by_group(resource_group_name, service_name, group_id, filter:nil, top:n # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_group_with_http_info(resource_group_name, service_name, group_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_group_async(resource_group_name, service_name, group_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_group_with_http_info(resource_group_name, service_name, group_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_group_async(resource_group_name, service_name, group_id, filter, top, skip, custom_headers).value! end # @@ -123,24 +123,15 @@ def list_by_group_with_http_info(resource_group_name, service_name, group_id, fi # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_group_async(resource_group_name, service_name, group_id, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_group_async(resource_group_name, service_name, group_id, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'group_id is nil' if group_id.nil? - fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '256'" if !group_id.nil? && group_id.length > 256 - fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 - fail ArgumentError, "'group_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !group_id.nil? && group_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -199,8 +190,8 @@ def list_by_group_async(resource_group_name, service_name, group_id, filter:nil, # # @return [ErrorBodyContract] operation results. # - def add(resource_group_name, service_name, group_id, uid, custom_headers:nil) - response = add_async(resource_group_name, service_name, group_id, uid, custom_headers:custom_headers).value! + def add(resource_group_name, service_name, group_id, uid, custom_headers = nil) + response = add_async(resource_group_name, service_name, group_id, uid, custom_headers).value! response.body unless response.nil? end @@ -218,8 +209,8 @@ def add(resource_group_name, service_name, group_id, uid, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def add_with_http_info(resource_group_name, service_name, group_id, uid, custom_headers:nil) - add_async(resource_group_name, service_name, group_id, uid, custom_headers:custom_headers).value! + def add_with_http_info(resource_group_name, service_name, group_id, uid, custom_headers = nil) + add_async(resource_group_name, service_name, group_id, uid, custom_headers).value! end # @@ -236,26 +227,16 @@ def add_with_http_info(resource_group_name, service_name, group_id, uid, custom_ # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def add_async(resource_group_name, service_name, group_id, uid, custom_headers:nil) + def add_async(resource_group_name, service_name, group_id, uid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'group_id is nil' if group_id.nil? - fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '256'" if !group_id.nil? && group_id.length > 256 - fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 - fail ArgumentError, "'group_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !group_id.nil? && group_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'uid is nil' if uid.nil? - fail ArgumentError, "'uid' should satisfy the constraint - 'MaxLength': '256'" if !uid.nil? && uid.length > 256 - fail ArgumentError, "'uid' should satisfy the constraint - 'MinLength': '1'" if !uid.nil? && uid.length < 1 - fail ArgumentError, "'uid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !uid.nil? && uid.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -314,8 +295,8 @@ def add_async(resource_group_name, service_name, group_id, uid, custom_headers:n # # @return [ErrorBodyContract] operation results. # - def remove(resource_group_name, service_name, group_id, uid, custom_headers:nil) - response = remove_async(resource_group_name, service_name, group_id, uid, custom_headers:custom_headers).value! + def remove(resource_group_name, service_name, group_id, uid, custom_headers = nil) + response = remove_async(resource_group_name, service_name, group_id, uid, custom_headers).value! response.body unless response.nil? end @@ -333,8 +314,8 @@ def remove(resource_group_name, service_name, group_id, uid, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def remove_with_http_info(resource_group_name, service_name, group_id, uid, custom_headers:nil) - remove_async(resource_group_name, service_name, group_id, uid, custom_headers:custom_headers).value! + def remove_with_http_info(resource_group_name, service_name, group_id, uid, custom_headers = nil) + remove_async(resource_group_name, service_name, group_id, uid, custom_headers).value! end # @@ -351,26 +332,16 @@ def remove_with_http_info(resource_group_name, service_name, group_id, uid, cust # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def remove_async(resource_group_name, service_name, group_id, uid, custom_headers:nil) + def remove_async(resource_group_name, service_name, group_id, uid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'group_id is nil' if group_id.nil? - fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '256'" if !group_id.nil? && group_id.length > 256 - fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 - fail ArgumentError, "'group_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !group_id.nil? && group_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'uid is nil' if uid.nil? - fail ArgumentError, "'uid' should satisfy the constraint - 'MaxLength': '256'" if !uid.nil? && uid.length > 256 - fail ArgumentError, "'uid' should satisfy the constraint - 'MinLength': '1'" if !uid.nil? && uid.length < 1 - fail ArgumentError, "'uid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !uid.nil? && uid.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -425,8 +396,8 @@ def remove_async(resource_group_name, service_name, group_id, uid, custom_header # # @return [UserCollection] operation results. # - def list_by_group_next(next_page_link, custom_headers:nil) - response = list_by_group_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_group_next(next_page_link, custom_headers = nil) + response = list_by_group_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -440,8 +411,8 @@ def list_by_group_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_group_next_with_http_info(next_page_link, custom_headers:nil) - list_by_group_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_group_next_with_http_info(next_page_link, custom_headers = nil) + list_by_group_next_async(next_page_link, custom_headers).value! end # @@ -454,12 +425,11 @@ def list_by_group_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_group_next_async(next_page_link, custom_headers:nil) + def list_by_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 @@ -534,12 +504,12 @@ def list_by_group_next_async(next_page_link, custom_headers:nil) # # @return [UserCollection] which provide lazy access to pages of the response. # - def list_by_group_as_lazy(resource_group_name, service_name, group_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_group_async(resource_group_name, service_name, group_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_group_as_lazy(resource_group_name, service_name, group_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_group_async(resource_group_name, service_name, group_id, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_group_next_async(next_page_link, custom_headers:custom_headers) + list_by_group_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/groups.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/groups.rb index 765650c69c..2f7a930fed 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/groups.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/groups.rb @@ -44,8 +44,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_service_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) first_page.get_all_items end @@ -72,8 +72,8 @@ def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! end # @@ -99,20 +99,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, filter:nil # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -169,8 +163,8 @@ def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil # # @return [GroupContract] operation results. # - def get(resource_group_name, service_name, group_id, custom_headers:nil) - response = get_async(resource_group_name, service_name, group_id, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, group_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, group_id, custom_headers).value! response.body unless response.nil? end @@ -186,8 +180,8 @@ def get(resource_group_name, service_name, group_id, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, group_id, custom_headers:nil) - get_async(resource_group_name, service_name, group_id, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, group_id, custom_headers = nil) + get_async(resource_group_name, service_name, group_id, custom_headers).value! end # @@ -202,22 +196,15 @@ def get_with_http_info(resource_group_name, service_name, group_id, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, group_id, custom_headers:nil) + def get_async(resource_group_name, service_name, group_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'group_id is nil' if group_id.nil? - fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '256'" if !group_id.nil? && group_id.length > 256 - fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 - fail ArgumentError, "'group_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !group_id.nil? && group_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -274,8 +261,8 @@ def get_async(resource_group_name, service_name, group_id, custom_headers:nil) # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, group_id, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, group_id, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, group_id, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, group_id, parameters, custom_headers).value! nil end @@ -292,8 +279,8 @@ def create_or_update(resource_group_name, service_name, group_id, parameters, cu # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, group_id, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, group_id, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, group_id, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, group_id, parameters, custom_headers).value! end # @@ -309,28 +296,23 @@ def create_or_update_with_http_info(resource_group_name, service_name, group_id, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, group_id, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, group_id, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'group_id is nil' if group_id.nil? - fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '256'" if !group_id.nil? && group_id.length > 256 - fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 - fail ArgumentError, "'group_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !group_id.nil? && group_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_07_07::Models::GroupCreateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -383,8 +365,8 @@ def create_or_update_async(resource_group_name, service_name, group_id, paramete # # @return [ErrorBodyContract] operation results. # - def update(resource_group_name, service_name, group_id, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, group_id, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, group_id, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, group_id, parameters, if_match, custom_headers).value! response.body unless response.nil? end @@ -404,8 +386,8 @@ def update(resource_group_name, service_name, group_id, parameters, if_match, cu # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, group_id, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, group_id, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, group_id, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, group_id, parameters, if_match, custom_headers).value! end # @@ -424,16 +406,10 @@ def update_with_http_info(resource_group_name, service_name, group_id, parameter # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, group_id, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, group_id, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'group_id is nil' if group_id.nil? - fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '256'" if !group_id.nil? && group_id.length > 256 - fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 - fail ArgumentError, "'group_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !group_id.nil? && group_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -441,13 +417,14 @@ def update_async(resource_group_name, service_name, group_id, parameters, if_mat request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_07_07::Models::GroupUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -509,8 +486,8 @@ def update_async(resource_group_name, service_name, group_id, parameters, if_mat # # @return [ErrorBodyContract] operation results. # - def delete(resource_group_name, service_name, group_id, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, group_id, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, group_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, group_id, if_match, custom_headers).value! response.body unless response.nil? end @@ -529,8 +506,8 @@ def delete(resource_group_name, service_name, group_id, if_match, custom_headers # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, group_id, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, group_id, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, group_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, group_id, if_match, custom_headers).value! end # @@ -548,23 +525,16 @@ def delete_with_http_info(resource_group_name, service_name, group_id, if_match, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, group_id, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, group_id, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'group_id is nil' if group_id.nil? - fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '256'" if !group_id.nil? && group_id.length > 256 - fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 - fail ArgumentError, "'group_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !group_id.nil? && group_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'if_match is nil' if if_match.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 @@ -620,8 +590,8 @@ def delete_async(resource_group_name, service_name, group_id, if_match, custom_h # # @return [GroupCollection] operation results. # - def list_by_service_next(next_page_link, custom_headers:nil) - response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -635,8 +605,8 @@ def list_by_service_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) - list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! end # @@ -649,12 +619,11 @@ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_next_async(next_page_link, custom_headers:nil) + def list_by_service_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 @@ -721,12 +690,12 @@ def list_by_service_next_async(next_page_link, custom_headers:nil) # # @return [GroupCollection] which provide lazy access to pages of the response. # - def list_by_service_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_service_next_async(next_page_link, custom_headers:custom_headers) + list_by_service_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/identity_providers.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/identity_providers.rb index b31cee8816..d9061cf76d 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/identity_providers.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/identity_providers.rb @@ -32,8 +32,8 @@ def initialize(client) # # @return [IdentityProviderList] operation results. # - def list_by_service(resource_group_name, service_name, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def list_by_service(resource_group_name, service_name, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, custom_headers).value! response.body unless response.nil? end @@ -48,8 +48,8 @@ def list_by_service(resource_group_name, service_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, custom_headers).value! end # @@ -63,18 +63,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, custom_hea # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, custom_headers:nil) + def list_by_service_async(resource_group_name, service_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, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 @@ -133,8 +129,8 @@ def list_by_service_async(resource_group_name, service_name, custom_headers:nil) # # @return [IdentityProviderContract] operation results. # - def get(resource_group_name, service_name, identity_provider_name, custom_headers:nil) - response = get_async(resource_group_name, service_name, identity_provider_name, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, identity_provider_name, custom_headers = nil) + response = get_async(resource_group_name, service_name, identity_provider_name, custom_headers).value! response.body unless response.nil? end @@ -152,8 +148,8 @@ def get(resource_group_name, service_name, identity_provider_name, custom_header # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, identity_provider_name, custom_headers:nil) - get_async(resource_group_name, service_name, identity_provider_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, identity_provider_name, custom_headers = nil) + get_async(resource_group_name, service_name, identity_provider_name, custom_headers).value! end # @@ -170,19 +166,15 @@ def get_with_http_info(resource_group_name, service_name, identity_provider_name # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, identity_provider_name, custom_headers:nil) + def get_async(resource_group_name, service_name, identity_provider_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, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'identity_provider_name is nil' if identity_provider_name.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 @@ -240,8 +232,8 @@ def get_async(resource_group_name, service_name, identity_provider_name, custom_ # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, identity_provider_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, identity_provider_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, identity_provider_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, identity_provider_name, parameters, custom_headers).value! nil end @@ -259,8 +251,8 @@ def create_or_update(resource_group_name, service_name, identity_provider_name, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, identity_provider_name, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, identity_provider_name, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, identity_provider_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, identity_provider_name, parameters, custom_headers).value! end # @@ -277,12 +269,9 @@ def create_or_update_with_http_info(resource_group_name, service_name, identity_ # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, identity_provider_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, identity_provider_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'identity_provider_name is nil' if identity_provider_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -290,12 +279,13 @@ def create_or_update_async(resource_group_name, service_name, identity_provider_ 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::ApiManagement::Mgmt::V2016_07_07::Models::IdentityProviderContract.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -348,8 +338,8 @@ def create_or_update_async(resource_group_name, service_name, identity_provider_ # will be added to the HTTP request. # # - def update(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers).value! nil end @@ -370,8 +360,8 @@ def update(resource_group_name, service_name, identity_provider_name, parameters # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers).value! end # @@ -391,12 +381,9 @@ def update_with_http_info(resource_group_name, service_name, identity_provider_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'identity_provider_name is nil' if identity_provider_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? @@ -405,13 +392,14 @@ def update_async(resource_group_name, service_name, identity_provider_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['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_07_07::Models::IdentityProviderUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -463,8 +451,8 @@ def update_async(resource_group_name, service_name, identity_provider_name, para # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, identity_provider_name, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, identity_provider_name, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, identity_provider_name, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, identity_provider_name, if_match, custom_headers).value! nil end @@ -484,8 +472,8 @@ def delete(resource_group_name, service_name, identity_provider_name, if_match, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, identity_provider_name, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, identity_provider_name, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, identity_provider_name, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, identity_provider_name, if_match, custom_headers).value! end # @@ -504,12 +492,9 @@ def delete_with_http_info(resource_group_name, service_name, identity_provider_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, identity_provider_name, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, identity_provider_name, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'identity_provider_name is nil' if identity_provider_name.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -517,7 +502,6 @@ def delete_async(resource_group_name, service_name, identity_provider_name, if_m 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_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/loggers.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/loggers.rb index 69ccd9a0e5..8293ed7eee 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/loggers.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/loggers.rb @@ -40,8 +40,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_service_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) first_page.get_all_items end @@ -64,8 +64,8 @@ def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! end # @@ -87,20 +87,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, filter:nil # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -156,8 +150,8 @@ def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil # # @return [LoggerResponse] operation results. # - def get(resource_group_name, service_name, loggerid, custom_headers:nil) - response = get_async(resource_group_name, service_name, loggerid, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, loggerid, custom_headers = nil) + response = get_async(resource_group_name, service_name, loggerid, custom_headers).value! response.body unless response.nil? end @@ -172,8 +166,8 @@ def get(resource_group_name, service_name, loggerid, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, loggerid, custom_headers:nil) - get_async(resource_group_name, service_name, loggerid, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, loggerid, custom_headers = nil) + get_async(resource_group_name, service_name, loggerid, custom_headers).value! end # @@ -187,19 +181,15 @@ def get_with_http_info(resource_group_name, service_name, loggerid, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, loggerid, custom_headers:nil) + def get_async(resource_group_name, service_name, loggerid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'loggerid is nil' if loggerid.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 @@ -255,8 +245,8 @@ def get_async(resource_group_name, service_name, loggerid, custom_headers:nil) # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, loggerid, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, loggerid, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, loggerid, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, loggerid, parameters, custom_headers).value! nil end @@ -272,8 +262,8 @@ def create_or_update(resource_group_name, service_name, loggerid, parameters, cu # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, loggerid, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, loggerid, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, loggerid, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, loggerid, parameters, custom_headers).value! end # @@ -288,27 +278,23 @@ def create_or_update_with_http_info(resource_group_name, service_name, loggerid, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, loggerid, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, loggerid, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'loggerid is nil' if loggerid.nil? - fail ArgumentError, "'loggerid' should satisfy the constraint - 'MaxLength': '256'" if !loggerid.nil? && loggerid.length > 256 - fail ArgumentError, "'loggerid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !loggerid.nil? && loggerid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_07_07::Models::LoggerCreateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -359,8 +345,8 @@ def create_or_update_async(resource_group_name, service_name, loggerid, paramete # will be added to the HTTP request. # # - def update(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers).value! nil end @@ -379,8 +365,8 @@ def update(resource_group_name, service_name, loggerid, parameters, if_match, cu # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers).value! end # @@ -398,12 +384,9 @@ def update_with_http_info(resource_group_name, service_name, loggerid, parameter # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'loggerid is nil' if loggerid.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? @@ -412,13 +395,14 @@ def update_async(resource_group_name, service_name, loggerid, parameters, if_mat request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_07_07::Models::LoggerUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -468,8 +452,8 @@ def update_async(resource_group_name, service_name, loggerid, parameters, if_mat # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, loggerid, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, loggerid, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, loggerid, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, loggerid, if_match, custom_headers).value! nil end @@ -487,8 +471,8 @@ def delete(resource_group_name, service_name, loggerid, if_match, custom_headers # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, loggerid, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, loggerid, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, loggerid, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, loggerid, if_match, custom_headers).value! end # @@ -505,12 +489,9 @@ def delete_with_http_info(resource_group_name, service_name, loggerid, if_match, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, loggerid, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, loggerid, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'loggerid is nil' if loggerid.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -518,7 +499,6 @@ def delete_async(resource_group_name, service_name, loggerid, if_match, custom_h request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -564,8 +544,8 @@ def delete_async(resource_group_name, service_name, loggerid, if_match, custom_h # # @return [LoggerCollection] operation results. # - def list_by_service_next(next_page_link, custom_headers:nil) - response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -579,8 +559,8 @@ def list_by_service_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) - list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! end # @@ -593,12 +573,11 @@ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_next_async(next_page_link, custom_headers:nil) + def list_by_service_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 @@ -662,12 +641,12 @@ def list_by_service_next_async(next_page_link, custom_headers:nil) # @return [LoggerCollection] which provide lazy access to pages of the # response. # - def list_by_service_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_service_next_async(next_page_link, custom_headers:custom_headers) + list_by_service_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/access_information_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/access_information_contract.rb index 01865ce083..a0997e121f 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/access_information_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/access_information_contract.rb @@ -32,7 +32,6 @@ class AccessInformationContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'AccessInformationContract', type: { @@ -40,7 +39,6 @@ def self.mapper() class_name: 'AccessInformationContract', model_properties: { id: { - client_side_validation: true, required: false, serialized_name: 'id', type: { @@ -48,7 +46,6 @@ def self.mapper() } }, primary_key: { - client_side_validation: true, required: false, serialized_name: 'primaryKey', type: { @@ -56,7 +53,6 @@ def self.mapper() } }, secondary_key: { - client_side_validation: true, required: false, serialized_name: 'secondaryKey', type: { @@ -64,7 +60,6 @@ def self.mapper() } }, enabled: { - client_side_validation: true, required: false, serialized_name: 'enabled', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/access_information_update_parameters.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/access_information_update_parameters.rb index fd0538d57c..e408e6cc2b 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/access_information_update_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/access_information_update_parameters.rb @@ -24,7 +24,6 @@ class AccessInformationUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'AccessInformationUpdateParameters', type: { @@ -32,7 +31,6 @@ def self.mapper() class_name: 'AccessInformationUpdateParameters', model_properties: { enabled: { - client_side_validation: true, required: true, serialized_name: 'enabled', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/additional_region.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/additional_region.rb index d3be14026b..6e4e200be0 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/additional_region.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/additional_region.rb @@ -41,7 +41,6 @@ class AdditionalRegion # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'AdditionalRegion', type: { @@ -49,7 +48,6 @@ def self.mapper() class_name: 'AdditionalRegion', model_properties: { location: { - client_side_validation: true, required: true, serialized_name: 'location', type: { @@ -57,7 +55,6 @@ def self.mapper() } }, sku_type: { - client_side_validation: true, required: true, serialized_name: 'skuType', type: { @@ -66,7 +63,6 @@ def self.mapper() } }, sku_unit_count: { - client_side_validation: true, required: false, serialized_name: 'skuUnitCount', default_value: 1, @@ -78,14 +74,12 @@ def self.mapper() } }, static_ips: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'staticIPs', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -95,7 +89,6 @@ def self.mapper() } }, vpnconfiguration: { - client_side_validation: true, required: false, serialized_name: 'vpnconfiguration', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_collection.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_collection.rb index 85af9fe7c5..c157650d56 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'ApiCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ApiContractElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_contract.rb index fd9ea5b632..4f62d0ff51 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_contract.rb @@ -55,7 +55,6 @@ class ApiContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiContract', type: { @@ -63,7 +62,6 @@ def self.mapper() class_name: 'ApiContract', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -72,7 +70,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: true, serialized_name: 'name', constraints: { @@ -84,7 +81,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -92,7 +88,6 @@ def self.mapper() } }, service_url: { - client_side_validation: true, required: true, serialized_name: 'serviceUrl', constraints: { @@ -104,7 +99,6 @@ def self.mapper() } }, path: { - client_side_validation: true, required: true, serialized_name: 'path', constraints: { @@ -116,13 +110,11 @@ def self.mapper() } }, protocols: { - client_side_validation: true, required: true, serialized_name: 'protocols', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ApiProtocolContractElementType', type: { @@ -133,7 +125,6 @@ def self.mapper() } }, authentication_settings: { - client_side_validation: true, required: false, serialized_name: 'authenticationSettings', type: { @@ -142,7 +133,6 @@ def self.mapper() } }, subscription_key_parameter_names: { - client_side_validation: true, required: false, serialized_name: 'subscriptionKeyParameterNames', type: { @@ -151,7 +141,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, serialized_name: 'type', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_export_result.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_export_result.rb index ad20ac1eb9..e29796e427 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_export_result.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_export_result.rb @@ -29,7 +29,6 @@ class ApiExportResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiExportResult', type: { @@ -37,7 +36,6 @@ def self.mapper() class_name: 'ApiExportResult', model_properties: { content: { - client_side_validation: true, required: false, serialized_name: 'content', type: { @@ -45,7 +43,6 @@ def self.mapper() } }, status_code: { - client_side_validation: true, required: false, serialized_name: 'statusCode', type: { @@ -54,7 +51,6 @@ def self.mapper() } }, request_id: { - client_side_validation: true, required: false, serialized_name: 'requestId', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_backup_restore_parameters.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_backup_restore_parameters.rb index c47133c1cd..abe01284e0 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_backup_restore_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_backup_restore_parameters.rb @@ -36,7 +36,6 @@ class ApiManagementServiceBackupRestoreParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceBackupRestoreParameters', type: { @@ -44,7 +43,6 @@ def self.mapper() class_name: 'ApiManagementServiceBackupRestoreParameters', model_properties: { storage_account: { - client_side_validation: true, required: true, serialized_name: 'storageAccount', type: { @@ -52,7 +50,6 @@ def self.mapper() } }, access_key: { - client_side_validation: true, required: true, serialized_name: 'accessKey', type: { @@ -60,7 +57,6 @@ def self.mapper() } }, container_name: { - client_side_validation: true, required: true, serialized_name: 'containerName', type: { @@ -68,7 +64,6 @@ def self.mapper() } }, backup_name: { - client_side_validation: true, required: true, serialized_name: 'backupName', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_base_parameters.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_base_parameters.rb index 8f81204dbd..d32119577a 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_base_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_base_parameters.rb @@ -96,7 +96,6 @@ class ApiManagementServiceBaseParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceBaseParameters', type: { @@ -104,13 +103,11 @@ def self.mapper() class_name: 'ApiManagementServiceBaseParameters', model_properties: { tags: { - client_side_validation: true, required: false, serialized_name: 'tags', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -120,7 +117,6 @@ def self.mapper() } }, publisher_email: { - client_side_validation: true, required: true, serialized_name: 'properties.publisherEmail', constraints: { @@ -131,7 +127,6 @@ def self.mapper() } }, publisher_name: { - client_side_validation: true, required: true, serialized_name: 'properties.publisherName', type: { @@ -139,7 +134,6 @@ def self.mapper() } }, provisioning_state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.provisioningState', @@ -148,7 +142,6 @@ def self.mapper() } }, target_provisioning_state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.targetProvisioningState', @@ -157,7 +150,6 @@ def self.mapper() } }, created_at_utc: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.createdAtUtc', @@ -166,7 +158,6 @@ def self.mapper() } }, runtime_url: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.runtimeUrl', @@ -175,7 +166,6 @@ def self.mapper() } }, portal_url: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.portalUrl', @@ -184,7 +174,6 @@ def self.mapper() } }, management_api_url: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.managementApiUrl', @@ -193,7 +182,6 @@ def self.mapper() } }, scm_url: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.scmUrl', @@ -202,7 +190,6 @@ def self.mapper() } }, addresser_email: { - client_side_validation: true, required: false, serialized_name: 'properties.addresserEmail', type: { @@ -210,13 +197,11 @@ def self.mapper() } }, hostname_configurations: { - client_side_validation: true, required: false, serialized_name: 'properties.hostnameConfigurations', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'HostnameConfigurationElementType', type: { @@ -227,14 +212,12 @@ def self.mapper() } }, static_ips: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.staticIPs', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -244,7 +227,6 @@ def self.mapper() } }, vpnconfiguration: { - client_side_validation: true, required: false, serialized_name: 'properties.vpnconfiguration', type: { @@ -253,13 +235,11 @@ def self.mapper() } }, additional_locations: { - client_side_validation: true, required: false, serialized_name: 'properties.additionalLocations', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'AdditionalRegionElementType', type: { @@ -270,13 +250,11 @@ def self.mapper() } }, custom_properties: { - client_side_validation: true, required: false, serialized_name: 'properties.customProperties', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -286,7 +264,6 @@ def self.mapper() } }, vpn_type: { - client_side_validation: true, required: false, serialized_name: 'properties.vpnType', default_value: 'None', @@ -296,7 +273,6 @@ def self.mapper() } }, sku: { - client_side_validation: true, required: false, serialized_name: 'sku', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_check_name_availability_parameters.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_check_name_availability_parameters.rb index c661379346..3724b9f284 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_check_name_availability_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_check_name_availability_parameters.rb @@ -23,7 +23,6 @@ class ApiManagementServiceCheckNameAvailabilityParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceCheckNameAvailabilityParameters', type: { @@ -31,7 +30,6 @@ def self.mapper() class_name: 'ApiManagementServiceCheckNameAvailabilityParameters', model_properties: { name: { - client_side_validation: true, required: true, serialized_name: 'name', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_get_sso_token_result.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_get_sso_token_result.rb index 5174c47d5e..62f72bfc36 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_get_sso_token_result.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_get_sso_token_result.rb @@ -22,7 +22,6 @@ class ApiManagementServiceGetSsoTokenResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceGetSsoTokenResult', type: { @@ -30,7 +29,6 @@ def self.mapper() class_name: 'ApiManagementServiceGetSsoTokenResult', model_properties: { redirect_uri: { - client_side_validation: true, required: false, serialized_name: 'redirect_uri', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_list_result.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_list_result.rb index 47122072c4..f55c0d100e 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_list_result.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_list_result.rb @@ -59,7 +59,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceListResult', type: { @@ -67,13 +66,11 @@ def self.mapper() class_name: 'ApiManagementServiceListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceResourceElementType', type: { @@ -84,7 +81,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_manage_deployments_parameters.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_manage_deployments_parameters.rb index 6d7a1c803c..8273be76d5 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_manage_deployments_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_manage_deployments_parameters.rb @@ -50,7 +50,6 @@ class ApiManagementServiceManageDeploymentsParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceManageDeploymentsParameters', type: { @@ -58,7 +57,6 @@ def self.mapper() class_name: 'ApiManagementServiceManageDeploymentsParameters', model_properties: { location: { - client_side_validation: true, required: true, serialized_name: 'location', type: { @@ -66,7 +64,6 @@ def self.mapper() } }, sku_type: { - client_side_validation: true, required: true, serialized_name: 'skuType', type: { @@ -75,7 +72,6 @@ def self.mapper() } }, sku_unit_count: { - client_side_validation: true, required: false, serialized_name: 'skuUnitCount', default_value: 1, @@ -84,13 +80,11 @@ def self.mapper() } }, additional_locations: { - client_side_validation: true, required: false, serialized_name: 'additionalLocations', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'AdditionalRegionElementType', type: { @@ -101,7 +95,6 @@ def self.mapper() } }, vpn_configuration: { - client_side_validation: true, required: false, serialized_name: 'vpnConfiguration', type: { @@ -110,7 +103,6 @@ def self.mapper() } }, vpn_type: { - client_side_validation: true, required: false, serialized_name: 'vpnType', default_value: 'None', diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_name_availability_result.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_name_availability_result.rb index cde28d1b9b..2713d0cf89 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_name_availability_result.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_name_availability_result.rb @@ -38,7 +38,6 @@ class ApiManagementServiceNameAvailabilityResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceNameAvailabilityResult', type: { @@ -46,7 +45,6 @@ def self.mapper() class_name: 'ApiManagementServiceNameAvailabilityResult', model_properties: { name_available: { - client_side_validation: true, required: true, serialized_name: 'nameAvailable', type: { @@ -54,7 +52,6 @@ def self.mapper() } }, message: { - client_side_validation: true, required: false, serialized_name: 'message', type: { @@ -62,7 +59,6 @@ def self.mapper() } }, reason: { - client_side_validation: true, required: false, serialized_name: 'reason', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_resource.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_resource.rb index db0b1e351b..1c2b607d69 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_resource.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_resource.rb @@ -34,7 +34,6 @@ class ApiManagementServiceResource < ApiManagementServiceBaseParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceResource', type: { @@ -42,13 +41,11 @@ def self.mapper() class_name: 'ApiManagementServiceResource', model_properties: { tags: { - client_side_validation: true, required: false, serialized_name: 'tags', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -58,7 +55,6 @@ def self.mapper() } }, publisher_email: { - client_side_validation: true, required: true, serialized_name: 'properties.publisherEmail', constraints: { @@ -69,7 +65,6 @@ def self.mapper() } }, publisher_name: { - client_side_validation: true, required: true, serialized_name: 'properties.publisherName', type: { @@ -77,7 +72,6 @@ def self.mapper() } }, provisioning_state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.provisioningState', @@ -86,7 +80,6 @@ def self.mapper() } }, target_provisioning_state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.targetProvisioningState', @@ -95,7 +88,6 @@ def self.mapper() } }, created_at_utc: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.createdAtUtc', @@ -104,7 +96,6 @@ def self.mapper() } }, runtime_url: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.runtimeUrl', @@ -113,7 +104,6 @@ def self.mapper() } }, portal_url: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.portalUrl', @@ -122,7 +112,6 @@ def self.mapper() } }, management_api_url: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.managementApiUrl', @@ -131,7 +120,6 @@ def self.mapper() } }, scm_url: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.scmUrl', @@ -140,7 +128,6 @@ def self.mapper() } }, addresser_email: { - client_side_validation: true, required: false, serialized_name: 'properties.addresserEmail', type: { @@ -148,13 +135,11 @@ def self.mapper() } }, hostname_configurations: { - client_side_validation: true, required: false, serialized_name: 'properties.hostnameConfigurations', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'HostnameConfigurationElementType', type: { @@ -165,14 +150,12 @@ def self.mapper() } }, static_ips: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.staticIPs', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -182,7 +165,6 @@ def self.mapper() } }, vpnconfiguration: { - client_side_validation: true, required: false, serialized_name: 'properties.vpnconfiguration', type: { @@ -191,13 +173,11 @@ def self.mapper() } }, additional_locations: { - client_side_validation: true, required: false, serialized_name: 'properties.additionalLocations', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'AdditionalRegionElementType', type: { @@ -208,13 +188,11 @@ def self.mapper() } }, custom_properties: { - client_side_validation: true, required: false, serialized_name: 'properties.customProperties', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -224,7 +202,6 @@ def self.mapper() } }, vpn_type: { - client_side_validation: true, required: false, serialized_name: 'properties.vpnType', default_value: 'None', @@ -234,7 +211,6 @@ def self.mapper() } }, sku: { - client_side_validation: true, required: false, serialized_name: 'sku', type: { @@ -243,7 +219,6 @@ def self.mapper() } }, id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -252,7 +227,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: true, serialized_name: 'location', type: { @@ -260,7 +234,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -269,7 +242,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -278,7 +250,6 @@ def self.mapper() } }, etag: { - client_side_validation: true, required: false, serialized_name: 'etag', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_sku_properties.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_sku_properties.rb index 77efc5e217..ba870c8217 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_sku_properties.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_sku_properties.rb @@ -27,7 +27,6 @@ class ApiManagementServiceSkuProperties # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceSkuProperties', type: { @@ -35,7 +34,6 @@ def self.mapper() class_name: 'ApiManagementServiceSkuProperties', model_properties: { name: { - client_side_validation: true, required: true, serialized_name: 'name', type: { @@ -44,7 +42,6 @@ def self.mapper() } }, capacity: { - client_side_validation: true, required: false, serialized_name: 'capacity', default_value: 1, diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_update_hostname_parameters.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_update_hostname_parameters.rb index d03e318cf0..b26db3eb03 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_update_hostname_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_update_hostname_parameters.rb @@ -26,7 +26,6 @@ class ApiManagementServiceUpdateHostnameParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceUpdateHostnameParameters', type: { @@ -34,13 +33,11 @@ def self.mapper() class_name: 'ApiManagementServiceUpdateHostnameParameters', model_properties: { update: { - client_side_validation: true, required: false, serialized_name: 'update', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'HostnameConfigurationElementType', type: { @@ -51,13 +48,11 @@ def self.mapper() } }, delete: { - client_side_validation: true, required: false, serialized_name: 'delete', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'HostnameTypeElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_upload_certificate_parameters.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_upload_certificate_parameters.rb index 9f7e8a9849..1d8ea3c3fa 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_upload_certificate_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_upload_certificate_parameters.rb @@ -31,7 +31,6 @@ class ApiManagementServiceUploadCertificateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceUploadCertificateParameters', type: { @@ -39,7 +38,6 @@ def self.mapper() class_name: 'ApiManagementServiceUploadCertificateParameters', model_properties: { type: { - client_side_validation: true, required: true, serialized_name: 'type', type: { @@ -48,7 +46,6 @@ def self.mapper() } }, certificate: { - client_side_validation: true, required: true, serialized_name: 'certificate', type: { @@ -56,7 +53,6 @@ def self.mapper() } }, certificate_password: { - client_side_validation: true, required: true, serialized_name: 'certificate_password', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/authentication_settings_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/authentication_settings_contract.rb index e335a87b96..1a90476b23 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/authentication_settings_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/authentication_settings_contract.rb @@ -22,7 +22,6 @@ class AuthenticationSettingsContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'AuthenticationSettingsContract', type: { @@ -30,7 +29,6 @@ def self.mapper() class_name: 'AuthenticationSettingsContract', model_properties: { o_auth2: { - client_side_validation: true, required: false, serialized_name: 'oAuth2', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/authorization_server_collection.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/authorization_server_collection.rb index 44c73fbe33..26aebea8f8 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/authorization_server_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/authorization_server_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'AuthorizationServerCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'AuthorizationServerCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'OAuth2AuthorizationServerContractElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/backend_collection.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/backend_collection.rb index 8232573967..f8f24ae913 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/backend_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/backend_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'BackendCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'BackendCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'BackendResponseElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/backend_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/backend_contract.rb index 230710460d..8648e448bb 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/backend_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/backend_contract.rb @@ -29,7 +29,6 @@ class BackendContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'BackendContract', type: { @@ -37,7 +36,6 @@ def self.mapper() class_name: 'BackendContract', model_properties: { host: { - client_side_validation: true, required: true, serialized_name: 'host', constraints: { @@ -49,7 +47,6 @@ def self.mapper() } }, skip_certificate_chain_validation: { - client_side_validation: true, required: false, serialized_name: 'skipCertificateChainValidation', default_value: false, diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/backend_response.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/backend_response.rb index 781d8f321e..864d43b9a3 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/backend_response.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/backend_response.rb @@ -27,7 +27,6 @@ class BackendResponse < BackendContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'BackendResponse', type: { @@ -35,7 +34,6 @@ def self.mapper() class_name: 'BackendResponse', model_properties: { host: { - client_side_validation: true, required: true, serialized_name: 'host', constraints: { @@ -47,7 +45,6 @@ def self.mapper() } }, skip_certificate_chain_validation: { - client_side_validation: true, required: false, serialized_name: 'skipCertificateChainValidation', default_value: false, @@ -56,7 +53,6 @@ def self.mapper() } }, id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/backend_update_parameters.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/backend_update_parameters.rb index 474f6a1d83..6452fb4684 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/backend_update_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/backend_update_parameters.rb @@ -29,7 +29,6 @@ class BackendUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'BackendUpdateParameters', type: { @@ -37,7 +36,6 @@ def self.mapper() class_name: 'BackendUpdateParameters', model_properties: { host: { - client_side_validation: true, required: false, serialized_name: 'host', constraints: { @@ -49,7 +47,6 @@ def self.mapper() } }, skip_certificate_chain_validation: { - client_side_validation: true, required: false, serialized_name: 'skipCertificateChainValidation', default_value: false, diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/certificate_collection.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/certificate_collection.rb index 925387aacb..48914d911e 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/certificate_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/certificate_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'CertificateCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'CertificateCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'CertificateContractElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/certificate_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/certificate_contract.rb index 83b25bfb4e..06d269c46d 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/certificate_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/certificate_contract.rb @@ -35,7 +35,6 @@ class CertificateContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'CertificateContract', type: { @@ -43,7 +42,6 @@ def self.mapper() class_name: 'CertificateContract', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -52,7 +50,6 @@ def self.mapper() } }, subject: { - client_side_validation: true, required: true, serialized_name: 'subject', type: { @@ -60,7 +57,6 @@ def self.mapper() } }, thumbprint: { - client_side_validation: true, required: true, serialized_name: 'thumbprint', type: { @@ -68,7 +64,6 @@ def self.mapper() } }, expiration_date: { - client_side_validation: true, required: true, serialized_name: 'expirationDate', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/certificate_create_or_update_parameters.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/certificate_create_or_update_parameters.rb index 79884e476b..1e6a8333aa 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/certificate_create_or_update_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/certificate_create_or_update_parameters.rb @@ -26,7 +26,6 @@ class CertificateCreateOrUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'CertificateCreateOrUpdateParameters', type: { @@ -34,7 +33,6 @@ def self.mapper() class_name: 'CertificateCreateOrUpdateParameters', model_properties: { data: { - client_side_validation: true, required: true, serialized_name: 'data', type: { @@ -42,7 +40,6 @@ def self.mapper() } }, password: { - client_side_validation: true, required: true, serialized_name: 'password', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/certificate_information.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/certificate_information.rb index 21b3b23616..0505df8ffc 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/certificate_information.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/certificate_information.rb @@ -30,7 +30,6 @@ class CertificateInformation # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'CertificateInformation', type: { @@ -38,7 +37,6 @@ def self.mapper() class_name: 'CertificateInformation', model_properties: { expiry: { - client_side_validation: true, required: true, serialized_name: 'expiry', type: { @@ -46,7 +44,6 @@ def self.mapper() } }, thumbprint: { - client_side_validation: true, required: true, serialized_name: 'thumbprint', type: { @@ -54,7 +51,6 @@ def self.mapper() } }, subject: { - client_side_validation: true, required: true, serialized_name: 'subject', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/deploy_configuration_parameters.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/deploy_configuration_parameters.rb index c37a0c737a..a796841430 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/deploy_configuration_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/deploy_configuration_parameters.rb @@ -27,7 +27,6 @@ class DeployConfigurationParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'DeployConfigurationParameters', type: { @@ -35,7 +34,6 @@ def self.mapper() class_name: 'DeployConfigurationParameters', model_properties: { branch: { - client_side_validation: true, required: true, serialized_name: 'branch', type: { @@ -43,7 +41,6 @@ def self.mapper() } }, force: { - client_side_validation: true, required: false, serialized_name: 'force', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/error_body_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/error_body_contract.rb index eb03f336e1..cf18dc05b3 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/error_body_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/error_body_contract.rb @@ -30,7 +30,6 @@ class ErrorBodyContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ErrorBodyContract', type: { @@ -38,7 +37,6 @@ def self.mapper() class_name: 'ErrorBodyContract', model_properties: { code: { - client_side_validation: true, required: false, serialized_name: 'code', type: { @@ -46,7 +44,6 @@ def self.mapper() } }, message: { - client_side_validation: true, required: false, serialized_name: 'message', type: { @@ -54,13 +51,11 @@ def self.mapper() } }, details: { - client_side_validation: true, required: false, serialized_name: 'details', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ErrorFieldContractElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/error_field_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/error_field_contract.rb index 017e901eee..8ab1d4bd35 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/error_field_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/error_field_contract.rb @@ -28,7 +28,6 @@ class ErrorFieldContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ErrorFieldContract', type: { @@ -36,7 +35,6 @@ def self.mapper() class_name: 'ErrorFieldContract', model_properties: { code: { - client_side_validation: true, required: false, serialized_name: 'code', type: { @@ -44,7 +42,6 @@ def self.mapper() } }, message: { - client_side_validation: true, required: false, serialized_name: 'message', type: { @@ -52,7 +49,6 @@ def self.mapper() } }, target: { - client_side_validation: true, required: false, serialized_name: 'target', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/error_response.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/error_response.rb index 77fc8dcf4f..ce1d4b4128 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/error_response.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/error_response.rb @@ -25,7 +25,6 @@ class ErrorResponse # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ErrorResponse', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'ErrorResponse', model_properties: { code: { - client_side_validation: true, required: false, serialized_name: 'code', type: { @@ -41,7 +39,6 @@ def self.mapper() } }, message: { - client_side_validation: true, required: false, serialized_name: 'message', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/generate_sso_url_result.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/generate_sso_url_result.rb index c53fab093e..aaaacdfb27 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/generate_sso_url_result.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/generate_sso_url_result.rb @@ -22,7 +22,6 @@ class GenerateSsoUrlResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'GenerateSsoUrlResult', type: { @@ -30,7 +29,6 @@ def self.mapper() class_name: 'GenerateSsoUrlResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/group_collection.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/group_collection.rb index 36ba787671..6cbe3dae13 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/group_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/group_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'GroupCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'GroupCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'GroupContractElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/group_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/group_contract.rb index b5b451db97..d710ce72f8 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/group_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/group_contract.rb @@ -43,7 +43,6 @@ class GroupContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'GroupContract', type: { @@ -51,7 +50,6 @@ def self.mapper() class_name: 'GroupContract', 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: true, serialized_name: 'name', constraints: { @@ -72,7 +69,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', constraints: { @@ -83,7 +79,6 @@ def self.mapper() } }, built_in: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'builtIn', @@ -92,7 +87,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -102,7 +96,6 @@ def self.mapper() } }, external_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'externalId', diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/group_create_parameters.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/group_create_parameters.rb index a0cbbfbefa..2ae8ea97bd 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/group_create_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/group_create_parameters.rb @@ -32,7 +32,6 @@ class GroupCreateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'GroupCreateParameters', type: { @@ -40,7 +39,6 @@ def self.mapper() class_name: 'GroupCreateParameters', model_properties: { name: { - client_side_validation: true, required: true, serialized_name: 'name', constraints: { @@ -52,7 +50,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -60,7 +57,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, serialized_name: 'type', type: { @@ -69,7 +65,6 @@ def self.mapper() } }, external_id: { - client_side_validation: true, required: false, serialized_name: 'externalId', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/group_update_parameters.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/group_update_parameters.rb index 94152c5565..4847958256 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/group_update_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/group_update_parameters.rb @@ -32,7 +32,6 @@ class GroupUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'GroupUpdateParameters', type: { @@ -40,7 +39,6 @@ def self.mapper() class_name: 'GroupUpdateParameters', model_properties: { name: { - client_side_validation: true, required: false, serialized_name: 'name', constraints: { @@ -52,7 +50,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -60,7 +57,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, serialized_name: 'type', type: { @@ -69,7 +65,6 @@ def self.mapper() } }, external_id: { - client_side_validation: true, required: false, serialized_name: 'externalId', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/hostname_configuration.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/hostname_configuration.rb index 371bee480a..ab90521e62 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/hostname_configuration.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/hostname_configuration.rb @@ -29,7 +29,6 @@ class HostnameConfiguration # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'HostnameConfiguration', type: { @@ -37,7 +36,6 @@ def self.mapper() class_name: 'HostnameConfiguration', model_properties: { type: { - client_side_validation: true, required: true, serialized_name: 'type', type: { @@ -46,7 +44,6 @@ def self.mapper() } }, hostname: { - client_side_validation: true, required: true, serialized_name: 'hostname', type: { @@ -54,7 +51,6 @@ def self.mapper() } }, certificate: { - client_side_validation: true, required: true, serialized_name: 'certificate', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/identity_provider_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/identity_provider_contract.rb index 269574ba37..e1678e2d4e 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/identity_provider_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/identity_provider_contract.rb @@ -41,7 +41,6 @@ class IdentityProviderContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'IdentityProviderContract', type: { @@ -49,7 +48,6 @@ def self.mapper() class_name: 'IdentityProviderContract', model_properties: { client_id: { - client_side_validation: true, required: true, serialized_name: 'clientId', constraints: { @@ -60,7 +58,6 @@ def self.mapper() } }, client_secret: { - client_side_validation: true, required: true, serialized_name: 'clientSecret', constraints: { @@ -71,7 +68,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, serialized_name: 'type', type: { @@ -79,7 +75,6 @@ def self.mapper() } }, allowed_tenants: { - client_side_validation: true, required: false, serialized_name: 'allowedTenants', constraints: { @@ -88,7 +83,6 @@ def self.mapper() type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/identity_provider_list.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/identity_provider_list.rb index 01dc3b28cb..e7c876e148 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/identity_provider_list.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/identity_provider_list.rb @@ -23,7 +23,6 @@ class IdentityProviderList # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'IdentityProviderList', type: { @@ -31,13 +30,11 @@ def self.mapper() class_name: 'IdentityProviderList', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'IdentityProviderContractElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/identity_provider_update_parameters.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/identity_provider_update_parameters.rb index 5d9bff0d63..27cf77db6c 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/identity_provider_update_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/identity_provider_update_parameters.rb @@ -34,7 +34,6 @@ class IdentityProviderUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'IdentityProviderUpdateParameters', type: { @@ -42,7 +41,6 @@ def self.mapper() class_name: 'IdentityProviderUpdateParameters', model_properties: { client_id: { - client_side_validation: true, required: false, serialized_name: 'clientId', constraints: { @@ -53,7 +51,6 @@ def self.mapper() } }, client_secret: { - client_side_validation: true, required: false, serialized_name: 'clientSecret', constraints: { @@ -64,7 +61,6 @@ def self.mapper() } }, allowed_tenants: { - client_side_validation: true, required: false, serialized_name: 'allowedTenants', constraints: { @@ -73,7 +69,6 @@ def self.mapper() type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/logger_collection.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/logger_collection.rb index f1152b94a7..264a830fad 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/logger_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/logger_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'LoggerCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'LoggerCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'LoggerResponseElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/logger_create_parameters.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/logger_create_parameters.rb index 217692c102..4100de518f 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/logger_create_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/logger_create_parameters.rb @@ -33,7 +33,6 @@ class LoggerCreateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'LoggerCreateParameters', type: { @@ -41,7 +40,6 @@ def self.mapper() class_name: 'LoggerCreateParameters', model_properties: { type: { - client_side_validation: true, required: true, is_constant: true, serialized_name: 'type', @@ -51,7 +49,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -59,13 +56,11 @@ def self.mapper() } }, credentials: { - client_side_validation: true, required: true, serialized_name: 'credentials', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -75,7 +70,6 @@ def self.mapper() } }, is_buffered: { - client_side_validation: true, required: false, serialized_name: 'isBuffered', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/logger_response.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/logger_response.rb index cbb0b0376b..555d2899ec 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/logger_response.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/logger_response.rb @@ -40,7 +40,6 @@ class LoggerResponse # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'LoggerResponse', type: { @@ -48,7 +47,6 @@ def self.mapper() class_name: 'LoggerResponse', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -57,7 +55,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: true, is_constant: true, serialized_name: 'type', @@ -67,7 +64,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', constraints: { @@ -78,13 +74,11 @@ def self.mapper() } }, credentials: { - client_side_validation: true, required: true, serialized_name: 'credentials', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -94,7 +88,6 @@ def self.mapper() } }, is_buffered: { - client_side_validation: true, required: false, serialized_name: 'isBuffered', default_value: true, diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/logger_update_parameters.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/logger_update_parameters.rb index 20947126fc..b007035260 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/logger_update_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/logger_update_parameters.rb @@ -32,7 +32,6 @@ class LoggerUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'LoggerUpdateParameters', type: { @@ -40,7 +39,6 @@ def self.mapper() class_name: 'LoggerUpdateParameters', model_properties: { type: { - client_side_validation: true, required: true, is_constant: true, serialized_name: 'type', @@ -50,7 +48,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -58,13 +55,11 @@ def self.mapper() } }, credentials: { - client_side_validation: true, required: false, serialized_name: 'credentials', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -74,7 +69,6 @@ def self.mapper() } }, is_buffered: { - client_side_validation: true, required: false, serialized_name: 'isBuffered', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/oauth2authentication_settings_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/oauth2authentication_settings_contract.rb index ad0554b5c5..8a1fedf172 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/oauth2authentication_settings_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/oauth2authentication_settings_contract.rb @@ -25,7 +25,6 @@ class OAuth2AuthenticationSettingsContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OAuth2AuthenticationSettingsContract', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'OAuth2AuthenticationSettingsContract', model_properties: { authorization_server_id: { - client_side_validation: true, required: false, serialized_name: 'authorizationServerId', type: { @@ -41,7 +39,6 @@ def self.mapper() } }, scope: { - client_side_validation: true, required: false, serialized_name: 'scope', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/oauth2authorization_server_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/oauth2authorization_server_contract.rb index a8813e076c..40e3537d36 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/oauth2authorization_server_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/oauth2authorization_server_contract.rb @@ -98,7 +98,6 @@ class OAuth2AuthorizationServerContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OAuth2AuthorizationServerContract', type: { @@ -106,7 +105,6 @@ def self.mapper() class_name: 'OAuth2AuthorizationServerContract', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -115,7 +113,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: true, serialized_name: 'name', constraints: { @@ -127,7 +124,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -135,7 +131,6 @@ def self.mapper() } }, client_registration_endpoint: { - client_side_validation: true, required: true, serialized_name: 'clientRegistrationEndpoint', type: { @@ -143,7 +138,6 @@ def self.mapper() } }, authorization_endpoint: { - client_side_validation: true, required: true, serialized_name: 'authorizationEndpoint', type: { @@ -151,13 +145,11 @@ def self.mapper() } }, authorization_methods: { - client_side_validation: true, required: false, serialized_name: 'authorizationMethods', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'MethodContractElementType', type: { @@ -168,13 +160,11 @@ def self.mapper() } }, client_authentication_method: { - client_side_validation: true, required: false, serialized_name: 'clientAuthenticationMethod', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ClientAuthenticationMethodContractElementType', type: { @@ -185,13 +175,11 @@ def self.mapper() } }, token_body_parameters: { - client_side_validation: true, required: false, serialized_name: 'tokenBodyParameters', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'TokenBodyParameterContractElementType', type: { @@ -202,7 +190,6 @@ def self.mapper() } }, token_endpoint: { - client_side_validation: true, required: false, serialized_name: 'tokenEndpoint', type: { @@ -210,7 +197,6 @@ def self.mapper() } }, support_state: { - client_side_validation: true, required: false, serialized_name: 'supportState', type: { @@ -218,7 +204,6 @@ def self.mapper() } }, default_scope: { - client_side_validation: true, required: false, serialized_name: 'defaultScope', type: { @@ -226,13 +211,11 @@ def self.mapper() } }, grant_types: { - client_side_validation: true, required: true, serialized_name: 'grantTypes', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'GrantTypesContractElementType', type: { @@ -243,13 +226,11 @@ def self.mapper() } }, bearer_token_sending_methods: { - client_side_validation: true, required: false, serialized_name: 'bearerTokenSendingMethods', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'BearerTokenSendingMethodsContractElementType', type: { @@ -260,7 +241,6 @@ def self.mapper() } }, client_id: { - client_side_validation: true, required: true, serialized_name: 'clientId', type: { @@ -268,7 +248,6 @@ def self.mapper() } }, client_secret: { - client_side_validation: true, required: false, serialized_name: 'clientSecret', type: { @@ -276,7 +255,6 @@ def self.mapper() } }, resource_owner_username: { - client_side_validation: true, required: false, serialized_name: 'resourceOwnerUsername', type: { @@ -284,7 +262,6 @@ def self.mapper() } }, resource_owner_password: { - client_side_validation: true, required: false, serialized_name: 'resourceOwnerPassword', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/oauth2authorization_server_update_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/oauth2authorization_server_update_contract.rb index 58a60efc05..896085f1bd 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/oauth2authorization_server_update_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/oauth2authorization_server_update_contract.rb @@ -92,7 +92,6 @@ class OAuth2AuthorizationServerUpdateContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OAuth2AuthorizationServerUpdateContract', type: { @@ -100,7 +99,6 @@ def self.mapper() class_name: 'OAuth2AuthorizationServerUpdateContract', model_properties: { name: { - client_side_validation: true, required: false, serialized_name: 'name', constraints: { @@ -112,7 +110,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -120,7 +117,6 @@ def self.mapper() } }, client_registration_endpoint: { - client_side_validation: true, required: false, serialized_name: 'clientRegistrationEndpoint', type: { @@ -128,7 +124,6 @@ def self.mapper() } }, authorization_endpoint: { - client_side_validation: true, required: false, serialized_name: 'authorizationEndpoint', type: { @@ -136,13 +131,11 @@ def self.mapper() } }, authorization_methods: { - client_side_validation: true, required: false, serialized_name: 'authorizationMethods', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'MethodContractElementType', type: { @@ -153,13 +146,11 @@ def self.mapper() } }, client_authentication_method: { - client_side_validation: true, required: false, serialized_name: 'clientAuthenticationMethod', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ClientAuthenticationMethodContractElementType', type: { @@ -170,13 +161,11 @@ def self.mapper() } }, token_body_parameters: { - client_side_validation: true, required: false, serialized_name: 'tokenBodyParameters', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'TokenBodyParameterContractElementType', type: { @@ -187,7 +176,6 @@ def self.mapper() } }, token_endpoint: { - client_side_validation: true, required: false, serialized_name: 'tokenEndpoint', type: { @@ -195,7 +183,6 @@ def self.mapper() } }, support_state: { - client_side_validation: true, required: false, serialized_name: 'supportState', type: { @@ -203,7 +190,6 @@ def self.mapper() } }, default_scope: { - client_side_validation: true, required: false, serialized_name: 'defaultScope', type: { @@ -211,13 +197,11 @@ def self.mapper() } }, grant_types: { - client_side_validation: true, required: false, serialized_name: 'grantTypes', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'GrantTypesContractElementType', type: { @@ -228,13 +212,11 @@ def self.mapper() } }, bearer_token_sending_methods: { - client_side_validation: true, required: false, serialized_name: 'bearerTokenSendingMethods', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'BearerTokenSendingMethodsContractElementType', type: { @@ -245,7 +227,6 @@ def self.mapper() } }, client_id: { - client_side_validation: true, required: false, serialized_name: 'clientId', type: { @@ -253,7 +234,6 @@ def self.mapper() } }, client_secret: { - client_side_validation: true, required: false, serialized_name: 'clientSecret', type: { @@ -261,7 +241,6 @@ def self.mapper() } }, resource_owner_username: { - client_side_validation: true, required: false, serialized_name: 'resourceOwnerUsername', type: { @@ -269,7 +248,6 @@ def self.mapper() } }, resource_owner_password: { - client_side_validation: true, required: false, serialized_name: 'resourceOwnerPassword', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/open_id_connect_provider_collection.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/open_id_connect_provider_collection.rb index 952a85bcfb..da359dbcef 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/open_id_connect_provider_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/open_id_connect_provider_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OpenIdConnectProviderCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'OpenIdConnectProviderCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'OpenidConnectProviderContractElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/openid_connect_provider_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/openid_connect_provider_contract.rb index 99d6ed1e84..4972b2c3b5 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/openid_connect_provider_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/openid_connect_provider_contract.rb @@ -39,7 +39,6 @@ class OpenidConnectProviderContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OpenidConnectProviderContract', type: { @@ -47,7 +46,6 @@ def self.mapper() class_name: 'OpenidConnectProviderContract', model_properties: { id: { - client_side_validation: true, required: false, serialized_name: 'id', type: { @@ -55,7 +53,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: true, serialized_name: 'name', constraints: { @@ -66,7 +63,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -74,7 +70,6 @@ def self.mapper() } }, metadata_endpoint: { - client_side_validation: true, required: true, serialized_name: 'metadataEndpoint', type: { @@ -82,7 +77,6 @@ def self.mapper() } }, client_id: { - client_side_validation: true, required: true, serialized_name: 'clientId', type: { @@ -90,7 +84,6 @@ def self.mapper() } }, client_secret: { - client_side_validation: true, required: false, serialized_name: 'clientSecret', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/openid_connect_provider_create_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/openid_connect_provider_create_contract.rb index a4720e6bc7..071eaf1c8a 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/openid_connect_provider_create_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/openid_connect_provider_create_contract.rb @@ -36,7 +36,6 @@ class OpenidConnectProviderCreateContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OpenidConnectProviderCreateContract', type: { @@ -44,7 +43,6 @@ def self.mapper() class_name: 'OpenidConnectProviderCreateContract', model_properties: { name: { - client_side_validation: true, required: true, serialized_name: 'name', constraints: { @@ -55,7 +53,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -63,7 +60,6 @@ def self.mapper() } }, metadata_endpoint: { - client_side_validation: true, required: true, serialized_name: 'metadataEndpoint', type: { @@ -71,7 +67,6 @@ def self.mapper() } }, client_id: { - client_side_validation: true, required: true, serialized_name: 'clientId', type: { @@ -79,7 +74,6 @@ def self.mapper() } }, client_secret: { - client_side_validation: true, required: false, serialized_name: 'clientSecret', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/openid_connect_provider_update_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/openid_connect_provider_update_contract.rb index ce8b558e60..9ae819d13b 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/openid_connect_provider_update_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/openid_connect_provider_update_contract.rb @@ -36,7 +36,6 @@ class OpenidConnectProviderUpdateContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OpenidConnectProviderUpdateContract', type: { @@ -44,7 +43,6 @@ def self.mapper() class_name: 'OpenidConnectProviderUpdateContract', model_properties: { name: { - client_side_validation: true, required: false, serialized_name: 'name', constraints: { @@ -55,7 +53,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -63,7 +60,6 @@ def self.mapper() } }, metadata_endpoint: { - client_side_validation: true, required: false, serialized_name: 'metadataEndpoint', type: { @@ -71,7 +67,6 @@ def self.mapper() } }, client_id: { - client_side_validation: true, required: false, serialized_name: 'clientId', type: { @@ -79,7 +74,6 @@ def self.mapper() } }, client_secret: { - client_side_validation: true, required: false, serialized_name: 'clientSecret', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/operation_collection.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/operation_collection.rb index 6e32284373..1c6275dbcf 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/operation_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/operation_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OperationCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'OperationCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'OperationContractElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/operation_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/operation_contract.rb index 875284c6fb..6e366f0a7b 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/operation_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/operation_contract.rb @@ -51,7 +51,6 @@ class OperationContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OperationContract', type: { @@ -59,7 +58,6 @@ def self.mapper() class_name: 'OperationContract', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -68,7 +66,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: true, serialized_name: 'name', constraints: { @@ -80,7 +77,6 @@ def self.mapper() } }, method: { - client_side_validation: true, required: true, serialized_name: 'method', type: { @@ -88,7 +84,6 @@ def self.mapper() } }, url_template: { - client_side_validation: true, required: true, serialized_name: 'urlTemplate', constraints: { @@ -100,13 +95,11 @@ def self.mapper() } }, template_parameters: { - client_side_validation: true, required: false, serialized_name: 'templateParameters', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ParameterContractElementType', type: { @@ -117,7 +110,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', constraints: { @@ -128,7 +120,6 @@ def self.mapper() } }, request: { - client_side_validation: true, required: false, serialized_name: 'request', type: { @@ -137,13 +128,11 @@ def self.mapper() } }, responses: { - client_side_validation: true, required: false, serialized_name: 'responses', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ResultContractElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/operation_result_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/operation_result_contract.rb index 548f581fdf..651fe4696a 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/operation_result_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/operation_result_contract.rb @@ -44,7 +44,6 @@ class OperationResultContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OperationResultContract', type: { @@ -52,7 +51,6 @@ def self.mapper() class_name: 'OperationResultContract', model_properties: { id: { - client_side_validation: true, required: false, serialized_name: 'id', type: { @@ -60,7 +58,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, serialized_name: 'status', type: { @@ -69,7 +66,6 @@ def self.mapper() } }, started: { - client_side_validation: true, required: false, serialized_name: 'started', type: { @@ -77,7 +73,6 @@ def self.mapper() } }, updated: { - client_side_validation: true, required: false, serialized_name: 'updated', type: { @@ -85,7 +80,6 @@ def self.mapper() } }, result_info: { - client_side_validation: true, required: false, serialized_name: 'resultInfo', type: { @@ -93,7 +87,6 @@ def self.mapper() } }, error: { - client_side_validation: true, required: false, serialized_name: 'error', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/parameter_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/parameter_contract.rb index c65b1b70bf..1338284b89 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/parameter_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/parameter_contract.rb @@ -37,7 +37,6 @@ class ParameterContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ParameterContract', type: { @@ -45,7 +44,6 @@ def self.mapper() class_name: 'ParameterContract', model_properties: { name: { - client_side_validation: true, required: true, serialized_name: 'name', type: { @@ -53,7 +51,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -61,7 +58,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: true, serialized_name: 'type', type: { @@ -69,7 +65,6 @@ def self.mapper() } }, default_value: { - client_side_validation: true, required: false, serialized_name: 'defaultValue', type: { @@ -77,7 +72,6 @@ def self.mapper() } }, required: { - client_side_validation: true, required: false, serialized_name: 'required', type: { @@ -85,13 +79,11 @@ def self.mapper() } }, values: { - client_side_validation: true, required: false, serialized_name: 'values', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/patch_parameters.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/patch_parameters.rb index 6634f91a47..7e93976ca8 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/patch_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/patch_parameters.rb @@ -22,7 +22,6 @@ class PatchParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'PatchParameters', type: { @@ -30,7 +29,6 @@ def self.mapper() class_name: 'PatchParameters', model_properties: { raw_json: { - client_side_validation: true, required: true, serialized_name: 'RawJson', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/policy_snippet_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/policy_snippet_contract.rb index eb701f70d4..8e627b4ccf 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/policy_snippet_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/policy_snippet_contract.rb @@ -32,7 +32,6 @@ class PolicySnippetContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'PolicySnippetContract', type: { @@ -40,7 +39,6 @@ def self.mapper() class_name: 'PolicySnippetContract', model_properties: { name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -49,7 +47,6 @@ def self.mapper() } }, content: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'content', @@ -58,7 +55,6 @@ def self.mapper() } }, tool_tip: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'toolTip', @@ -67,7 +63,6 @@ def self.mapper() } }, scope: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'scope', diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/product_collection.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/product_collection.rb index 4bc6f3aea8..dacb2d6868 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/product_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/product_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ProductCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'ProductCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ProductContractElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/product_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/product_contract.rb index 835d42958a..531d54cb4c 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/product_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/product_contract.rb @@ -67,7 +67,6 @@ class ProductContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ProductContract', type: { @@ -75,7 +74,6 @@ def self.mapper() class_name: 'ProductContract', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -84,7 +82,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: true, serialized_name: 'name', constraints: { @@ -96,7 +93,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', constraints: { @@ -108,7 +104,6 @@ def self.mapper() } }, terms: { - client_side_validation: true, required: false, serialized_name: 'terms', type: { @@ -116,7 +111,6 @@ def self.mapper() } }, subscription_required: { - client_side_validation: true, required: false, serialized_name: 'subscriptionRequired', default_value: true, @@ -125,7 +119,6 @@ def self.mapper() } }, approval_required: { - client_side_validation: true, required: false, serialized_name: 'approvalRequired', type: { @@ -133,7 +126,6 @@ def self.mapper() } }, subscriptions_limit: { - client_side_validation: true, required: false, serialized_name: 'subscriptionsLimit', type: { @@ -141,7 +133,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, serialized_name: 'state', default_value: 'NotPublished', diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/product_update_parameters.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/product_update_parameters.rb index 90114198d1..3193cbe9d1 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/product_update_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/product_update_parameters.rb @@ -58,7 +58,6 @@ class ProductUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ProductUpdateParameters', type: { @@ -66,7 +65,6 @@ def self.mapper() class_name: 'ProductUpdateParameters', model_properties: { name: { - client_side_validation: true, required: false, serialized_name: 'name', constraints: { @@ -78,7 +76,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', constraints: { @@ -90,7 +87,6 @@ def self.mapper() } }, terms: { - client_side_validation: true, required: false, serialized_name: 'terms', type: { @@ -98,7 +94,6 @@ def self.mapper() } }, subscription_required: { - client_side_validation: true, required: false, serialized_name: 'subscriptionRequired', type: { @@ -106,7 +101,6 @@ def self.mapper() } }, approval_required: { - client_side_validation: true, required: false, serialized_name: 'approvalRequired', type: { @@ -114,7 +108,6 @@ def self.mapper() } }, subscriptions_limit: { - client_side_validation: true, required: false, serialized_name: 'subscriptionsLimit', type: { @@ -122,7 +115,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, serialized_name: 'state', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/property_collection.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/property_collection.rb index d9a556284a..af3c804861 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/property_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/property_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'PropertyCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'PropertyCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'PropertyContractElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/property_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/property_contract.rb index 6b60872a42..9aee01f1d9 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/property_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/property_contract.rb @@ -41,7 +41,6 @@ class PropertyContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'PropertyContract', type: { @@ -49,7 +48,6 @@ def self.mapper() class_name: 'PropertyContract', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -58,7 +56,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: true, serialized_name: 'name', constraints: { @@ -71,7 +68,6 @@ def self.mapper() } }, value: { - client_side_validation: true, required: true, serialized_name: 'value', constraints: { @@ -83,7 +79,6 @@ def self.mapper() } }, tags: { - client_side_validation: true, required: false, serialized_name: 'tags', constraints: { @@ -92,7 +87,6 @@ def self.mapper() type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -102,7 +96,6 @@ def self.mapper() } }, secret: { - client_side_validation: true, required: false, serialized_name: 'secret', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/property_create_parameters.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/property_create_parameters.rb index 1cda63e50d..11ed1bf554 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/property_create_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/property_create_parameters.rb @@ -35,7 +35,6 @@ class PropertyCreateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'PropertyCreateParameters', type: { @@ -43,7 +42,6 @@ def self.mapper() class_name: 'PropertyCreateParameters', model_properties: { name: { - client_side_validation: true, required: true, serialized_name: 'name', constraints: { @@ -56,7 +54,6 @@ def self.mapper() } }, value: { - client_side_validation: true, required: true, serialized_name: 'value', constraints: { @@ -68,7 +65,6 @@ def self.mapper() } }, tags: { - client_side_validation: true, required: false, serialized_name: 'tags', constraints: { @@ -77,7 +73,6 @@ def self.mapper() type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -87,7 +82,6 @@ def self.mapper() } }, secret: { - client_side_validation: true, required: false, serialized_name: 'secret', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/property_update_parameters.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/property_update_parameters.rb index f611535499..c27fd75794 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/property_update_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/property_update_parameters.rb @@ -35,7 +35,6 @@ class PropertyUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'PropertyUpdateParameters', type: { @@ -43,7 +42,6 @@ def self.mapper() class_name: 'PropertyUpdateParameters', model_properties: { name: { - client_side_validation: true, required: false, serialized_name: 'name', constraints: { @@ -56,7 +54,6 @@ def self.mapper() } }, value: { - client_side_validation: true, required: false, serialized_name: 'value', constraints: { @@ -68,7 +65,6 @@ def self.mapper() } }, tags: { - client_side_validation: true, required: false, serialized_name: 'tags', constraints: { @@ -77,7 +73,6 @@ def self.mapper() type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -87,7 +82,6 @@ def self.mapper() } }, secret: { - client_side_validation: true, required: false, serialized_name: 'secret', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/quota_counter_collection.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/quota_counter_collection.rb index 7921b02294..00d9d51ae4 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/quota_counter_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/quota_counter_collection.rb @@ -28,7 +28,6 @@ class QuotaCounterCollection # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'QuotaCounterCollection', type: { @@ -36,13 +35,11 @@ def self.mapper() class_name: 'QuotaCounterCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'QuotaCounterContractElementType', type: { @@ -53,7 +50,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -61,7 +57,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/quota_counter_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/quota_counter_contract.rb index f59367c95c..e34c152ddd 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/quota_counter_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/quota_counter_contract.rb @@ -38,7 +38,6 @@ class QuotaCounterContract < QuotaCounterValueContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'QuotaCounterContract', type: { @@ -46,7 +45,6 @@ def self.mapper() class_name: 'QuotaCounterContract', model_properties: { calls_count: { - client_side_validation: true, required: false, serialized_name: 'callsCount', type: { @@ -54,7 +52,6 @@ def self.mapper() } }, kb_transferred: { - client_side_validation: true, required: false, serialized_name: 'kbTransferred', type: { @@ -62,7 +59,6 @@ def self.mapper() } }, counter_key: { - client_side_validation: true, required: true, serialized_name: 'counterKey', constraints: { @@ -73,7 +69,6 @@ def self.mapper() } }, period_key: { - client_side_validation: true, required: true, serialized_name: 'periodKey', constraints: { @@ -84,7 +79,6 @@ def self.mapper() } }, period_start_time: { - client_side_validation: true, required: true, serialized_name: 'periodStartTime', type: { @@ -92,7 +86,6 @@ def self.mapper() } }, period_end_time: { - client_side_validation: true, required: true, serialized_name: 'periodEndTime', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/quota_counter_value_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/quota_counter_value_contract.rb index 2cd84ca5f6..816d30e0a4 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/quota_counter_value_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/quota_counter_value_contract.rb @@ -25,7 +25,6 @@ class QuotaCounterValueContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'QuotaCounterValueContract', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'QuotaCounterValueContract', model_properties: { calls_count: { - client_side_validation: true, required: false, serialized_name: 'callsCount', type: { @@ -41,7 +39,6 @@ def self.mapper() } }, kb_transferred: { - client_side_validation: true, required: false, serialized_name: 'kbTransferred', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/region_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/region_contract.rb index 7ca7ff8f21..81e1d79956 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/region_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/region_contract.rb @@ -25,7 +25,6 @@ class RegionContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RegionContract', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'RegionContract', model_properties: { name: { - client_side_validation: true, required: true, serialized_name: 'name', type: { @@ -41,7 +39,6 @@ def self.mapper() } }, is_master_region: { - client_side_validation: true, required: true, serialized_name: 'isMasterRegion', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/region_list_result.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/region_list_result.rb index 22c3763760..b8a9031643 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/region_list_result.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/region_list_result.rb @@ -22,7 +22,6 @@ class RegionListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RegionListResult', type: { @@ -30,13 +29,11 @@ def self.mapper() class_name: 'RegionListResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'RegionContractElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/report_collection.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/report_collection.rb index a2737cafa5..37d1f92e35 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/report_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/report_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ReportCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'ReportCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ReportRecordContractElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/report_record_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/report_record_contract.rb index a9b467eeab..8c03802925 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/report_record_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/report_record_contract.rb @@ -105,7 +105,6 @@ class ReportRecordContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ReportRecordContract', type: { @@ -113,7 +112,6 @@ def self.mapper() class_name: 'ReportRecordContract', model_properties: { name: { - client_side_validation: true, required: false, serialized_name: 'name', type: { @@ -121,7 +119,6 @@ def self.mapper() } }, timestamp: { - client_side_validation: true, required: false, serialized_name: 'timestamp', type: { @@ -129,7 +126,6 @@ def self.mapper() } }, interval: { - client_side_validation: true, required: false, serialized_name: 'interval', type: { @@ -137,7 +133,6 @@ def self.mapper() } }, country: { - client_side_validation: true, required: false, serialized_name: 'country', type: { @@ -145,7 +140,6 @@ def self.mapper() } }, region: { - client_side_validation: true, required: false, serialized_name: 'region', type: { @@ -153,7 +147,6 @@ def self.mapper() } }, zip: { - client_side_validation: true, required: false, serialized_name: 'zip', type: { @@ -161,7 +154,6 @@ def self.mapper() } }, user_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'userId', @@ -170,7 +162,6 @@ def self.mapper() } }, product_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'productId', @@ -179,7 +170,6 @@ def self.mapper() } }, api_id: { - client_side_validation: true, required: false, serialized_name: 'apiId', type: { @@ -187,7 +177,6 @@ def self.mapper() } }, operation_id: { - client_side_validation: true, required: false, serialized_name: 'operationId', type: { @@ -195,7 +184,6 @@ def self.mapper() } }, api_region: { - client_side_validation: true, required: false, serialized_name: 'apiRegion', type: { @@ -203,7 +191,6 @@ def self.mapper() } }, subscription_id: { - client_side_validation: true, required: false, serialized_name: 'subscriptionId', type: { @@ -211,7 +198,6 @@ def self.mapper() } }, call_count_success: { - client_side_validation: true, required: false, serialized_name: 'callCountSuccess', type: { @@ -219,7 +205,6 @@ def self.mapper() } }, call_count_blocked: { - client_side_validation: true, required: false, serialized_name: 'callCountBlocked', type: { @@ -227,7 +212,6 @@ def self.mapper() } }, call_count_failed: { - client_side_validation: true, required: false, serialized_name: 'callCountFailed', type: { @@ -235,7 +219,6 @@ def self.mapper() } }, call_count_other: { - client_side_validation: true, required: false, serialized_name: 'callCountOther', type: { @@ -243,7 +226,6 @@ def self.mapper() } }, call_count_total: { - client_side_validation: true, required: false, serialized_name: 'callCountTotal', type: { @@ -251,7 +233,6 @@ def self.mapper() } }, bandwidth: { - client_side_validation: true, required: false, serialized_name: 'bandwidth', type: { @@ -259,7 +240,6 @@ def self.mapper() } }, cache_hit_count: { - client_side_validation: true, required: false, serialized_name: 'cacheHitCount', type: { @@ -267,7 +247,6 @@ def self.mapper() } }, cache_miss_count: { - client_side_validation: true, required: false, serialized_name: 'cacheMissCount', type: { @@ -275,7 +254,6 @@ def self.mapper() } }, api_time_avg: { - client_side_validation: true, required: false, serialized_name: 'apiTimeAvg', type: { @@ -283,7 +261,6 @@ def self.mapper() } }, api_time_min: { - client_side_validation: true, required: false, serialized_name: 'apiTimeMin', type: { @@ -291,7 +268,6 @@ def self.mapper() } }, api_time_max: { - client_side_validation: true, required: false, serialized_name: 'apiTimeMax', type: { @@ -299,7 +275,6 @@ def self.mapper() } }, service_time_avg: { - client_side_validation: true, required: false, serialized_name: 'serviceTimeAvg', type: { @@ -307,7 +282,6 @@ def self.mapper() } }, service_time_min: { - client_side_validation: true, required: false, serialized_name: 'serviceTimeMin', type: { @@ -315,7 +289,6 @@ def self.mapper() } }, service_time_max: { - client_side_validation: true, required: false, serialized_name: 'serviceTimeMax', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/representation_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/representation_contract.rb index b5078bb7e9..cbb43a909d 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/representation_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/representation_contract.rb @@ -26,7 +26,6 @@ class RepresentationContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RepresentationContract', type: { @@ -34,7 +33,6 @@ def self.mapper() class_name: 'RepresentationContract', model_properties: { content_type: { - client_side_validation: true, required: true, serialized_name: 'contentType', type: { @@ -42,7 +40,6 @@ def self.mapper() } }, sample: { - client_side_validation: true, required: false, serialized_name: 'sample', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/request_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/request_contract.rb index f4ec72e169..ad7e2c406c 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/request_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/request_contract.rb @@ -34,7 +34,6 @@ class RequestContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RequestContract', type: { @@ -42,7 +41,6 @@ def self.mapper() class_name: 'RequestContract', model_properties: { description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -50,13 +48,11 @@ def self.mapper() } }, query_parameters: { - client_side_validation: true, required: false, serialized_name: 'queryParameters', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ParameterContractElementType', type: { @@ -67,13 +63,11 @@ def self.mapper() } }, headers: { - client_side_validation: true, required: false, serialized_name: 'headers', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ParameterContractElementType', type: { @@ -84,13 +78,11 @@ def self.mapper() } }, representations: { - client_side_validation: true, required: false, serialized_name: 'representations', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'RepresentationContractElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/result_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/result_contract.rb index 7a90170c79..3912e5a4a4 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/result_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/result_contract.rb @@ -29,7 +29,6 @@ class ResultContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ResultContract', type: { @@ -37,7 +36,6 @@ def self.mapper() class_name: 'ResultContract', model_properties: { status_code: { - client_side_validation: true, required: true, serialized_name: 'statusCode', constraints: { @@ -49,7 +47,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -57,13 +54,11 @@ def self.mapper() } }, representations: { - client_side_validation: true, required: false, serialized_name: 'representations', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'RepresentationContractElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/save_configuration_parameter.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/save_configuration_parameter.rb index 6036d88bf7..106303f56e 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/save_configuration_parameter.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/save_configuration_parameter.rb @@ -28,7 +28,6 @@ class SaveConfigurationParameter # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SaveConfigurationParameter', type: { @@ -36,7 +35,6 @@ def self.mapper() class_name: 'SaveConfigurationParameter', model_properties: { branch: { - client_side_validation: true, required: true, serialized_name: 'branch', type: { @@ -44,7 +42,6 @@ def self.mapper() } }, force: { - client_side_validation: true, required: false, serialized_name: 'force', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_collection.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_collection.rb index 81426c10e3..5dcf209acb 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SubscriptionCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'SubscriptionCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'SubscriptionContractElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_contract.rb index 6c07b917db..0b9388f873 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_contract.rb @@ -91,7 +91,6 @@ class SubscriptionContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SubscriptionContract', type: { @@ -99,7 +98,6 @@ def self.mapper() class_name: 'SubscriptionContract', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -108,7 +106,6 @@ def self.mapper() } }, user_id: { - client_side_validation: true, required: false, serialized_name: 'userId', type: { @@ -116,7 +113,6 @@ def self.mapper() } }, product_id: { - client_side_validation: true, required: false, serialized_name: 'productId', type: { @@ -124,7 +120,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, serialized_name: 'name', constraints: { @@ -136,7 +131,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, serialized_name: 'state', type: { @@ -145,7 +139,6 @@ def self.mapper() } }, created_date: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'createdDate', @@ -154,7 +147,6 @@ def self.mapper() } }, start_date: { - client_side_validation: true, required: false, serialized_name: 'startDate', type: { @@ -162,7 +154,6 @@ def self.mapper() } }, expiration_date: { - client_side_validation: true, required: false, serialized_name: 'expirationDate', type: { @@ -170,7 +161,6 @@ def self.mapper() } }, end_date: { - client_side_validation: true, required: false, serialized_name: 'endDate', type: { @@ -178,7 +168,6 @@ def self.mapper() } }, notification_date: { - client_side_validation: true, required: false, serialized_name: 'notificationDate', type: { @@ -186,7 +175,6 @@ def self.mapper() } }, primary_key: { - client_side_validation: true, required: false, serialized_name: 'primaryKey', constraints: { @@ -198,7 +186,6 @@ def self.mapper() } }, secondary_key: { - client_side_validation: true, required: false, serialized_name: 'secondaryKey', constraints: { @@ -210,7 +197,6 @@ def self.mapper() } }, state_comment: { - client_side_validation: true, required: false, serialized_name: 'stateComment', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb index 01ef84c685..2ae2242c2c 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb @@ -51,7 +51,6 @@ class SubscriptionCreateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SubscriptionCreateParameters', type: { @@ -59,7 +58,6 @@ def self.mapper() class_name: 'SubscriptionCreateParameters', model_properties: { user_id: { - client_side_validation: true, required: true, serialized_name: 'userId', type: { @@ -67,7 +65,6 @@ def self.mapper() } }, product_id: { - client_side_validation: true, required: true, serialized_name: 'productId', type: { @@ -75,7 +72,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: true, serialized_name: 'name', constraints: { @@ -87,7 +83,6 @@ def self.mapper() } }, primary_key: { - client_side_validation: true, required: false, serialized_name: 'primaryKey', constraints: { @@ -99,7 +94,6 @@ def self.mapper() } }, secondary_key: { - client_side_validation: true, required: false, serialized_name: 'secondaryKey', constraints: { @@ -111,7 +105,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, serialized_name: 'state', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_key_parameter_names_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_key_parameter_names_contract.rb index 2188a8764a..0ab6fc9b7a 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_key_parameter_names_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_key_parameter_names_contract.rb @@ -25,7 +25,6 @@ class SubscriptionKeyParameterNamesContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SubscriptionKeyParameterNamesContract', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'SubscriptionKeyParameterNamesContract', model_properties: { header: { - client_side_validation: true, required: false, serialized_name: 'header', type: { @@ -41,7 +39,6 @@ def self.mapper() } }, query: { - client_side_validation: true, required: false, serialized_name: 'query', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_update_parameters.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_update_parameters.rb index 398dbca220..90650da6fa 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_update_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_update_parameters.rb @@ -53,7 +53,6 @@ class SubscriptionUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SubscriptionUpdateParameters', type: { @@ -61,7 +60,6 @@ def self.mapper() class_name: 'SubscriptionUpdateParameters', model_properties: { user_id: { - client_side_validation: true, required: false, serialized_name: 'userId', type: { @@ -69,7 +67,6 @@ def self.mapper() } }, product_id: { - client_side_validation: true, required: false, serialized_name: 'productId', type: { @@ -77,7 +74,6 @@ def self.mapper() } }, expiration_date: { - client_side_validation: true, required: false, serialized_name: 'expirationDate', type: { @@ -85,7 +81,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, serialized_name: 'name', type: { @@ -93,7 +88,6 @@ def self.mapper() } }, primary_key: { - client_side_validation: true, required: false, serialized_name: 'primaryKey', constraints: { @@ -105,7 +99,6 @@ def self.mapper() } }, secondary_key: { - client_side_validation: true, required: false, serialized_name: 'secondaryKey', constraints: { @@ -117,7 +110,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, serialized_name: 'state', type: { @@ -126,7 +118,6 @@ def self.mapper() } }, state_comment: { - client_side_validation: true, required: false, serialized_name: 'stateComment', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/tenant_configuration_sync_state_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/tenant_configuration_sync_state_contract.rb index 47ddfdf74e..149de06448 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/tenant_configuration_sync_state_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/tenant_configuration_sync_state_contract.rb @@ -49,7 +49,6 @@ class TenantConfigurationSyncStateContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'TenantConfigurationSyncStateContract', type: { @@ -57,7 +56,6 @@ def self.mapper() class_name: 'TenantConfigurationSyncStateContract', model_properties: { branch: { - client_side_validation: true, required: false, serialized_name: 'branch', type: { @@ -65,7 +63,6 @@ def self.mapper() } }, commit_id: { - client_side_validation: true, required: false, serialized_name: 'commitId', type: { @@ -73,7 +70,6 @@ def self.mapper() } }, is_export: { - client_side_validation: true, required: false, serialized_name: 'isExport', type: { @@ -81,7 +77,6 @@ def self.mapper() } }, is_synced: { - client_side_validation: true, required: false, serialized_name: 'isSynced', type: { @@ -89,7 +84,6 @@ def self.mapper() } }, is_git_enabled: { - client_side_validation: true, required: false, serialized_name: 'isGitEnabled', type: { @@ -97,7 +91,6 @@ def self.mapper() } }, sync_date: { - client_side_validation: true, required: false, serialized_name: 'syncDate', type: { @@ -105,7 +98,6 @@ def self.mapper() } }, configuration_change_date: { - client_side_validation: true, required: false, serialized_name: 'configurationChangeDate', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/tenant_long_running_operation_result.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/tenant_long_running_operation_result.rb index 8d83bc0f8d..066a93dd0e 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/tenant_long_running_operation_result.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/tenant_long_running_operation_result.rb @@ -36,7 +36,6 @@ class TenantLongRunningOperationResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'TenantLongRunningOperationResult', type: { @@ -44,7 +43,6 @@ def self.mapper() class_name: 'TenantLongRunningOperationResult', model_properties: { operation_status_link: { - client_side_validation: true, required: false, serialized_name: 'operationStatusLink', type: { @@ -52,7 +50,6 @@ def self.mapper() } }, retry_after: { - client_side_validation: true, required: false, serialized_name: 'retryAfter', type: { @@ -60,7 +57,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, serialized_name: 'status', type: { @@ -69,7 +65,6 @@ def self.mapper() } }, status_code: { - client_side_validation: true, required: false, serialized_name: 'statusCode', type: { @@ -78,7 +73,6 @@ def self.mapper() } }, request_id: { - client_side_validation: true, required: false, serialized_name: 'requestId', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/token_body_parameter_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/token_body_parameter_contract.rb index 3889ba143e..c2444080ff 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/token_body_parameter_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/token_body_parameter_contract.rb @@ -25,7 +25,6 @@ class TokenBodyParameterContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'TokenBodyParameterContract', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'TokenBodyParameterContract', model_properties: { name: { - client_side_validation: true, required: true, serialized_name: 'name', type: { @@ -41,7 +39,6 @@ def self.mapper() } }, value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_collection.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_collection.rb index 88e296ea96..9b9a0422fb 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'UserCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'UserCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'UserContractElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_contract.rb index 2b4ef14cfb..61117c6580 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_contract.rb @@ -47,7 +47,6 @@ class UserContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'UserContract', type: { @@ -55,7 +54,6 @@ def self.mapper() class_name: 'UserContract', model_properties: { id: { - client_side_validation: true, required: false, serialized_name: 'id', type: { @@ -63,7 +61,6 @@ def self.mapper() } }, first_name: { - client_side_validation: true, required: false, serialized_name: 'firstName', type: { @@ -71,7 +68,6 @@ def self.mapper() } }, last_name: { - client_side_validation: true, required: false, serialized_name: 'lastName', type: { @@ -79,7 +75,6 @@ def self.mapper() } }, email: { - client_side_validation: true, required: false, serialized_name: 'email', type: { @@ -87,7 +82,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, serialized_name: 'state', type: { @@ -96,7 +90,6 @@ def self.mapper() } }, registration_date: { - client_side_validation: true, required: false, serialized_name: 'registrationDate', type: { @@ -104,7 +97,6 @@ def self.mapper() } }, note: { - client_side_validation: true, required: false, serialized_name: 'note', type: { @@ -112,14 +104,12 @@ def self.mapper() } }, identities: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'identities', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'UserIdentityContractElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_create_parameters.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_create_parameters.rb index 6ff20ac697..79da3ab7bb 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_create_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_create_parameters.rb @@ -42,7 +42,6 @@ class UserCreateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'UserCreateParameters', type: { @@ -50,7 +49,6 @@ def self.mapper() class_name: 'UserCreateParameters', model_properties: { email: { - client_side_validation: true, required: true, serialized_name: 'email', constraints: { @@ -62,7 +60,6 @@ def self.mapper() } }, password: { - client_side_validation: true, required: true, serialized_name: 'password', type: { @@ -70,7 +67,6 @@ def self.mapper() } }, first_name: { - client_side_validation: true, required: true, serialized_name: 'firstName', constraints: { @@ -82,7 +78,6 @@ def self.mapper() } }, last_name: { - client_side_validation: true, required: true, serialized_name: 'lastName', constraints: { @@ -94,7 +89,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, serialized_name: 'state', default_value: 'Active', @@ -104,7 +98,6 @@ def self.mapper() } }, note: { - client_side_validation: true, required: false, serialized_name: 'note', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_identity_contract.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_identity_contract.rb index 73220259e3..f43b96047b 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_identity_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_identity_contract.rb @@ -25,7 +25,6 @@ class UserIdentityContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'UserIdentityContract', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'UserIdentityContract', model_properties: { provider: { - client_side_validation: true, required: false, serialized_name: 'provider', type: { @@ -41,7 +39,6 @@ def self.mapper() } }, id: { - client_side_validation: true, required: false, serialized_name: 'id', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_update_parameters.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_update_parameters.rb index a231dfbb04..e0d91b02ea 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_update_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_update_parameters.rb @@ -38,7 +38,6 @@ class UserUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'UserUpdateParameters', type: { @@ -46,7 +45,6 @@ def self.mapper() class_name: 'UserUpdateParameters', model_properties: { email: { - client_side_validation: true, required: false, serialized_name: 'email', type: { @@ -54,7 +52,6 @@ def self.mapper() } }, password: { - client_side_validation: true, required: false, serialized_name: 'password', type: { @@ -62,7 +59,6 @@ def self.mapper() } }, first_name: { - client_side_validation: true, required: false, serialized_name: 'firstName', constraints: { @@ -74,7 +70,6 @@ def self.mapper() } }, last_name: { - client_side_validation: true, required: false, serialized_name: 'lastName', constraints: { @@ -86,7 +81,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, serialized_name: 'state', type: { @@ -95,7 +89,6 @@ def self.mapper() } }, note: { - client_side_validation: true, required: false, serialized_name: 'note', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/virtual_network_configuration.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/virtual_network_configuration.rb index fad906277b..7e46ded548 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/virtual_network_configuration.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/models/virtual_network_configuration.rb @@ -35,7 +35,6 @@ class VirtualNetworkConfiguration # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'VirtualNetworkConfiguration', type: { @@ -43,7 +42,6 @@ def self.mapper() class_name: 'VirtualNetworkConfiguration', model_properties: { vnetid: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'vnetid', @@ -52,7 +50,6 @@ def self.mapper() } }, subnetname: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'subnetname', @@ -61,7 +58,6 @@ def self.mapper() } }, subnet_resource_id: { - client_side_validation: true, required: false, serialized_name: 'subnetResourceId', type: { @@ -69,7 +65,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, serialized_name: 'location', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/open_id_connect_providers.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/open_id_connect_providers.rb index 857e701256..54ed01ec9d 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/open_id_connect_providers.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/open_id_connect_providers.rb @@ -40,8 +40,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_service_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) first_page.get_all_items end @@ -64,8 +64,8 @@ def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! end # @@ -87,20 +87,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, filter:nil # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -156,8 +150,8 @@ def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil # # @return [OpenidConnectProviderContract] operation results. # - def get(resource_group_name, service_name, opid, custom_headers:nil) - response = get_async(resource_group_name, service_name, opid, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, opid, custom_headers = nil) + response = get_async(resource_group_name, service_name, opid, custom_headers).value! response.body unless response.nil? end @@ -172,8 +166,8 @@ def get(resource_group_name, service_name, opid, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, opid, custom_headers:nil) - get_async(resource_group_name, service_name, opid, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, opid, custom_headers = nil) + get_async(resource_group_name, service_name, opid, custom_headers).value! end # @@ -187,19 +181,15 @@ def get_with_http_info(resource_group_name, service_name, opid, custom_headers:n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, opid, custom_headers:nil) + def get_async(resource_group_name, service_name, opid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'opid is nil' if opid.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 @@ -255,8 +245,8 @@ def get_async(resource_group_name, service_name, opid, custom_headers:nil) # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, opid, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, opid, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, opid, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, opid, parameters, custom_headers).value! nil end @@ -272,8 +262,8 @@ def create_or_update(resource_group_name, service_name, opid, parameters, custom # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, opid, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, opid, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, opid, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, opid, parameters, custom_headers).value! end # @@ -288,27 +278,23 @@ def create_or_update_with_http_info(resource_group_name, service_name, opid, par # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, opid, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, opid, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'opid is nil' if opid.nil? - fail ArgumentError, "'opid' should satisfy the constraint - 'MaxLength': '256'" if !opid.nil? && opid.length > 256 - fail ArgumentError, "'opid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !opid.nil? && opid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_07_07::Models::OpenidConnectProviderCreateContract.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -359,8 +345,8 @@ def create_or_update_async(resource_group_name, service_name, opid, parameters, # will be added to the HTTP request. # # - def update(resource_group_name, service_name, opid, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, opid, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, opid, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, opid, parameters, if_match, custom_headers).value! nil end @@ -379,8 +365,8 @@ def update(resource_group_name, service_name, opid, parameters, if_match, custom # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, opid, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, opid, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, opid, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, opid, parameters, if_match, custom_headers).value! end # @@ -398,12 +384,9 @@ def update_with_http_info(resource_group_name, service_name, opid, parameters, i # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, opid, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, opid, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'opid is nil' if opid.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? @@ -412,13 +395,14 @@ def update_async(resource_group_name, service_name, opid, parameters, if_match, request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_07_07::Models::OpenidConnectProviderUpdateContract.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -470,8 +454,8 @@ def update_async(resource_group_name, service_name, opid, parameters, if_match, # # @return [ErrorBodyContract] operation results. # - def delete(resource_group_name, service_name, opid, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, opid, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, opid, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, opid, if_match, custom_headers).value! response.body unless response.nil? end @@ -490,8 +474,8 @@ def delete(resource_group_name, service_name, opid, if_match, custom_headers:nil # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, opid, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, opid, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, opid, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, opid, if_match, custom_headers).value! end # @@ -509,12 +493,9 @@ def delete_with_http_info(resource_group_name, service_name, opid, if_match, cus # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, opid, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, opid, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'opid is nil' if opid.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -522,7 +503,6 @@ def delete_async(resource_group_name, service_name, opid, if_match, custom_heade request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -578,8 +558,8 @@ def delete_async(resource_group_name, service_name, opid, if_match, custom_heade # # @return [OpenIdConnectProviderCollection] operation results. # - def list_by_service_next(next_page_link, custom_headers:nil) - response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -593,8 +573,8 @@ def list_by_service_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) - list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! end # @@ -607,12 +587,11 @@ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_next_async(next_page_link, custom_headers:nil) + def list_by_service_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 @@ -676,12 +655,12 @@ def list_by_service_next_async(next_page_link, custom_headers:nil) # @return [OpenIdConnectProviderCollection] which provide lazy access to pages # of the response. # - def list_by_service_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_service_next_async(next_page_link, custom_headers:custom_headers) + list_by_service_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/policy_snippets.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/policy_snippets.rb index 75fb2f62ba..ec4a7d1462 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/policy_snippets.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/policy_snippets.rb @@ -33,8 +33,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, scope:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, scope:scope, custom_headers:custom_headers).value! + def list_by_service(resource_group_name, service_name, scope = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, scope, custom_headers).value! response.body unless response.nil? end @@ -50,8 +50,8 @@ def list_by_service(resource_group_name, service_name, scope:nil, custom_headers # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, scope:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, scope:scope, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, scope = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, scope, custom_headers).value! end # @@ -66,18 +66,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, scope:nil, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, scope:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, scope = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 @@ -110,13 +106,11 @@ def list_by_service_async(resource_group_name, service_name, scope:nil, custom_h 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: 'PolicySnippetContractElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/product_apis.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/product_apis.rb index 3761564ae0..02743e2a08 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/product_apis.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/product_apis.rb @@ -49,8 +49,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_product(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_product_as_lazy(resource_group_name, service_name, product_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_product(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_product_as_lazy(resource_group_name, service_name, product_id, filter, top, skip, custom_headers) first_page.get_all_items end @@ -82,8 +82,8 @@ def list_by_product(resource_group_name, service_name, product_id, filter:nil, t # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_product_with_http_info(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_product_async(resource_group_name, service_name, product_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_product_with_http_info(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_product_async(resource_group_name, service_name, product_id, filter, top, skip, custom_headers).value! end # @@ -114,24 +114,15 @@ def list_by_product_with_http_info(resource_group_name, service_name, product_id # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_product_async(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_product_async(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -189,8 +180,8 @@ def list_by_product_async(resource_group_name, service_name, product_id, filter: # will be added to the HTTP request. # # - def add(resource_group_name, service_name, product_id, api_id, custom_headers:nil) - response = add_async(resource_group_name, service_name, product_id, api_id, custom_headers:custom_headers).value! + def add(resource_group_name, service_name, product_id, api_id, custom_headers = nil) + response = add_async(resource_group_name, service_name, product_id, api_id, custom_headers).value! nil end @@ -208,8 +199,8 @@ def add(resource_group_name, service_name, product_id, api_id, custom_headers:ni # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def add_with_http_info(resource_group_name, service_name, product_id, api_id, custom_headers:nil) - add_async(resource_group_name, service_name, product_id, api_id, custom_headers:custom_headers).value! + def add_with_http_info(resource_group_name, service_name, product_id, api_id, custom_headers = nil) + add_async(resource_group_name, service_name, product_id, api_id, custom_headers).value! end # @@ -226,26 +217,16 @@ def add_with_http_info(resource_group_name, service_name, product_id, api_id, cu # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def add_async(resource_group_name, service_name, product_id, api_id, custom_headers:nil) + def add_async(resource_group_name, service_name, product_id, api_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -293,8 +274,8 @@ def add_async(resource_group_name, service_name, product_id, api_id, custom_head # will be added to the HTTP request. # # - def remove(resource_group_name, service_name, product_id, api_id, custom_headers:nil) - response = remove_async(resource_group_name, service_name, product_id, api_id, custom_headers:custom_headers).value! + def remove(resource_group_name, service_name, product_id, api_id, custom_headers = nil) + response = remove_async(resource_group_name, service_name, product_id, api_id, custom_headers).value! nil end @@ -312,8 +293,8 @@ def remove(resource_group_name, service_name, product_id, api_id, custom_headers # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def remove_with_http_info(resource_group_name, service_name, product_id, api_id, custom_headers:nil) - remove_async(resource_group_name, service_name, product_id, api_id, custom_headers:custom_headers).value! + def remove_with_http_info(resource_group_name, service_name, product_id, api_id, custom_headers = nil) + remove_async(resource_group_name, service_name, product_id, api_id, custom_headers).value! end # @@ -330,26 +311,16 @@ def remove_with_http_info(resource_group_name, service_name, product_id, api_id, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def remove_async(resource_group_name, service_name, product_id, api_id, custom_headers:nil) + def remove_async(resource_group_name, service_name, product_id, api_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -394,8 +365,8 @@ def remove_async(resource_group_name, service_name, product_id, api_id, custom_h # # @return [ApiCollection] operation results. # - def list_by_product_next(next_page_link, custom_headers:nil) - response = list_by_product_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_product_next(next_page_link, custom_headers = nil) + response = list_by_product_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -409,8 +380,8 @@ def list_by_product_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_product_next_with_http_info(next_page_link, custom_headers:nil) - list_by_product_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_product_next_with_http_info(next_page_link, custom_headers = nil) + list_by_product_next_async(next_page_link, custom_headers).value! end # @@ -423,12 +394,11 @@ def list_by_product_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_product_next_async(next_page_link, custom_headers:nil) + def list_by_product_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 @@ -500,12 +470,12 @@ def list_by_product_next_async(next_page_link, custom_headers:nil) # # @return [ApiCollection] which provide lazy access to pages of the response. # - def list_by_product_as_lazy(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_product_async(resource_group_name, service_name, product_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_product_as_lazy(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_product_async(resource_group_name, service_name, product_id, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_product_next_async(next_page_link, custom_headers:custom_headers) + list_by_product_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/product_groups.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/product_groups.rb index 08667ef362..32e1d13fb9 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/product_groups.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/product_groups.rb @@ -47,8 +47,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_product(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_product_as_lazy(resource_group_name, service_name, product_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_product(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_product_as_lazy(resource_group_name, service_name, product_id, filter, top, skip, custom_headers) first_page.get_all_items end @@ -78,8 +78,8 @@ def list_by_product(resource_group_name, service_name, product_id, filter:nil, t # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_product_with_http_info(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_product_async(resource_group_name, service_name, product_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_product_with_http_info(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_product_async(resource_group_name, service_name, product_id, filter, top, skip, custom_headers).value! end # @@ -108,24 +108,15 @@ def list_by_product_with_http_info(resource_group_name, service_name, product_id # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_product_async(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_product_async(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -184,8 +175,8 @@ def list_by_product_async(resource_group_name, service_name, product_id, filter: # will be added to the HTTP request. # # - def add(resource_group_name, service_name, product_id, group_id, custom_headers:nil) - response = add_async(resource_group_name, service_name, product_id, group_id, custom_headers:custom_headers).value! + def add(resource_group_name, service_name, product_id, group_id, custom_headers = nil) + response = add_async(resource_group_name, service_name, product_id, group_id, custom_headers).value! nil end @@ -204,8 +195,8 @@ def add(resource_group_name, service_name, product_id, group_id, custom_headers: # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def add_with_http_info(resource_group_name, service_name, product_id, group_id, custom_headers:nil) - add_async(resource_group_name, service_name, product_id, group_id, custom_headers:custom_headers).value! + def add_with_http_info(resource_group_name, service_name, product_id, group_id, custom_headers = nil) + add_async(resource_group_name, service_name, product_id, group_id, custom_headers).value! end # @@ -223,26 +214,16 @@ def add_with_http_info(resource_group_name, service_name, product_id, group_id, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def add_async(resource_group_name, service_name, product_id, group_id, custom_headers:nil) + def add_async(resource_group_name, service_name, product_id, group_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'group_id is nil' if group_id.nil? - fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '256'" if !group_id.nil? && group_id.length > 256 - fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 - fail ArgumentError, "'group_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !group_id.nil? && group_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -291,8 +272,8 @@ def add_async(resource_group_name, service_name, product_id, group_id, custom_he # # @return [ErrorBodyContract] operation results. # - def remove(resource_group_name, service_name, product_id, group_id, custom_headers:nil) - response = remove_async(resource_group_name, service_name, product_id, group_id, custom_headers:custom_headers).value! + def remove(resource_group_name, service_name, product_id, group_id, custom_headers = nil) + response = remove_async(resource_group_name, service_name, product_id, group_id, custom_headers).value! response.body unless response.nil? end @@ -310,8 +291,8 @@ def remove(resource_group_name, service_name, product_id, group_id, custom_heade # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def remove_with_http_info(resource_group_name, service_name, product_id, group_id, custom_headers:nil) - remove_async(resource_group_name, service_name, product_id, group_id, custom_headers:custom_headers).value! + def remove_with_http_info(resource_group_name, service_name, product_id, group_id, custom_headers = nil) + remove_async(resource_group_name, service_name, product_id, group_id, custom_headers).value! end # @@ -328,26 +309,16 @@ def remove_with_http_info(resource_group_name, service_name, product_id, group_i # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def remove_async(resource_group_name, service_name, product_id, group_id, custom_headers:nil) + def remove_async(resource_group_name, service_name, product_id, group_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'group_id is nil' if group_id.nil? - fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '256'" if !group_id.nil? && group_id.length > 256 - fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 - fail ArgumentError, "'group_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !group_id.nil? && group_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -403,8 +374,8 @@ def remove_async(resource_group_name, service_name, product_id, group_id, custom # # @return [GroupCollection] operation results. # - def list_by_product_next(next_page_link, custom_headers:nil) - response = list_by_product_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_product_next(next_page_link, custom_headers = nil) + response = list_by_product_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -419,8 +390,8 @@ def list_by_product_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_product_next_with_http_info(next_page_link, custom_headers:nil) - list_by_product_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_product_next_with_http_info(next_page_link, custom_headers = nil) + list_by_product_next_async(next_page_link, custom_headers).value! end # @@ -434,12 +405,11 @@ def list_by_product_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_product_next_async(next_page_link, custom_headers:nil) + def list_by_product_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 @@ -509,12 +479,12 @@ def list_by_product_next_async(next_page_link, custom_headers:nil) # # @return [GroupCollection] which provide lazy access to pages of the response. # - def list_by_product_as_lazy(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_product_async(resource_group_name, service_name, product_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_product_as_lazy(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_product_async(resource_group_name, service_name, product_id, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_product_next_async(next_page_link, custom_headers:custom_headers) + list_by_product_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/product_subscriptions.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/product_subscriptions.rb index 4159babc73..4edc6251c5 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/product_subscriptions.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/product_subscriptions.rb @@ -50,8 +50,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_product(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_product_as_lazy(resource_group_name, service_name, product_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_product(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_product_as_lazy(resource_group_name, service_name, product_id, filter, top, skip, custom_headers) first_page.get_all_items end @@ -84,8 +84,8 @@ def list_by_product(resource_group_name, service_name, product_id, filter:nil, t # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_product_with_http_info(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_product_async(resource_group_name, service_name, product_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_product_with_http_info(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_product_async(resource_group_name, service_name, product_id, filter, top, skip, custom_headers).value! end # @@ -117,24 +117,15 @@ def list_by_product_with_http_info(resource_group_name, service_name, product_id # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_product_async(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_product_async(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -189,8 +180,8 @@ def list_by_product_async(resource_group_name, service_name, product_id, filter: # # @return [SubscriptionCollection] operation results. # - def list_by_product_next(next_page_link, custom_headers:nil) - response = list_by_product_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_product_next(next_page_link, custom_headers = nil) + response = list_by_product_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -204,8 +195,8 @@ def list_by_product_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_product_next_with_http_info(next_page_link, custom_headers:nil) - list_by_product_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_product_next_with_http_info(next_page_link, custom_headers = nil) + list_by_product_next_async(next_page_link, custom_headers).value! end # @@ -218,12 +209,11 @@ def list_by_product_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_product_next_async(next_page_link, custom_headers:nil) + def list_by_product_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 @@ -297,12 +287,12 @@ def list_by_product_next_async(next_page_link, custom_headers:nil) # @return [SubscriptionCollection] which provide lazy access to pages of the # response. # - def list_by_product_as_lazy(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_product_async(resource_group_name, service_name, product_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_product_as_lazy(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_product_async(resource_group_name, service_name, product_id, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_product_next_async(next_page_link, custom_headers:custom_headers) + list_by_product_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/products.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/products.rb index 70d013feb6..49fcbb993c 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/products.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/products.rb @@ -48,8 +48,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip:nil, expand_groups:nil, custom_headers:nil) - first_page = list_by_service_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, expand_groups:expand_groups, custom_headers:custom_headers) + def list_by_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, expand_groups = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, expand_groups, custom_headers) first_page.get_all_items end @@ -80,8 +80,8 @@ def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, expand_groups:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, expand_groups:expand_groups, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, expand_groups = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, expand_groups, custom_headers).value! end # @@ -111,20 +111,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, filter:nil # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, expand_groups:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, expand_groups = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -181,8 +175,8 @@ def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil # # @return [ProductContract] operation results. # - def get(resource_group_name, service_name, product_id, custom_headers:nil) - response = get_async(resource_group_name, service_name, product_id, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, product_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, product_id, custom_headers).value! response.body unless response.nil? end @@ -198,8 +192,8 @@ def get(resource_group_name, service_name, product_id, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, product_id, custom_headers:nil) - get_async(resource_group_name, service_name, product_id, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, product_id, custom_headers = nil) + get_async(resource_group_name, service_name, product_id, custom_headers).value! end # @@ -214,22 +208,15 @@ def get_with_http_info(resource_group_name, service_name, product_id, custom_hea # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, product_id, custom_headers:nil) + def get_async(resource_group_name, service_name, product_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -286,8 +273,8 @@ def get_async(resource_group_name, service_name, product_id, custom_headers:nil) # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, product_id, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, product_id, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, product_id, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, product_id, parameters, custom_headers).value! nil end @@ -304,8 +291,8 @@ def create_or_update(resource_group_name, service_name, product_id, parameters, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, product_id, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, product_id, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, product_id, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, product_id, parameters, custom_headers).value! end # @@ -321,28 +308,23 @@ def create_or_update_with_http_info(resource_group_name, service_name, product_i # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, product_id, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, product_id, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_07_07::Models::ProductContract.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -394,8 +376,8 @@ def create_or_update_async(resource_group_name, service_name, product_id, parame # will be added to the HTTP request. # # - def update(resource_group_name, service_name, product_id, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, product_id, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers).value! nil end @@ -415,8 +397,8 @@ def update(resource_group_name, service_name, product_id, parameters, if_match, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, product_id, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, product_id, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers).value! end # @@ -435,16 +417,10 @@ def update_with_http_info(resource_group_name, service_name, product_id, paramet # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -452,13 +428,14 @@ def update_async(resource_group_name, service_name, product_id, parameters, if_m request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_07_07::Models::ProductUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -511,8 +488,8 @@ def update_async(resource_group_name, service_name, product_id, parameters, if_m # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, product_id, if_match, delete_subscriptions:nil, custom_headers:nil) - response = delete_async(resource_group_name, service_name, product_id, if_match, delete_subscriptions:delete_subscriptions, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, product_id, if_match, delete_subscriptions = nil, custom_headers = nil) + response = delete_async(resource_group_name, service_name, product_id, if_match, delete_subscriptions, custom_headers).value! nil end @@ -533,8 +510,8 @@ def delete(resource_group_name, service_name, product_id, if_match, delete_subsc # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, product_id, if_match, delete_subscriptions:nil, custom_headers:nil) - delete_async(resource_group_name, service_name, product_id, if_match, delete_subscriptions:delete_subscriptions, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, product_id, if_match, delete_subscriptions = nil, custom_headers = nil) + delete_async(resource_group_name, service_name, product_id, if_match, delete_subscriptions, custom_headers).value! end # @@ -554,23 +531,16 @@ def delete_with_http_info(resource_group_name, service_name, product_id, if_matc # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, product_id, if_match, delete_subscriptions:nil, custom_headers:nil) + def delete_async(resource_group_name, service_name, product_id, if_match, delete_subscriptions = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'if_match is nil' if if_match.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 @@ -616,8 +586,8 @@ def delete_async(resource_group_name, service_name, product_id, if_match, delete # # @return [ProductCollection] operation results. # - def list_by_service_next(next_page_link, custom_headers:nil) - response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -631,8 +601,8 @@ def list_by_service_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) - list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! end # @@ -645,12 +615,11 @@ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_next_async(next_page_link, custom_headers:nil) + def list_by_service_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 @@ -722,12 +691,12 @@ def list_by_service_next_async(next_page_link, custom_headers:nil) # @return [ProductCollection] which provide lazy access to pages of the # response. # - def list_by_service_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, expand_groups:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, expand_groups:expand_groups, custom_headers:custom_headers).value! + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, expand_groups = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, expand_groups, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_service_next_async(next_page_link, custom_headers:custom_headers) + list_by_service_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/property.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/property.rb index e18c32cdfb..c49daeeea6 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/property.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/property.rb @@ -40,8 +40,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_service_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) first_page.get_all_items end @@ -64,8 +64,8 @@ def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! end # @@ -87,20 +87,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, filter:nil # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -156,8 +150,8 @@ def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil # # @return [PropertyContract] operation results. # - def get(resource_group_name, service_name, prop_id, custom_headers:nil) - response = get_async(resource_group_name, service_name, prop_id, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, prop_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, prop_id, custom_headers).value! response.body unless response.nil? end @@ -172,8 +166,8 @@ def get(resource_group_name, service_name, prop_id, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, prop_id, custom_headers:nil) - get_async(resource_group_name, service_name, prop_id, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, prop_id, custom_headers = nil) + get_async(resource_group_name, service_name, prop_id, custom_headers).value! end # @@ -187,19 +181,15 @@ def get_with_http_info(resource_group_name, service_name, prop_id, custom_header # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, prop_id, custom_headers:nil) + def get_async(resource_group_name, service_name, prop_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'prop_id is nil' if prop_id.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 @@ -255,8 +245,8 @@ def get_async(resource_group_name, service_name, prop_id, custom_headers:nil) # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, prop_id, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, prop_id, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, prop_id, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, prop_id, parameters, custom_headers).value! nil end @@ -272,8 +262,8 @@ def create_or_update(resource_group_name, service_name, prop_id, parameters, cus # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, prop_id, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, prop_id, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, prop_id, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, prop_id, parameters, custom_headers).value! end # @@ -288,27 +278,23 @@ def create_or_update_with_http_info(resource_group_name, service_name, prop_id, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, prop_id, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, prop_id, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'prop_id is nil' if prop_id.nil? - fail ArgumentError, "'prop_id' should satisfy the constraint - 'MaxLength': '256'" if !prop_id.nil? && prop_id.length > 256 - fail ArgumentError, "'prop_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !prop_id.nil? && prop_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_07_07::Models::PropertyCreateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -359,8 +345,8 @@ def create_or_update_async(resource_group_name, service_name, prop_id, parameter # will be added to the HTTP request. # # - def update(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers).value! nil end @@ -379,8 +365,8 @@ def update(resource_group_name, service_name, prop_id, parameters, if_match, cus # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers).value! end # @@ -398,12 +384,9 @@ def update_with_http_info(resource_group_name, service_name, prop_id, parameters # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'prop_id is nil' if prop_id.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? @@ -412,13 +395,14 @@ def update_async(resource_group_name, service_name, prop_id, parameters, if_matc request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_07_07::Models::PropertyUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -469,8 +453,8 @@ def update_async(resource_group_name, service_name, prop_id, parameters, if_matc # # @return [ErrorBodyContract] operation results. # - def delete(resource_group_name, service_name, prop_id, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, prop_id, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, prop_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, prop_id, if_match, custom_headers).value! response.body unless response.nil? end @@ -488,8 +472,8 @@ def delete(resource_group_name, service_name, prop_id, if_match, custom_headers: # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, prop_id, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, prop_id, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, prop_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, prop_id, if_match, custom_headers).value! end # @@ -506,12 +490,9 @@ def delete_with_http_info(resource_group_name, service_name, prop_id, if_match, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, prop_id, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, prop_id, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'prop_id is nil' if prop_id.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -519,7 +500,6 @@ def delete_async(resource_group_name, service_name, prop_id, if_match, custom_he request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -575,8 +555,8 @@ def delete_async(resource_group_name, service_name, prop_id, if_match, custom_he # # @return [PropertyCollection] operation results. # - def list_by_service_next(next_page_link, custom_headers:nil) - response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -590,8 +570,8 @@ def list_by_service_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) - list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! end # @@ -604,12 +584,11 @@ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_next_async(next_page_link, custom_headers:nil) + def list_by_service_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 @@ -673,12 +652,12 @@ def list_by_service_next_async(next_page_link, custom_headers:nil) # @return [PropertyCollection] which provide lazy access to pages of the # response. # - def list_by_service_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_service_next_async(next_page_link, custom_headers:custom_headers) + list_by_service_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/quota_by_counter_keys.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/quota_by_counter_keys.rb index cbdaf95df1..647f16385d 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/quota_by_counter_keys.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/quota_by_counter_keys.rb @@ -34,8 +34,8 @@ def initialize(client) # # @return [QuotaCounterCollection] operation results. # - def list_by_service(resource_group_name, service_name, quota_counter_key, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, quota_counter_key, custom_headers:custom_headers).value! + def list_by_service(resource_group_name, service_name, quota_counter_key, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, quota_counter_key, custom_headers).value! response.body unless response.nil? end @@ -52,8 +52,8 @@ def list_by_service(resource_group_name, service_name, quota_counter_key, custom # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, quota_counter_key, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, quota_counter_key, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, quota_counter_key, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, quota_counter_key, custom_headers).value! end # @@ -69,19 +69,15 @@ def list_by_service_with_http_info(resource_group_name, service_name, quota_coun # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, quota_counter_key, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, quota_counter_key, 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, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'quota_counter_key is nil' if quota_counter_key.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 @@ -140,8 +136,8 @@ def list_by_service_async(resource_group_name, service_name, quota_counter_key, # will be added to the HTTP request. # # - def update(resource_group_name, service_name, quota_counter_key, parameters, custom_headers:nil) - response = update_async(resource_group_name, service_name, quota_counter_key, parameters, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, quota_counter_key, parameters, custom_headers = nil) + response = update_async(resource_group_name, service_name, quota_counter_key, parameters, custom_headers).value! nil end @@ -160,8 +156,8 @@ def update(resource_group_name, service_name, quota_counter_key, parameters, cus # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, quota_counter_key, parameters, custom_headers:nil) - update_async(resource_group_name, service_name, quota_counter_key, parameters, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, quota_counter_key, parameters, custom_headers = nil) + update_async(resource_group_name, service_name, quota_counter_key, parameters, custom_headers).value! end # @@ -179,12 +175,9 @@ def update_with_http_info(resource_group_name, service_name, quota_counter_key, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, quota_counter_key, parameters, custom_headers:nil) + def update_async(resource_group_name, service_name, quota_counter_key, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'quota_counter_key is nil' if quota_counter_key.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -192,12 +185,13 @@ def update_async(resource_group_name, service_name, quota_counter_key, parameter 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::ApiManagement::Mgmt::V2016_07_07::Models::QuotaCounterValueContract.mapper() request_content = @client.serialize(request_mapper, parameters) diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/quota_by_period_keys.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/quota_by_period_keys.rb index 07f0c39093..15389c1e73 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/quota_by_period_keys.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/quota_by_period_keys.rb @@ -34,8 +34,8 @@ def initialize(client) # # @return [QuotaCounterContract] operation results. # - def get(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers:nil) - response = get_async(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers = nil) + response = get_async(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers).value! response.body unless response.nil? end @@ -52,8 +52,8 @@ def get(resource_group_name, service_name, quota_counter_key, quota_period_key, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers:nil) - get_async(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers = nil) + get_async(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers).value! end # @@ -69,20 +69,16 @@ def get_with_http_info(resource_group_name, service_name, quota_counter_key, quo # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers:nil) + def get_async(resource_group_name, service_name, quota_counter_key, quota_period_key, 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, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'quota_counter_key is nil' if quota_counter_key.nil? fail ArgumentError, 'quota_period_key is nil' if quota_period_key.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 @@ -140,8 +136,8 @@ def get_async(resource_group_name, service_name, quota_counter_key, quota_period # will be added to the HTTP request. # # - def update(resource_group_name, service_name, quota_counter_key, quota_period_key, parameters, custom_headers:nil) - response = update_async(resource_group_name, service_name, quota_counter_key, quota_period_key, parameters, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, quota_counter_key, quota_period_key, parameters, custom_headers = nil) + response = update_async(resource_group_name, service_name, quota_counter_key, quota_period_key, parameters, custom_headers).value! nil end @@ -159,8 +155,8 @@ def update(resource_group_name, service_name, quota_counter_key, quota_period_ke # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, quota_counter_key, quota_period_key, parameters, custom_headers:nil) - update_async(resource_group_name, service_name, quota_counter_key, quota_period_key, parameters, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, quota_counter_key, quota_period_key, parameters, custom_headers = nil) + update_async(resource_group_name, service_name, quota_counter_key, quota_period_key, parameters, custom_headers).value! end # @@ -177,12 +173,9 @@ def update_with_http_info(resource_group_name, service_name, quota_counter_key, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, quota_counter_key, quota_period_key, parameters, custom_headers:nil) + def update_async(resource_group_name, service_name, quota_counter_key, quota_period_key, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'quota_counter_key is nil' if quota_counter_key.nil? fail ArgumentError, 'quota_period_key is nil' if quota_period_key.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? @@ -191,12 +184,13 @@ def update_async(resource_group_name, service_name, quota_counter_key, quota_per 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::ApiManagement::Mgmt::V2016_07_07::Models::QuotaCounterValueContract.mapper() request_content = @client.serialize(request_mapper, parameters) diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/regions.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/regions.rb index c37dac50ed..069447f558 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/regions.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/regions.rb @@ -31,8 +31,8 @@ def initialize(client) # # @return [RegionListResult] operation results. # - def list_by_service(resource_group_name, service_name, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def list_by_service(resource_group_name, service_name, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, custom_headers).value! response.body unless response.nil? end @@ -46,8 +46,8 @@ def list_by_service(resource_group_name, service_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, custom_headers).value! end # @@ -60,18 +60,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, custom_hea # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/reports.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/reports.rb index cd1fc2e676..7356f53bd0 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/reports.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/reports.rb @@ -43,8 +43,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, aggregation, filter:nil, top:nil, skip:nil, interval:nil, custom_headers:nil) - first_page = list_by_service_as_lazy(resource_group_name, service_name, aggregation, filter:filter, top:top, skip:skip, interval:interval, custom_headers:custom_headers) + def list_by_service(resource_group_name, service_name, aggregation, filter = nil, top = nil, skip = nil, interval = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, aggregation, filter, top, skip, interval, custom_headers) first_page.get_all_items end @@ -70,8 +70,8 @@ def list_by_service(resource_group_name, service_name, aggregation, filter:nil, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, aggregation, filter:nil, top:nil, skip:nil, interval:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, aggregation, filter:filter, top:top, skip:skip, interval:interval, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, aggregation, filter = nil, top = nil, skip = nil, interval = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, aggregation, filter, top, skip, interval, custom_headers).value! end # @@ -96,21 +96,15 @@ def list_by_service_with_http_info(resource_group_name, service_name, aggregatio # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, aggregation, filter:nil, top:nil, skip:nil, interval:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, aggregation, filter = nil, top = nil, skip = nil, interval = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'aggregation is nil' if aggregation.nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -165,8 +159,8 @@ def list_by_service_async(resource_group_name, service_name, aggregation, filter # # @return [ReportCollection] operation results. # - def list_by_service_next(next_page_link, custom_headers:nil) - response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -180,8 +174,8 @@ def list_by_service_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) - list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! end # @@ -194,12 +188,11 @@ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_next_async(next_page_link, custom_headers:nil) + def list_by_service_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 @@ -266,12 +259,12 @@ def list_by_service_next_async(next_page_link, custom_headers:nil) # @return [ReportCollection] which provide lazy access to pages of the # response. # - def list_by_service_as_lazy(resource_group_name, service_name, aggregation, filter:nil, top:nil, skip:nil, interval:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, aggregation, filter:filter, top:top, skip:skip, interval:interval, custom_headers:custom_headers).value! + def list_by_service_as_lazy(resource_group_name, service_name, aggregation, filter = nil, top = nil, skip = nil, interval = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, aggregation, filter, top, skip, interval, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_service_next_async(next_page_link, custom_headers:custom_headers) + list_by_service_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/subscriptions.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/subscriptions.rb index 27a05c193e..03defef9cb 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/subscriptions.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/subscriptions.rb @@ -48,8 +48,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_service_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) first_page.get_all_items end @@ -80,8 +80,8 @@ def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! end # @@ -111,20 +111,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, filter:nil # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -180,8 +174,8 @@ def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil # # @return [SubscriptionContract] operation results. # - def get(resource_group_name, service_name, sid, custom_headers:nil) - response = get_async(resource_group_name, service_name, sid, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, sid, custom_headers = nil) + response = get_async(resource_group_name, service_name, sid, custom_headers).value! response.body unless response.nil? end @@ -196,8 +190,8 @@ def get(resource_group_name, service_name, sid, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, sid, custom_headers:nil) - get_async(resource_group_name, service_name, sid, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, sid, custom_headers = nil) + get_async(resource_group_name, service_name, sid, custom_headers).value! end # @@ -211,19 +205,15 @@ def get_with_http_info(resource_group_name, service_name, sid, custom_headers:ni # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, sid, custom_headers:nil) + def get_async(resource_group_name, service_name, sid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'sid is nil' if sid.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 @@ -280,8 +270,8 @@ def get_async(resource_group_name, service_name, sid, custom_headers:nil) # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, sid, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, sid, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, sid, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, sid, parameters, custom_headers).value! nil end @@ -298,8 +288,8 @@ def create_or_update(resource_group_name, service_name, sid, parameters, custom_ # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, sid, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, sid, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, sid, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, sid, parameters, custom_headers).value! end # @@ -315,28 +305,23 @@ def create_or_update_with_http_info(resource_group_name, service_name, sid, para # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, sid, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, sid, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'sid is nil' if sid.nil? - fail ArgumentError, "'sid' should satisfy the constraint - 'MaxLength': '256'" if !sid.nil? && sid.length > 256 - fail ArgumentError, "'sid' should satisfy the constraint - 'MinLength': '1'" if !sid.nil? && sid.length < 1 - fail ArgumentError, "'sid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !sid.nil? && sid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_07_07::Models::SubscriptionCreateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -387,8 +372,8 @@ def create_or_update_async(resource_group_name, service_name, sid, parameters, c # will be added to the HTTP request. # # - def update(resource_group_name, service_name, sid, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, sid, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, sid, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, sid, parameters, if_match, custom_headers).value! nil end @@ -407,8 +392,8 @@ def update(resource_group_name, service_name, sid, parameters, if_match, custom_ # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, sid, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, sid, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, sid, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, sid, parameters, if_match, custom_headers).value! end # @@ -426,12 +411,9 @@ def update_with_http_info(resource_group_name, service_name, sid, parameters, if # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, sid, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, sid, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'sid is nil' if sid.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? @@ -440,13 +422,14 @@ def update_async(resource_group_name, service_name, sid, parameters, if_match, 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['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_07_07::Models::SubscriptionUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -496,8 +479,8 @@ def update_async(resource_group_name, service_name, sid, parameters, if_match, c # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, sid, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, sid, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, sid, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, sid, if_match, custom_headers).value! nil end @@ -515,8 +498,8 @@ def delete(resource_group_name, service_name, sid, if_match, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, sid, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, sid, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, sid, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, sid, if_match, custom_headers).value! end # @@ -533,12 +516,9 @@ def delete_with_http_info(resource_group_name, service_name, sid, if_match, cust # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, sid, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, sid, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'sid is nil' if sid.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -546,7 +526,6 @@ def delete_async(resource_group_name, service_name, sid, if_match, custom_header request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -593,8 +572,8 @@ def delete_async(resource_group_name, service_name, sid, if_match, custom_header # will be added to the HTTP request. # # - def regenerate_primary_key(resource_group_name, service_name, sid, custom_headers:nil) - response = regenerate_primary_key_async(resource_group_name, service_name, sid, custom_headers:custom_headers).value! + def regenerate_primary_key(resource_group_name, service_name, sid, custom_headers = nil) + response = regenerate_primary_key_async(resource_group_name, service_name, sid, custom_headers).value! nil end @@ -610,8 +589,8 @@ def regenerate_primary_key(resource_group_name, service_name, sid, custom_header # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def regenerate_primary_key_with_http_info(resource_group_name, service_name, sid, custom_headers:nil) - regenerate_primary_key_async(resource_group_name, service_name, sid, custom_headers:custom_headers).value! + def regenerate_primary_key_with_http_info(resource_group_name, service_name, sid, custom_headers = nil) + regenerate_primary_key_async(resource_group_name, service_name, sid, custom_headers).value! end # @@ -626,19 +605,15 @@ def regenerate_primary_key_with_http_info(resource_group_name, service_name, sid # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def regenerate_primary_key_async(resource_group_name, service_name, sid, custom_headers:nil) + def regenerate_primary_key_async(resource_group_name, service_name, sid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'sid is nil' if sid.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 @@ -684,8 +659,8 @@ def regenerate_primary_key_async(resource_group_name, service_name, sid, custom_ # will be added to the HTTP request. # # - def regenerate_secondary_key(resource_group_name, service_name, sid, custom_headers:nil) - response = regenerate_secondary_key_async(resource_group_name, service_name, sid, custom_headers:custom_headers).value! + def regenerate_secondary_key(resource_group_name, service_name, sid, custom_headers = nil) + response = regenerate_secondary_key_async(resource_group_name, service_name, sid, custom_headers).value! nil end @@ -701,8 +676,8 @@ def regenerate_secondary_key(resource_group_name, service_name, sid, custom_head # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def regenerate_secondary_key_with_http_info(resource_group_name, service_name, sid, custom_headers:nil) - regenerate_secondary_key_async(resource_group_name, service_name, sid, custom_headers:custom_headers).value! + def regenerate_secondary_key_with_http_info(resource_group_name, service_name, sid, custom_headers = nil) + regenerate_secondary_key_async(resource_group_name, service_name, sid, custom_headers).value! end # @@ -717,19 +692,15 @@ def regenerate_secondary_key_with_http_info(resource_group_name, service_name, s # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def regenerate_secondary_key_async(resource_group_name, service_name, sid, custom_headers:nil) + def regenerate_secondary_key_async(resource_group_name, service_name, sid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'sid is nil' if sid.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 @@ -774,8 +745,8 @@ def regenerate_secondary_key_async(resource_group_name, service_name, sid, custo # # @return [SubscriptionCollection] operation results. # - def list_by_service_next(next_page_link, custom_headers:nil) - response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -789,8 +760,8 @@ def list_by_service_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) - list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! end # @@ -803,12 +774,11 @@ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_next_async(next_page_link, custom_headers:nil) + def list_by_service_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 @@ -880,12 +850,12 @@ def list_by_service_next_async(next_page_link, custom_headers:nil) # @return [SubscriptionCollection] which provide lazy access to pages of the # response. # - def list_by_service_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_service_next_async(next_page_link, custom_headers:custom_headers) + list_by_service_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/tenant_access.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/tenant_access.rb index eef699977b..8e41763b65 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/tenant_access.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/tenant_access.rb @@ -31,8 +31,8 @@ def initialize(client) # # @return [AccessInformationContract] operation results. # - def get(resource_group_name, service_name, custom_headers:nil) - response = get_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, custom_headers = nil) + response = get_async(resource_group_name, service_name, custom_headers).value! response.body unless response.nil? end @@ -46,8 +46,8 @@ def get(resource_group_name, service_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, custom_headers:nil) - get_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, custom_headers = nil) + get_async(resource_group_name, service_name, custom_headers).value! end # @@ -60,18 +60,14 @@ def get_with_http_info(resource_group_name, service_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, custom_headers:nil) + def get_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 @@ -129,8 +125,8 @@ def get_async(resource_group_name, service_name, custom_headers:nil) # will be added to the HTTP request. # # - def update(resource_group_name, service_name, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, parameters, if_match, custom_headers).value! nil end @@ -148,8 +144,8 @@ def update(resource_group_name, service_name, parameters, if_match, custom_heade # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, parameters, if_match, custom_headers).value! end # @@ -166,12 +162,9 @@ def update_with_http_info(resource_group_name, service_name, parameters, if_matc # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -179,13 +172,14 @@ def update_async(resource_group_name, service_name, parameters, if_match, 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['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_07_07::Models::AccessInformationUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -231,8 +225,8 @@ def update_async(resource_group_name, service_name, parameters, if_match, custom # will be added to the HTTP request. # # - def regenerate_primary_key(resource_group_name, service_name, custom_headers:nil) - response = regenerate_primary_key_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def regenerate_primary_key(resource_group_name, service_name, custom_headers = nil) + response = regenerate_primary_key_async(resource_group_name, service_name, custom_headers).value! nil end @@ -246,8 +240,8 @@ def regenerate_primary_key(resource_group_name, service_name, custom_headers:nil # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def regenerate_primary_key_with_http_info(resource_group_name, service_name, custom_headers:nil) - regenerate_primary_key_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def regenerate_primary_key_with_http_info(resource_group_name, service_name, custom_headers = nil) + regenerate_primary_key_async(resource_group_name, service_name, custom_headers).value! end # @@ -260,18 +254,14 @@ def regenerate_primary_key_with_http_info(resource_group_name, service_name, cus # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def regenerate_primary_key_async(resource_group_name, service_name, custom_headers:nil) + def regenerate_primary_key_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 @@ -315,8 +305,8 @@ def regenerate_primary_key_async(resource_group_name, service_name, custom_heade # will be added to the HTTP request. # # - def regenerate_secondary_key(resource_group_name, service_name, custom_headers:nil) - response = regenerate_secondary_key_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def regenerate_secondary_key(resource_group_name, service_name, custom_headers = nil) + response = regenerate_secondary_key_async(resource_group_name, service_name, custom_headers).value! nil end @@ -330,8 +320,8 @@ def regenerate_secondary_key(resource_group_name, service_name, custom_headers:n # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def regenerate_secondary_key_with_http_info(resource_group_name, service_name, custom_headers:nil) - regenerate_secondary_key_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def regenerate_secondary_key_with_http_info(resource_group_name, service_name, custom_headers = nil) + regenerate_secondary_key_async(resource_group_name, service_name, custom_headers).value! end # @@ -344,18 +334,14 @@ def regenerate_secondary_key_with_http_info(resource_group_name, service_name, c # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def regenerate_secondary_key_async(resource_group_name, service_name, custom_headers:nil) + def regenerate_secondary_key_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/tenant_access_git.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/tenant_access_git.rb index 4a76237671..3d18c89d76 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/tenant_access_git.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/tenant_access_git.rb @@ -31,8 +31,8 @@ def initialize(client) # # @return [AccessInformationContract] operation results. # - def get(resource_group_name, service_name, custom_headers:nil) - response = get_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, custom_headers = nil) + response = get_async(resource_group_name, service_name, custom_headers).value! response.body unless response.nil? end @@ -46,8 +46,8 @@ def get(resource_group_name, service_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, custom_headers:nil) - get_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, custom_headers = nil) + get_async(resource_group_name, service_name, custom_headers).value! end # @@ -60,18 +60,14 @@ def get_with_http_info(resource_group_name, service_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, custom_headers:nil) + def get_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 @@ -125,8 +121,8 @@ def get_async(resource_group_name, service_name, custom_headers:nil) # will be added to the HTTP request. # # - def regenerate_primary_key(resource_group_name, service_name, custom_headers:nil) - response = regenerate_primary_key_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def regenerate_primary_key(resource_group_name, service_name, custom_headers = nil) + response = regenerate_primary_key_async(resource_group_name, service_name, custom_headers).value! nil end @@ -140,8 +136,8 @@ def regenerate_primary_key(resource_group_name, service_name, custom_headers:nil # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def regenerate_primary_key_with_http_info(resource_group_name, service_name, custom_headers:nil) - regenerate_primary_key_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def regenerate_primary_key_with_http_info(resource_group_name, service_name, custom_headers = nil) + regenerate_primary_key_async(resource_group_name, service_name, custom_headers).value! end # @@ -154,18 +150,14 @@ def regenerate_primary_key_with_http_info(resource_group_name, service_name, cus # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def regenerate_primary_key_async(resource_group_name, service_name, custom_headers:nil) + def regenerate_primary_key_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 @@ -209,8 +201,8 @@ def regenerate_primary_key_async(resource_group_name, service_name, custom_heade # will be added to the HTTP request. # # - def regenerate_secondary_key(resource_group_name, service_name, custom_headers:nil) - response = regenerate_secondary_key_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def regenerate_secondary_key(resource_group_name, service_name, custom_headers = nil) + response = regenerate_secondary_key_async(resource_group_name, service_name, custom_headers).value! nil end @@ -224,8 +216,8 @@ def regenerate_secondary_key(resource_group_name, service_name, custom_headers:n # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def regenerate_secondary_key_with_http_info(resource_group_name, service_name, custom_headers:nil) - regenerate_secondary_key_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def regenerate_secondary_key_with_http_info(resource_group_name, service_name, custom_headers = nil) + regenerate_secondary_key_async(resource_group_name, service_name, custom_headers).value! end # @@ -238,18 +230,14 @@ def regenerate_secondary_key_with_http_info(resource_group_name, service_name, c # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def regenerate_secondary_key_async(resource_group_name, service_name, custom_headers:nil) + def regenerate_secondary_key_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration.rb index d0fcb52fd9..dd4744d4f4 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration.rb @@ -35,8 +35,8 @@ def initialize(client) # # @return [OperationResultContract] operation results. # - def deploy(resource_group_name, service_name, parameters, custom_headers:nil) - response = deploy_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def deploy(resource_group_name, service_name, parameters, custom_headers = nil) + response = deploy_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -51,9 +51,9 @@ def deploy(resource_group_name, service_name, parameters, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def deploy_async(resource_group_name, service_name, parameters, custom_headers:nil) + def deploy_async(resource_group_name, service_name, parameters, custom_headers = nil) # Send request - promise = begin_deploy_async(resource_group_name, service_name, parameters, custom_headers:custom_headers) + promise = begin_deploy_async(resource_group_name, service_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -82,8 +82,8 @@ def deploy_async(resource_group_name, service_name, parameters, custom_headers:n # # @return [OperationResultContract] operation results. # - def save(resource_group_name, service_name, parameters, custom_headers:nil) - response = save_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def save(resource_group_name, service_name, parameters, custom_headers = nil) + response = save_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -97,9 +97,9 @@ def save(resource_group_name, service_name, parameters, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def save_async(resource_group_name, service_name, parameters, custom_headers:nil) + def save_async(resource_group_name, service_name, parameters, custom_headers = nil) # Send request - promise = begin_save_async(resource_group_name, service_name, parameters, custom_headers:custom_headers) + promise = begin_save_async(resource_group_name, service_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -128,8 +128,8 @@ def save_async(resource_group_name, service_name, parameters, custom_headers:nil # # @return [OperationResultContract] operation results. # - def validate(resource_group_name, service_name, parameters, custom_headers:nil) - response = validate_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def validate(resource_group_name, service_name, parameters, custom_headers = nil) + response = validate_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -144,9 +144,9 @@ def validate(resource_group_name, service_name, parameters, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def validate_async(resource_group_name, service_name, parameters, custom_headers:nil) + def validate_async(resource_group_name, service_name, parameters, custom_headers = nil) # Send request - promise = begin_validate_async(resource_group_name, service_name, parameters, custom_headers:custom_headers) + promise = begin_validate_async(resource_group_name, service_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -176,8 +176,8 @@ def validate_async(resource_group_name, service_name, parameters, custom_headers # # @return [OperationResultContract] operation results. # - def begin_deploy(resource_group_name, service_name, parameters, custom_headers:nil) - response = begin_deploy_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_deploy(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_deploy_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -195,8 +195,8 @@ def begin_deploy(resource_group_name, service_name, parameters, custom_headers:n # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_deploy_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) - begin_deploy_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_deploy_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_deploy_async(resource_group_name, service_name, parameters, custom_headers).value! end # @@ -213,24 +213,22 @@ def begin_deploy_with_http_info(resource_group_name, service_name, parameters, c # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_deploy_async(resource_group_name, service_name, parameters, custom_headers:nil) + def begin_deploy_async(resource_group_name, service_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_07_07::Models::DeployConfigurationParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -290,8 +288,8 @@ def begin_deploy_async(resource_group_name, service_name, parameters, custom_hea # # @return [OperationResultContract] operation results. # - def begin_save(resource_group_name, service_name, parameters, custom_headers:nil) - response = begin_save_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_save(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_save_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -308,8 +306,8 @@ def begin_save(resource_group_name, service_name, parameters, custom_headers:nil # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_save_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) - begin_save_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_save_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_save_async(resource_group_name, service_name, parameters, custom_headers).value! end # @@ -325,24 +323,22 @@ def begin_save_with_http_info(resource_group_name, service_name, parameters, cus # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_save_async(resource_group_name, service_name, parameters, custom_headers:nil) + def begin_save_async(resource_group_name, service_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_07_07::Models::SaveConfigurationParameter.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -402,8 +398,8 @@ def begin_save_async(resource_group_name, service_name, parameters, custom_heade # # @return [OperationResultContract] operation results. # - def begin_validate(resource_group_name, service_name, parameters, custom_headers:nil) - response = begin_validate_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_validate(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_validate_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -420,8 +416,8 @@ def begin_validate(resource_group_name, service_name, parameters, custom_headers # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_validate_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) - begin_validate_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_validate_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_validate_async(resource_group_name, service_name, parameters, custom_headers).value! end # @@ -437,24 +433,22 @@ def begin_validate_with_http_info(resource_group_name, service_name, parameters, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_validate_async(resource_group_name, service_name, parameters, custom_headers:nil) + def begin_validate_async(resource_group_name, service_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_07_07::Models::DeployConfigurationParameters.mapper() request_content = @client.serialize(request_mapper, parameters) diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration_sync_state.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration_sync_state.rb index e72b64edde..cfbccecc0f 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration_sync_state.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration_sync_state.rb @@ -32,8 +32,8 @@ def initialize(client) # # @return [TenantConfigurationSyncStateContract] operation results. # - def get(resource_group_name, service_name, custom_headers:nil) - response = get_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, custom_headers = nil) + response = get_async(resource_group_name, service_name, custom_headers).value! response.body unless response.nil? end @@ -48,8 +48,8 @@ def get(resource_group_name, service_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, custom_headers:nil) - get_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, custom_headers = nil) + get_async(resource_group_name, service_name, custom_headers).value! end # @@ -63,18 +63,14 @@ def get_with_http_info(resource_group_name, service_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, custom_headers:nil) + def get_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/user_groups.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/user_groups.rb index c615e5267d..cb53e54ef7 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/user_groups.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/user_groups.rb @@ -44,8 +44,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_user(resource_group_name, service_name, uid, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_user_as_lazy(resource_group_name, service_name, uid, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_user(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_user_as_lazy(resource_group_name, service_name, uid, filter, top, skip, custom_headers) first_page.get_all_items end @@ -72,8 +72,8 @@ def list_by_user(resource_group_name, service_name, uid, filter:nil, top:nil, sk # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_user_with_http_info(resource_group_name, service_name, uid, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_user_async(resource_group_name, service_name, uid, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_user_with_http_info(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_user_async(resource_group_name, service_name, uid, filter, top, skip, custom_headers).value! end # @@ -99,24 +99,15 @@ def list_by_user_with_http_info(resource_group_name, service_name, uid, filter:n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_user_async(resource_group_name, service_name, uid, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_user_async(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'uid is nil' if uid.nil? - fail ArgumentError, "'uid' should satisfy the constraint - 'MaxLength': '256'" if !uid.nil? && uid.length > 256 - fail ArgumentError, "'uid' should satisfy the constraint - 'MinLength': '1'" if !uid.nil? && uid.length < 1 - fail ArgumentError, "'uid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !uid.nil? && uid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -171,8 +162,8 @@ def list_by_user_async(resource_group_name, service_name, uid, filter:nil, top:n # # @return [GroupCollection] operation results. # - def list_by_user_next(next_page_link, custom_headers:nil) - response = list_by_user_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_user_next(next_page_link, custom_headers = nil) + response = list_by_user_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -186,8 +177,8 @@ def list_by_user_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_user_next_with_http_info(next_page_link, custom_headers:nil) - list_by_user_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_user_next_with_http_info(next_page_link, custom_headers = nil) + list_by_user_next_async(next_page_link, custom_headers).value! end # @@ -200,12 +191,11 @@ def list_by_user_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_user_next_async(next_page_link, custom_headers:nil) + def list_by_user_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 @@ -272,12 +262,12 @@ def list_by_user_next_async(next_page_link, custom_headers:nil) # # @return [GroupCollection] which provide lazy access to pages of the response. # - def list_by_user_as_lazy(resource_group_name, service_name, uid, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_user_async(resource_group_name, service_name, uid, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_user_as_lazy(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_user_async(resource_group_name, service_name, uid, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_user_next_async(next_page_link, custom_headers:custom_headers) + list_by_user_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/user_identities.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/user_identities.rb index ed5bb4d719..7219e52337 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/user_identities.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/user_identities.rb @@ -33,8 +33,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_user(resource_group_name, service_name, uid, custom_headers:nil) - response = list_by_user_async(resource_group_name, service_name, uid, custom_headers:custom_headers).value! + def list_by_user(resource_group_name, service_name, uid, custom_headers = nil) + response = list_by_user_async(resource_group_name, service_name, uid, custom_headers).value! response.body unless response.nil? end @@ -50,8 +50,8 @@ def list_by_user(resource_group_name, service_name, uid, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_user_with_http_info(resource_group_name, service_name, uid, custom_headers:nil) - list_by_user_async(resource_group_name, service_name, uid, custom_headers:custom_headers).value! + def list_by_user_with_http_info(resource_group_name, service_name, uid, custom_headers = nil) + list_by_user_async(resource_group_name, service_name, uid, custom_headers).value! end # @@ -66,22 +66,15 @@ def list_by_user_with_http_info(resource_group_name, service_name, uid, custom_h # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_user_async(resource_group_name, service_name, uid, custom_headers:nil) + def list_by_user_async(resource_group_name, service_name, uid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'uid is nil' if uid.nil? - fail ArgumentError, "'uid' should satisfy the constraint - 'MaxLength': '256'" if !uid.nil? && uid.length > 256 - fail ArgumentError, "'uid' should satisfy the constraint - 'MinLength': '1'" if !uid.nil? && uid.length < 1 - fail ArgumentError, "'uid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !uid.nil? && uid.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -114,13 +107,11 @@ def list_by_user_async(resource_group_name, service_name, uid, custom_headers:ni 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: 'UserIdentityContractElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/user_subscriptions.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/user_subscriptions.rb index 8642382b5b..2f41cb2475 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/user_subscriptions.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/user_subscriptions.rb @@ -50,8 +50,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_user(resource_group_name, service_name, uid, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_user_as_lazy(resource_group_name, service_name, uid, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_user(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_user_as_lazy(resource_group_name, service_name, uid, filter, top, skip, custom_headers) first_page.get_all_items end @@ -84,8 +84,8 @@ def list_by_user(resource_group_name, service_name, uid, filter:nil, top:nil, sk # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_user_with_http_info(resource_group_name, service_name, uid, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_user_async(resource_group_name, service_name, uid, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_user_with_http_info(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_user_async(resource_group_name, service_name, uid, filter, top, skip, custom_headers).value! end # @@ -117,24 +117,15 @@ def list_by_user_with_http_info(resource_group_name, service_name, uid, filter:n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_user_async(resource_group_name, service_name, uid, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_user_async(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'uid is nil' if uid.nil? - fail ArgumentError, "'uid' should satisfy the constraint - 'MaxLength': '256'" if !uid.nil? && uid.length > 256 - fail ArgumentError, "'uid' should satisfy the constraint - 'MinLength': '1'" if !uid.nil? && uid.length < 1 - fail ArgumentError, "'uid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !uid.nil? && uid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -189,8 +180,8 @@ def list_by_user_async(resource_group_name, service_name, uid, filter:nil, top:n # # @return [SubscriptionCollection] operation results. # - def list_by_user_next(next_page_link, custom_headers:nil) - response = list_by_user_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_user_next(next_page_link, custom_headers = nil) + response = list_by_user_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -204,8 +195,8 @@ def list_by_user_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_user_next_with_http_info(next_page_link, custom_headers:nil) - list_by_user_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_user_next_with_http_info(next_page_link, custom_headers = nil) + list_by_user_next_async(next_page_link, custom_headers).value! end # @@ -218,12 +209,11 @@ def list_by_user_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_user_next_async(next_page_link, custom_headers:nil) + def list_by_user_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 @@ -297,12 +287,12 @@ def list_by_user_next_async(next_page_link, custom_headers:nil) # @return [SubscriptionCollection] which provide lazy access to pages of the # response. # - def list_by_user_as_lazy(resource_group_name, service_name, uid, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_user_async(resource_group_name, service_name, uid, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_user_as_lazy(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_user_async(resource_group_name, service_name, uid, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_user_next_async(next_page_link, custom_headers:custom_headers) + list_by_user_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/users.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/users.rb index 8927418202..8e08aa9346 100644 --- a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/users.rb +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/users.rb @@ -50,8 +50,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_service_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) first_page.get_all_items end @@ -84,8 +84,8 @@ def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! end # @@ -117,20 +117,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, filter:nil # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -187,8 +181,8 @@ def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil # # @return [UserContract] operation results. # - def get(resource_group_name, service_name, uid, custom_headers:nil) - response = get_async(resource_group_name, service_name, uid, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, uid, custom_headers = nil) + response = get_async(resource_group_name, service_name, uid, custom_headers).value! response.body unless response.nil? end @@ -204,8 +198,8 @@ def get(resource_group_name, service_name, uid, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, uid, custom_headers:nil) - get_async(resource_group_name, service_name, uid, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, uid, custom_headers = nil) + get_async(resource_group_name, service_name, uid, custom_headers).value! end # @@ -220,22 +214,15 @@ def get_with_http_info(resource_group_name, service_name, uid, custom_headers:ni # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, uid, custom_headers:nil) + def get_async(resource_group_name, service_name, uid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'uid is nil' if uid.nil? - fail ArgumentError, "'uid' should satisfy the constraint - 'MaxLength': '256'" if !uid.nil? && uid.length > 256 - fail ArgumentError, "'uid' should satisfy the constraint - 'MinLength': '1'" if !uid.nil? && uid.length < 1 - fail ArgumentError, "'uid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !uid.nil? && uid.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -292,8 +279,8 @@ def get_async(resource_group_name, service_name, uid, custom_headers:nil) # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, uid, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, uid, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, uid, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, uid, parameters, custom_headers).value! nil end @@ -310,8 +297,8 @@ def create_or_update(resource_group_name, service_name, uid, parameters, custom_ # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, uid, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, uid, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, uid, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, uid, parameters, custom_headers).value! end # @@ -327,28 +314,23 @@ def create_or_update_with_http_info(resource_group_name, service_name, uid, para # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, uid, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, uid, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'uid is nil' if uid.nil? - fail ArgumentError, "'uid' should satisfy the constraint - 'MaxLength': '256'" if !uid.nil? && uid.length > 256 - fail ArgumentError, "'uid' should satisfy the constraint - 'MinLength': '1'" if !uid.nil? && uid.length < 1 - fail ArgumentError, "'uid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !uid.nil? && uid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_07_07::Models::UserCreateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -401,8 +383,8 @@ def create_or_update_async(resource_group_name, service_name, uid, parameters, c # # @return [ErrorBodyContract] operation results. # - def update(resource_group_name, service_name, uid, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, uid, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, uid, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, uid, parameters, if_match, custom_headers).value! response.body unless response.nil? end @@ -422,8 +404,8 @@ def update(resource_group_name, service_name, uid, parameters, if_match, custom_ # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, uid, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, uid, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, uid, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, uid, parameters, if_match, custom_headers).value! end # @@ -442,16 +424,10 @@ def update_with_http_info(resource_group_name, service_name, uid, parameters, if # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, uid, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, uid, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'uid is nil' if uid.nil? - fail ArgumentError, "'uid' should satisfy the constraint - 'MaxLength': '256'" if !uid.nil? && uid.length > 256 - fail ArgumentError, "'uid' should satisfy the constraint - 'MinLength': '1'" if !uid.nil? && uid.length < 1 - fail ArgumentError, "'uid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !uid.nil? && uid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -459,13 +435,14 @@ def update_async(resource_group_name, service_name, uid, parameters, if_match, 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['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_07_07::Models::UserUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -529,8 +506,8 @@ def update_async(resource_group_name, service_name, uid, parameters, if_match, c # # @return [ErrorBodyContract] operation results. # - def delete(resource_group_name, service_name, uid, if_match, delete_subscriptions:nil, custom_headers:nil) - response = delete_async(resource_group_name, service_name, uid, if_match, delete_subscriptions:delete_subscriptions, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, uid, if_match, delete_subscriptions = nil, custom_headers = nil) + response = delete_async(resource_group_name, service_name, uid, if_match, delete_subscriptions, custom_headers).value! response.body unless response.nil? end @@ -551,8 +528,8 @@ def delete(resource_group_name, service_name, uid, if_match, delete_subscription # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, uid, if_match, delete_subscriptions:nil, custom_headers:nil) - delete_async(resource_group_name, service_name, uid, if_match, delete_subscriptions:delete_subscriptions, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, uid, if_match, delete_subscriptions = nil, custom_headers = nil) + delete_async(resource_group_name, service_name, uid, if_match, delete_subscriptions, custom_headers).value! end # @@ -572,23 +549,16 @@ def delete_with_http_info(resource_group_name, service_name, uid, if_match, dele # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, uid, if_match, delete_subscriptions:nil, custom_headers:nil) + def delete_async(resource_group_name, service_name, uid, if_match, delete_subscriptions = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'uid is nil' if uid.nil? - fail ArgumentError, "'uid' should satisfy the constraint - 'MaxLength': '256'" if !uid.nil? && uid.length > 256 - fail ArgumentError, "'uid' should satisfy the constraint - 'MinLength': '1'" if !uid.nil? && uid.length < 1 - fail ArgumentError, "'uid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !uid.nil? && uid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'if_match is nil' if if_match.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 @@ -647,8 +617,8 @@ def delete_async(resource_group_name, service_name, uid, if_match, delete_subscr # # @return [GenerateSsoUrlResult] operation results. # - def generate_sso_url(resource_group_name, service_name, uid, custom_headers:nil) - response = generate_sso_url_async(resource_group_name, service_name, uid, custom_headers:custom_headers).value! + def generate_sso_url(resource_group_name, service_name, uid, custom_headers = nil) + response = generate_sso_url_async(resource_group_name, service_name, uid, custom_headers).value! response.body unless response.nil? end @@ -665,8 +635,8 @@ def generate_sso_url(resource_group_name, service_name, uid, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def generate_sso_url_with_http_info(resource_group_name, service_name, uid, custom_headers:nil) - generate_sso_url_async(resource_group_name, service_name, uid, custom_headers:custom_headers).value! + def generate_sso_url_with_http_info(resource_group_name, service_name, uid, custom_headers = nil) + generate_sso_url_async(resource_group_name, service_name, uid, custom_headers).value! end # @@ -682,22 +652,15 @@ def generate_sso_url_with_http_info(resource_group_name, service_name, uid, cust # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def generate_sso_url_async(resource_group_name, service_name, uid, custom_headers:nil) + def generate_sso_url_async(resource_group_name, service_name, uid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'uid is nil' if uid.nil? - fail ArgumentError, "'uid' should satisfy the constraint - 'MaxLength': '256'" if !uid.nil? && uid.length > 256 - fail ArgumentError, "'uid' should satisfy the constraint - 'MinLength': '1'" if !uid.nil? && uid.length < 1 - fail ArgumentError, "'uid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !uid.nil? && uid.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -752,8 +715,8 @@ def generate_sso_url_async(resource_group_name, service_name, uid, custom_header # # @return [UserCollection] operation results. # - def list_by_service_next(next_page_link, custom_headers:nil) - response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -767,8 +730,8 @@ def list_by_service_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) - list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! end # @@ -781,12 +744,11 @@ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_next_async(next_page_link, custom_headers:nil) + def list_by_service_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 @@ -859,12 +821,12 @@ def list_by_service_next_async(next_page_link, custom_headers:nil) # # @return [UserCollection] which provide lazy access to pages of the response. # - def list_by_service_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_service_next_async(next_page_link, custom_headers:custom_headers) + list_by_service_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/version.rb b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/version.rb new file mode 100644 index 0000000000..bc156d6133 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/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::ApiManagement::Mgmt::V2016_07_07 + VERSION = '0.17.0' +end diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_export.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_export.rb index dec2b9c718..bf58a6669f 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_export.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_export.rb @@ -33,8 +33,8 @@ def initialize(client) # # @return [ApiExportResult] operation results. # - def get(resource_group_name, service_name, api_id, custom_headers:nil) - response = get_async(resource_group_name, service_name, api_id, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, api_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, api_id, custom_headers).value! response.body unless response.nil? end @@ -50,8 +50,8 @@ def get(resource_group_name, service_name, api_id, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, api_id, custom_headers:nil) - get_async(resource_group_name, service_name, api_id, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, api_id, custom_headers = nil) + get_async(resource_group_name, service_name, api_id, custom_headers).value! end # @@ -66,22 +66,15 @@ def get_with_http_info(resource_group_name, service_name, api_id, custom_headers # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, api_id, custom_headers:nil) + def get_async(resource_group_name, service_name, api_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb index 7066adcf1a..743a4c5b8e 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb @@ -25,16 +25,15 @@ class ApiManagementClient < MsRestAzure::AzureServiceClient # for every service call. attr_accessor :subscription_id - # @return [String] The preferred language for the response. + # @return [String] Gets or sets the preferred language for the response. attr_accessor :accept_language - # @return [Integer] The retry timeout in seconds for Long Running - # Operations. Default value is 30. + # @return [Integer] Gets or sets the retry timeout in seconds for Long + # Running Operations. Default value is 30. attr_accessor :long_running_operation_retry_timeout - # @return [Boolean] Whether a unique x-ms-client-request-id should be - # generated. When set to true a unique x-ms-client-request-id value is - # generated and included in each request. Default is true. + # @return [Boolean] When set to true a unique x-ms-client-request-id value + # is generated and included in each request. Default is true. attr_accessor :generate_client_request_id # @return [PolicySnippets] policy_snippets @@ -259,9 +258,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? @@ -278,7 +274,9 @@ def make_request_async(method, path, options = {}) # def add_telemetry sdk_information = 'azure_mgmt_api_management' - sdk_information = "#{sdk_information}/0.18.1" + if defined? Azure::ApiManagement::Mgmt::V2016_10_10::VERSION + sdk_information = "#{sdk_information}/#{Azure::ApiManagement::Mgmt::V2016_10_10::VERSION}" + end add_user_agent_information(sdk_information) end end diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_operations.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_operations.rb index 06c392510d..c57dbf42b6 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_operations.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_operations.rb @@ -30,8 +30,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 @@ -44,8 +44,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 @@ -117,8 +116,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 @@ -133,8 +132,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 # @@ -148,12 +147,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 @@ -207,12 +205,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_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_services.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_services.rb index 613f1d33c9..bdc5c5a077 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_services.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_services.rb @@ -36,8 +36,8 @@ def initialize(client) # # @return [ApiManagementServiceResource] operation results. # - def manage_deployments(resource_group_name, service_name, parameters, custom_headers:nil) - response = manage_deployments_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def manage_deployments(resource_group_name, service_name, parameters, custom_headers = nil) + response = manage_deployments_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -52,9 +52,9 @@ def manage_deployments(resource_group_name, service_name, parameters, custom_hea # @return [Concurrent::Promise] promise which provides async access to http # response. # - def manage_deployments_async(resource_group_name, service_name, parameters, custom_headers:nil) + def manage_deployments_async(resource_group_name, service_name, parameters, custom_headers = nil) # Send request - promise = begin_manage_deployments_async(resource_group_name, service_name, parameters, custom_headers:custom_headers) + promise = begin_manage_deployments_async(resource_group_name, service_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -84,8 +84,8 @@ def manage_deployments_async(resource_group_name, service_name, parameters, cust # # @return [ApiManagementServiceResource] operation results. # - def restore(resource_group_name, service_name, parameters, custom_headers:nil) - response = restore_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def restore(resource_group_name, service_name, parameters, custom_headers = nil) + response = restore_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -100,9 +100,9 @@ def restore(resource_group_name, service_name, parameters, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def restore_async(resource_group_name, service_name, parameters, custom_headers:nil) + def restore_async(resource_group_name, service_name, parameters, custom_headers = nil) # Send request - promise = begin_restore_async(resource_group_name, service_name, parameters, custom_headers:custom_headers) + promise = begin_restore_async(resource_group_name, service_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -132,8 +132,8 @@ def restore_async(resource_group_name, service_name, parameters, custom_headers: # # @return [ApiManagementServiceResource] operation results. # - def backup(resource_group_name, service_name, parameters, custom_headers:nil) - response = backup_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def backup(resource_group_name, service_name, parameters, custom_headers = nil) + response = backup_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -148,9 +148,9 @@ def backup(resource_group_name, service_name, parameters, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def backup_async(resource_group_name, service_name, parameters, custom_headers:nil) + def backup_async(resource_group_name, service_name, parameters, custom_headers = nil) # Send request - promise = begin_backup_async(resource_group_name, service_name, parameters, custom_headers:custom_headers) + promise = begin_backup_async(resource_group_name, service_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -179,8 +179,8 @@ def backup_async(resource_group_name, service_name, parameters, custom_headers:n # # @return [ApiManagementServiceResource] operation results. # - def create_or_update(resource_group_name, service_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -197,8 +197,8 @@ def create_or_update(resource_group_name, service_name, parameters, custom_heade # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, parameters, custom_headers).value! end # @@ -214,24 +214,22 @@ def create_or_update_with_http_info(resource_group_name, service_name, parameter # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_10_10::Models::ApiManagementServiceResource.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -300,8 +298,8 @@ def create_or_update_async(resource_group_name, service_name, parameters, custom # # @return [ApiManagementServiceResource] operation results. # - def update(resource_group_name, service_name, parameters, custom_headers:nil) - response = update_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -316,9 +314,9 @@ def update(resource_group_name, service_name, parameters, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def update_async(resource_group_name, service_name, parameters, custom_headers:nil) + def update_async(resource_group_name, service_name, parameters, custom_headers = nil) # Send request - promise = begin_update_async(resource_group_name, service_name, parameters, custom_headers:custom_headers) + promise = begin_update_async(resource_group_name, service_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -344,8 +342,8 @@ def update_async(resource_group_name, service_name, parameters, custom_headers:n # # @return [ApiManagementServiceResource] operation results. # - def get(resource_group_name, service_name, custom_headers:nil) - response = get_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, custom_headers = nil) + response = get_async(resource_group_name, service_name, custom_headers).value! response.body unless response.nil? end @@ -359,8 +357,8 @@ def get(resource_group_name, service_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, custom_headers:nil) - get_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, custom_headers = nil) + get_async(resource_group_name, service_name, custom_headers).value! end # @@ -373,18 +371,14 @@ def get_with_http_info(resource_group_name, service_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, custom_headers:nil) + def get_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 @@ -438,8 +432,8 @@ def get_async(resource_group_name, service_name, custom_headers:nil) # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, custom_headers:nil) - response = delete_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, custom_headers = nil) + response = delete_async(resource_group_name, service_name, custom_headers).value! nil end @@ -453,8 +447,8 @@ def delete(resource_group_name, service_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, custom_headers:nil) - delete_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, custom_headers = nil) + delete_async(resource_group_name, service_name, custom_headers).value! end # @@ -467,18 +461,14 @@ def delete_with_http_info(resource_group_name, service_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, custom_headers:nil) + def delete_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 @@ -522,8 +512,8 @@ def delete_async(resource_group_name, service_name, 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 @@ -536,8 +526,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 # @@ -549,14 +539,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.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 @@ -609,8 +598,8 @@ def list_by_resource_group_async(resource_group_name, custom_headers:nil) # # @return [Array] operation results. # - def list(custom_headers:nil) - first_page = list_as_lazy(custom_headers:custom_headers) + def list(custom_headers = nil) + first_page = list_as_lazy(custom_headers) first_page.get_all_items end @@ -622,8 +611,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 # @@ -634,13 +623,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 @@ -696,8 +684,8 @@ def list_async(custom_headers:nil) # # @return [ApiManagementServiceGetSsoTokenResult] operation results. # - def get_sso_token(resource_group_name, service_name, custom_headers:nil) - response = get_sso_token_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get_sso_token(resource_group_name, service_name, custom_headers = nil) + response = get_sso_token_async(resource_group_name, service_name, custom_headers).value! response.body unless response.nil? end @@ -712,8 +700,8 @@ def get_sso_token(resource_group_name, service_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_sso_token_with_http_info(resource_group_name, service_name, custom_headers:nil) - get_sso_token_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get_sso_token_with_http_info(resource_group_name, service_name, custom_headers = nil) + get_sso_token_async(resource_group_name, service_name, custom_headers).value! end # @@ -727,18 +715,14 @@ def get_sso_token_with_http_info(resource_group_name, service_name, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_sso_token_async(resource_group_name, service_name, custom_headers:nil) + def get_sso_token_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 @@ -793,8 +777,8 @@ def get_sso_token_async(resource_group_name, service_name, custom_headers:nil) # # @return [ApiManagementServiceNameAvailabilityResult] 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 @@ -808,8 +792,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 # @@ -822,19 +806,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, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + request_headers['Content-Type'] = 'application/json; charset=utf-8' + # Serialize Request request_mapper = Azure::ApiManagement::Mgmt::V2016_10_10::Models::ApiManagementServiceCheckNameAvailabilityParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -894,8 +879,8 @@ def check_name_availability_async(parameters, custom_headers:nil) # # @return [CertificateInformation] operation results. # - def upload_certificate(resource_group_name, service_name, parameters, custom_headers:nil) - response = upload_certificate_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def upload_certificate(resource_group_name, service_name, parameters, custom_headers = nil) + response = upload_certificate_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -912,8 +897,8 @@ def upload_certificate(resource_group_name, service_name, parameters, custom_hea # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def upload_certificate_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) - upload_certificate_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def upload_certificate_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + upload_certificate_async(resource_group_name, service_name, parameters, custom_headers).value! end # @@ -929,24 +914,22 @@ def upload_certificate_with_http_info(resource_group_name, service_name, paramet # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def upload_certificate_async(resource_group_name, service_name, parameters, custom_headers:nil) + def upload_certificate_async(resource_group_name, service_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_10_10::Models::ApiManagementServiceUploadCertificateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1007,8 +990,8 @@ def upload_certificate_async(resource_group_name, service_name, parameters, cust # # @return [ApiManagementServiceResource] operation results. # - def update_hostname(resource_group_name, service_name, parameters, custom_headers:nil) - response = update_hostname_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def update_hostname(resource_group_name, service_name, parameters, custom_headers = nil) + response = update_hostname_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1023,9 +1006,9 @@ def update_hostname(resource_group_name, service_name, parameters, custom_header # @return [Concurrent::Promise] promise which provides async access to http # response. # - def update_hostname_async(resource_group_name, service_name, parameters, custom_headers:nil) + def update_hostname_async(resource_group_name, service_name, parameters, custom_headers = nil) # Send request - promise = begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers:custom_headers) + promise = begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -1052,8 +1035,8 @@ def update_hostname_async(resource_group_name, service_name, parameters, custom_ # # @return [ApiManagementServiceResource] operation results. # - def apply_network_configuration_updates(resource_group_name, service_name, custom_headers:nil) - response = apply_network_configuration_updates_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def apply_network_configuration_updates(resource_group_name, service_name, custom_headers = nil) + response = apply_network_configuration_updates_async(resource_group_name, service_name, custom_headers).value! response.body unless response.nil? end @@ -1066,9 +1049,9 @@ def apply_network_configuration_updates(resource_group_name, service_name, custo # @return [Concurrent::Promise] promise which provides async access to http # response. # - def apply_network_configuration_updates_async(resource_group_name, service_name, custom_headers:nil) + def apply_network_configuration_updates_async(resource_group_name, service_name, custom_headers = nil) # Send request - promise = begin_apply_network_configuration_updates_async(resource_group_name, service_name, custom_headers:custom_headers) + promise = begin_apply_network_configuration_updates_async(resource_group_name, service_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -1099,8 +1082,8 @@ def apply_network_configuration_updates_async(resource_group_name, service_name, # # @return [ApiManagementServiceResource] operation results. # - def begin_manage_deployments(resource_group_name, service_name, parameters, custom_headers:nil) - response = begin_manage_deployments_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_manage_deployments(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_manage_deployments_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1119,8 +1102,8 @@ def begin_manage_deployments(resource_group_name, service_name, parameters, cust # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_manage_deployments_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) - begin_manage_deployments_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_manage_deployments_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_manage_deployments_async(resource_group_name, service_name, parameters, custom_headers).value! end # @@ -1138,24 +1121,22 @@ def begin_manage_deployments_with_http_info(resource_group_name, service_name, p # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_manage_deployments_async(resource_group_name, service_name, parameters, custom_headers:nil) + def begin_manage_deployments_async(resource_group_name, service_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_10_10::Models::ApiManagementServiceManageDeploymentsParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1226,8 +1207,8 @@ def begin_manage_deployments_async(resource_group_name, service_name, parameters # # @return [ApiManagementServiceResource] operation results. # - def begin_restore(resource_group_name, service_name, parameters, custom_headers:nil) - response = begin_restore_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_restore(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_restore_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1245,8 +1226,8 @@ def begin_restore(resource_group_name, service_name, parameters, custom_headers: # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_restore_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) - begin_restore_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_restore_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_restore_async(resource_group_name, service_name, parameters, custom_headers).value! end # @@ -1263,24 +1244,22 @@ def begin_restore_with_http_info(resource_group_name, service_name, parameters, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_restore_async(resource_group_name, service_name, parameters, custom_headers:nil) + def begin_restore_async(resource_group_name, service_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_10_10::Models::ApiManagementServiceBackupRestoreParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1341,8 +1320,8 @@ def begin_restore_async(resource_group_name, service_name, parameters, custom_he # # @return [ApiManagementServiceResource] operation results. # - def begin_backup(resource_group_name, service_name, parameters, custom_headers:nil) - response = begin_backup_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_backup(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_backup_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1360,8 +1339,8 @@ def begin_backup(resource_group_name, service_name, parameters, custom_headers:n # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_backup_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) - begin_backup_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_backup_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_backup_async(resource_group_name, service_name, parameters, custom_headers).value! end # @@ -1378,24 +1357,22 @@ def begin_backup_with_http_info(resource_group_name, service_name, parameters, c # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_backup_async(resource_group_name, service_name, parameters, custom_headers:nil) + def begin_backup_async(resource_group_name, service_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_10_10::Models::ApiManagementServiceBackupRestoreParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1454,8 +1431,8 @@ def begin_backup_async(resource_group_name, service_name, parameters, custom_hea # # @return [ApiManagementServiceResource] operation results. # - def begin_update(resource_group_name, service_name, parameters, custom_headers:nil) - response = begin_update_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_update(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_update_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1471,8 +1448,8 @@ def begin_update(resource_group_name, service_name, parameters, custom_headers:n # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_update_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) - begin_update_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_update_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_update_async(resource_group_name, service_name, parameters, custom_headers).value! end # @@ -1487,24 +1464,22 @@ def begin_update_with_http_info(resource_group_name, service_name, parameters, c # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_update_async(resource_group_name, service_name, parameters, custom_headers:nil) + def begin_update_async(resource_group_name, service_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_10_10::Models::ApiManagementServiceUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1565,8 +1540,8 @@ def begin_update_async(resource_group_name, service_name, parameters, custom_hea # # @return [ApiManagementServiceResource] operation results. # - def begin_update_hostname(resource_group_name, service_name, parameters, custom_headers:nil) - response = begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_update_hostname(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -1584,8 +1559,8 @@ def begin_update_hostname(resource_group_name, service_name, parameters, custom_ # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_update_hostname_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) - begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_update_hostname_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers).value! end # @@ -1602,24 +1577,22 @@ def begin_update_hostname_with_http_info(resource_group_name, service_name, para # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers:nil) + def begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_10_10::Models::ApiManagementServiceUpdateHostnameParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -1687,8 +1660,8 @@ def begin_update_hostname_async(resource_group_name, service_name, parameters, c # # @return [ApiManagementServiceResource] operation results. # - def begin_apply_network_configuration_updates(resource_group_name, service_name, custom_headers:nil) - response = begin_apply_network_configuration_updates_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def begin_apply_network_configuration_updates(resource_group_name, service_name, custom_headers = nil) + response = begin_apply_network_configuration_updates_async(resource_group_name, service_name, custom_headers).value! response.body unless response.nil? end @@ -1703,8 +1676,8 @@ def begin_apply_network_configuration_updates(resource_group_name, service_name, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_apply_network_configuration_updates_with_http_info(resource_group_name, service_name, custom_headers:nil) - begin_apply_network_configuration_updates_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def begin_apply_network_configuration_updates_with_http_info(resource_group_name, service_name, custom_headers = nil) + begin_apply_network_configuration_updates_async(resource_group_name, service_name, custom_headers).value! end # @@ -1718,18 +1691,14 @@ def begin_apply_network_configuration_updates_with_http_info(resource_group_name # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_apply_network_configuration_updates_async(resource_group_name, service_name, custom_headers:nil) + def begin_apply_network_configuration_updates_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 @@ -1784,8 +1753,8 @@ def begin_apply_network_configuration_updates_async(resource_group_name, service # # @return [ApiManagementServiceListResult] 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 @@ -1799,8 +1768,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 # @@ -1813,12 +1782,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 @@ -1872,8 +1840,8 @@ def list_by_resource_group_next_async(next_page_link, custom_headers:nil) # # @return [ApiManagementServiceListResult] 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 @@ -1887,8 +1855,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 # @@ -1901,12 +1869,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 @@ -1960,12 +1927,12 @@ def list_next_async(next_page_link, custom_headers:nil) # @return [ApiManagementServiceListResult] 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 @@ -1980,12 +1947,12 @@ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil) # @return [ApiManagementServiceListResult] 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_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_operations.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_operations.rb index d1faa05c57..47ad4901d6 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_operations.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_operations.rb @@ -42,8 +42,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_apis(resource_group_name, service_name, api_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_apis_as_lazy(resource_group_name, service_name, api_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_apis(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_apis_as_lazy(resource_group_name, service_name, api_id, filter, top, skip, custom_headers) first_page.get_all_items end @@ -68,8 +68,8 @@ def list_by_apis(resource_group_name, service_name, api_id, filter:nil, top:nil, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_apis_with_http_info(resource_group_name, service_name, api_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_apis_async(resource_group_name, service_name, api_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_apis_with_http_info(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_apis_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! end # @@ -93,24 +93,15 @@ def list_by_apis_with_http_info(resource_group_name, service_name, api_id, filte # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_apis_async(resource_group_name, service_name, api_id, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_apis_async(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -169,8 +160,8 @@ def list_by_apis_async(resource_group_name, service_name, api_id, filter:nil, to # # @return [OperationContract] operation results. # - def get(resource_group_name, service_name, api_id, operation_id, custom_headers:nil) - response = get_async(resource_group_name, service_name, api_id, operation_id, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, api_id, operation_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, api_id, operation_id, custom_headers).value! response.body unless response.nil? end @@ -188,8 +179,8 @@ def get(resource_group_name, service_name, api_id, operation_id, custom_headers: # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, api_id, operation_id, custom_headers:nil) - get_async(resource_group_name, service_name, api_id, operation_id, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, api_id, operation_id, custom_headers = nil) + get_async(resource_group_name, service_name, api_id, operation_id, custom_headers).value! end # @@ -206,26 +197,16 @@ def get_with_http_info(resource_group_name, service_name, api_id, operation_id, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, api_id, operation_id, custom_headers:nil) + def get_async(resource_group_name, service_name, api_id, operation_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'operation_id is nil' if operation_id.nil? - fail ArgumentError, "'operation_id' should satisfy the constraint - 'MaxLength': '256'" if !operation_id.nil? && operation_id.length > 256 - fail ArgumentError, "'operation_id' should satisfy the constraint - 'MinLength': '1'" if !operation_id.nil? && operation_id.length < 1 - fail ArgumentError, "'operation_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !operation_id.nil? && operation_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -284,8 +265,8 @@ def get_async(resource_group_name, service_name, api_id, operation_id, custom_he # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, api_id, operation_id, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, api_id, operation_id, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, api_id, operation_id, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, api_id, operation_id, parameters, custom_headers).value! nil end @@ -304,8 +285,8 @@ def create_or_update(resource_group_name, service_name, api_id, operation_id, pa # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, api_id, operation_id, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, api_id, operation_id, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, api_id, operation_id, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, api_id, operation_id, parameters, custom_headers).value! end # @@ -323,32 +304,24 @@ def create_or_update_with_http_info(resource_group_name, service_name, api_id, o # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, api_id, operation_id, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, api_id, operation_id, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'operation_id is nil' if operation_id.nil? - fail ArgumentError, "'operation_id' should satisfy the constraint - 'MaxLength': '256'" if !operation_id.nil? && operation_id.length > 256 - fail ArgumentError, "'operation_id' should satisfy the constraint - 'MinLength': '1'" if !operation_id.nil? && operation_id.length < 1 - fail ArgumentError, "'operation_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !operation_id.nil? && operation_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_10_10::Models::OperationContract.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -402,8 +375,8 @@ def create_or_update_async(resource_group_name, service_name, api_id, operation_ # will be added to the HTTP request. # # - def update(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers).value! nil end @@ -425,8 +398,8 @@ def update(resource_group_name, service_name, api_id, operation_id, parameters, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers).value! end # @@ -447,20 +420,11 @@ def update_with_http_info(resource_group_name, service_name, api_id, operation_i # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'operation_id is nil' if operation_id.nil? - fail ArgumentError, "'operation_id' should satisfy the constraint - 'MaxLength': '256'" if !operation_id.nil? && operation_id.length > 256 - fail ArgumentError, "'operation_id' should satisfy the constraint - 'MinLength': '1'" if !operation_id.nil? && operation_id.length < 1 - fail ArgumentError, "'operation_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !operation_id.nil? && operation_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -468,13 +432,14 @@ def update_async(resource_group_name, service_name, api_id, operation_id, 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['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_10_10::Models::OperationUpdateContract.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -527,8 +492,8 @@ def update_async(resource_group_name, service_name, api_id, operation_id, parame # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers).value! nil end @@ -549,8 +514,8 @@ def delete(resource_group_name, service_name, api_id, operation_id, if_match, cu # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers).value! end # @@ -570,27 +535,17 @@ def delete_with_http_info(resource_group_name, service_name, api_id, operation_i # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'operation_id is nil' if operation_id.nil? - fail ArgumentError, "'operation_id' should satisfy the constraint - 'MaxLength': '256'" if !operation_id.nil? && operation_id.length > 256 - fail ArgumentError, "'operation_id' should satisfy the constraint - 'MinLength': '1'" if !operation_id.nil? && operation_id.length < 1 - fail ArgumentError, "'operation_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !operation_id.nil? && operation_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'if_match is nil' if if_match.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 @@ -636,8 +591,8 @@ def delete_async(resource_group_name, service_name, api_id, operation_id, if_mat # # @return [OperationCollection] operation results. # - def list_by_apis_next(next_page_link, custom_headers:nil) - response = list_by_apis_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_apis_next(next_page_link, custom_headers = nil) + response = list_by_apis_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -651,8 +606,8 @@ def list_by_apis_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_apis_next_with_http_info(next_page_link, custom_headers:nil) - list_by_apis_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_apis_next_with_http_info(next_page_link, custom_headers = nil) + list_by_apis_next_async(next_page_link, custom_headers).value! end # @@ -665,12 +620,11 @@ def list_by_apis_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_apis_next_async(next_page_link, custom_headers:nil) + def list_by_apis_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 @@ -736,12 +690,12 @@ def list_by_apis_next_async(next_page_link, custom_headers:nil) # @return [OperationCollection] which provide lazy access to pages of the # response. # - def list_by_apis_as_lazy(resource_group_name, service_name, api_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_apis_async(resource_group_name, service_name, api_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_apis_as_lazy(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_apis_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_apis_next_async(next_page_link, custom_headers:custom_headers) + list_by_apis_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_operations_policy.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_operations_policy.rb index a056847ec4..e5a6c87938 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_operations_policy.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_operations_policy.rb @@ -35,8 +35,8 @@ def initialize(client) # # @return [NOT_IMPLEMENTED] operation results. # - def get(resource_group_name, service_name, api_id, operation_id, custom_headers:nil) - response = get_async(resource_group_name, service_name, api_id, operation_id, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, api_id, operation_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, api_id, operation_id, custom_headers).value! response.body unless response.nil? end @@ -54,8 +54,8 @@ def get(resource_group_name, service_name, api_id, operation_id, custom_headers: # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, api_id, operation_id, custom_headers:nil) - get_async(resource_group_name, service_name, api_id, operation_id, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, api_id, operation_id, custom_headers = nil) + get_async(resource_group_name, service_name, api_id, operation_id, custom_headers).value! end # @@ -72,26 +72,16 @@ def get_with_http_info(resource_group_name, service_name, api_id, operation_id, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, api_id, operation_id, custom_headers:nil) + def get_async(resource_group_name, service_name, api_id, operation_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'operation_id is nil' if operation_id.nil? - fail ArgumentError, "'operation_id' should satisfy the constraint - 'MaxLength': '256'" if !operation_id.nil? && operation_id.length > 256 - fail ArgumentError, "'operation_id' should satisfy the constraint - 'MinLength': '1'" if !operation_id.nil? && operation_id.length < 1 - fail ArgumentError, "'operation_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !operation_id.nil? && operation_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -124,7 +114,6 @@ def get_async(resource_group_name, service_name, api_id, operation_id, custom_he 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: { @@ -160,8 +149,8 @@ def get_async(resource_group_name, service_name, api_id, operation_id, custom_he # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers).value! nil end @@ -183,8 +172,8 @@ def create_or_update(resource_group_name, service_name, api_id, operation_id, pa # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers).value! end # @@ -205,20 +194,11 @@ def create_or_update_with_http_info(resource_group_name, service_name, api_id, o # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'operation_id is nil' if operation_id.nil? - fail ArgumentError, "'operation_id' should satisfy the constraint - 'MaxLength': '256'" if !operation_id.nil? && operation_id.length > 256 - fail ArgumentError, "'operation_id' should satisfy the constraint - 'MinLength': '1'" if !operation_id.nil? && operation_id.length < 1 - fail ArgumentError, "'operation_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !operation_id.nil? && operation_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -226,16 +206,16 @@ def create_or_update_async(resource_group_name, service_name, api_id, operation_ request_headers = {} - request_headers['Content-Type'] = 'application/vnd.ms-azure-apim.policy+xml' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + request_headers['Content-Type'] = 'application/vnd.ms-azure-apim.policy+xml' + # Serialize Request request_mapper = { - client_side_validation: true, required: true, serialized_name: 'parameters', type: { @@ -243,6 +223,7 @@ def create_or_update_async(resource_group_name, service_name, api_id, operation_ } } 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.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policy' @@ -291,8 +272,8 @@ def create_or_update_async(resource_group_name, service_name, api_id, operation_ # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers).value! nil end @@ -313,8 +294,8 @@ def delete(resource_group_name, service_name, api_id, operation_id, if_match, cu # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers).value! end # @@ -334,27 +315,17 @@ def delete_with_http_info(resource_group_name, service_name, api_id, operation_i # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'operation_id is nil' if operation_id.nil? - fail ArgumentError, "'operation_id' should satisfy the constraint - 'MaxLength': '256'" if !operation_id.nil? && operation_id.length > 256 - fail ArgumentError, "'operation_id' should satisfy the constraint - 'MinLength': '1'" if !operation_id.nil? && operation_id.length < 1 - fail ArgumentError, "'operation_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !operation_id.nil? && operation_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'if_match is nil' if if_match.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 diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_policy.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_policy.rb index fc5de512dc..b7c903c3a6 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_policy.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_policy.rb @@ -33,8 +33,8 @@ def initialize(client) # # @return [NOT_IMPLEMENTED] operation results. # - def get(resource_group_name, service_name, api_id, custom_headers:nil) - response = get_async(resource_group_name, service_name, api_id, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, api_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, api_id, custom_headers).value! response.body unless response.nil? end @@ -50,8 +50,8 @@ def get(resource_group_name, service_name, api_id, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, api_id, custom_headers:nil) - get_async(resource_group_name, service_name, api_id, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, api_id, custom_headers = nil) + get_async(resource_group_name, service_name, api_id, custom_headers).value! end # @@ -66,22 +66,15 @@ def get_with_http_info(resource_group_name, service_name, api_id, custom_headers # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, api_id, custom_headers:nil) + def get_async(resource_group_name, service_name, api_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -114,7 +107,6 @@ def get_async(resource_group_name, service_name, api_id, 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: { @@ -148,8 +140,8 @@ def get_async(resource_group_name, service_name, api_id, custom_headers:nil) # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, api_id, parameters, if_match, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, api_id, parameters, if_match, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers).value! nil end @@ -169,8 +161,8 @@ def create_or_update(resource_group_name, service_name, api_id, parameters, if_m # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, api_id, parameters, if_match, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, api_id, parameters, if_match, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers).value! end # @@ -189,16 +181,10 @@ def create_or_update_with_http_info(resource_group_name, service_name, api_id, p # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -206,16 +192,16 @@ def create_or_update_async(resource_group_name, service_name, api_id, parameters request_headers = {} - request_headers['Content-Type'] = 'application/vnd.ms-azure-apim.policy+xml' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + request_headers['Content-Type'] = 'application/vnd.ms-azure-apim.policy+xml' + # Serialize Request request_mapper = { - client_side_validation: true, required: true, serialized_name: 'parameters', type: { @@ -223,6 +209,7 @@ def create_or_update_async(resource_group_name, service_name, api_id, parameters } } 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.ApiManagement/service/{serviceName}/apis/{apiId}/policy' @@ -269,8 +256,8 @@ def create_or_update_async(resource_group_name, service_name, api_id, parameters # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, api_id, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, api_id, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, api_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, api_id, if_match, custom_headers).value! nil end @@ -289,8 +276,8 @@ def delete(resource_group_name, service_name, api_id, if_match, custom_headers:n # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, api_id, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, api_id, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, api_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, api_id, if_match, custom_headers).value! end # @@ -308,23 +295,16 @@ def delete_with_http_info(resource_group_name, service_name, api_id, if_match, c # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, api_id, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, api_id, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'if_match is nil' if if_match.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 diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_products.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_products.rb index 04b07cc3d6..78b43018e2 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_products.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_products.rb @@ -40,8 +40,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_apis(resource_group_name, service_name, api_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_apis_as_lazy(resource_group_name, service_name, api_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_apis(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_apis_as_lazy(resource_group_name, service_name, api_id, filter, top, skip, custom_headers) first_page.get_all_items end @@ -64,8 +64,8 @@ def list_by_apis(resource_group_name, service_name, api_id, filter:nil, top:nil, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_apis_with_http_info(resource_group_name, service_name, api_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_apis_async(resource_group_name, service_name, api_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_apis_with_http_info(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_apis_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! end # @@ -87,24 +87,15 @@ def list_by_apis_with_http_info(resource_group_name, service_name, api_id, filte # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_apis_async(resource_group_name, service_name, api_id, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_apis_async(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -159,8 +150,8 @@ def list_by_apis_async(resource_group_name, service_name, api_id, filter:nil, to # # @return [ProductCollection] operation results. # - def list_by_apis_next(next_page_link, custom_headers:nil) - response = list_by_apis_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_apis_next(next_page_link, custom_headers = nil) + response = list_by_apis_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -174,8 +165,8 @@ def list_by_apis_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_apis_next_with_http_info(next_page_link, custom_headers:nil) - list_by_apis_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_apis_next_with_http_info(next_page_link, custom_headers = nil) + list_by_apis_next_async(next_page_link, custom_headers).value! end # @@ -188,12 +179,11 @@ def list_by_apis_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_apis_next_async(next_page_link, custom_headers:nil) + def list_by_apis_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 @@ -257,12 +247,12 @@ def list_by_apis_next_async(next_page_link, custom_headers:nil) # @return [ProductCollection] which provide lazy access to pages of the # response. # - def list_by_apis_as_lazy(resource_group_name, service_name, api_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_apis_async(resource_group_name, service_name, api_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_apis_as_lazy(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_apis_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_apis_next_async(next_page_link, custom_headers:custom_headers) + list_by_apis_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/apis.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/apis.rb index 6dac50e136..495e729b30 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/apis.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/apis.rb @@ -41,8 +41,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_service_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) first_page.get_all_items end @@ -66,8 +66,8 @@ def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! end # @@ -90,20 +90,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, filter:nil # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -160,8 +154,8 @@ def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil # # @return [ApiContract] operation results. # - def get(resource_group_name, service_name, api_id, custom_headers:nil) - response = get_async(resource_group_name, service_name, api_id, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, api_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, api_id, custom_headers).value! response.body unless response.nil? end @@ -177,8 +171,8 @@ def get(resource_group_name, service_name, api_id, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, api_id, custom_headers:nil) - get_async(resource_group_name, service_name, api_id, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, api_id, custom_headers = nil) + get_async(resource_group_name, service_name, api_id, custom_headers).value! end # @@ -193,22 +187,15 @@ def get_with_http_info(resource_group_name, service_name, api_id, custom_headers # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, api_id, custom_headers:nil) + def get_async(resource_group_name, service_name, api_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -269,8 +256,8 @@ def get_async(resource_group_name, service_name, api_id, custom_headers:nil) # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, api_id, parameters, if_match:nil, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, api_id, parameters, if_match:if_match, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, api_id, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers).value! nil end @@ -291,8 +278,8 @@ def create_or_update(resource_group_name, service_name, api_id, parameters, if_m # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, api_id, parameters, if_match:nil, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, api_id, parameters, if_match:if_match, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, api_id, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers).value! end # @@ -312,29 +299,24 @@ def create_or_update_with_http_info(resource_group_name, service_name, api_id, p # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, api_id, parameters, if_match:nil, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, api_id, parameters, if_match = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_10_10::Models::ApiContract.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -386,8 +368,8 @@ def create_or_update_async(resource_group_name, service_name, api_id, parameters # will be added to the HTTP request. # # - def update(resource_group_name, service_name, api_id, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, api_id, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers).value! nil end @@ -407,8 +389,8 @@ def update(resource_group_name, service_name, api_id, parameters, if_match, cust # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, api_id, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, api_id, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers).value! end # @@ -427,16 +409,10 @@ def update_with_http_info(resource_group_name, service_name, api_id, parameters, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -444,13 +420,14 @@ def update_async(resource_group_name, service_name, api_id, parameters, if_match request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_10_10::Models::ApiUpdateContract.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -501,8 +478,8 @@ def update_async(resource_group_name, service_name, api_id, parameters, if_match # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, api_id, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, api_id, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, api_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, api_id, if_match, custom_headers).value! nil end @@ -521,8 +498,8 @@ def delete(resource_group_name, service_name, api_id, if_match, custom_headers:n # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, api_id, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, api_id, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, api_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, api_id, if_match, custom_headers).value! end # @@ -540,23 +517,16 @@ def delete_with_http_info(resource_group_name, service_name, api_id, if_match, c # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, api_id, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, api_id, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'if_match is nil' if if_match.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 @@ -602,8 +572,8 @@ def delete_async(resource_group_name, service_name, api_id, if_match, custom_hea # # @return [ApiCollection] operation results. # - def list_by_service_next(next_page_link, custom_headers:nil) - response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -617,8 +587,8 @@ def list_by_service_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) - list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! end # @@ -631,12 +601,11 @@ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_next_async(next_page_link, custom_headers:nil) + def list_by_service_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 @@ -700,12 +669,12 @@ def list_by_service_next_async(next_page_link, custom_headers:nil) # # @return [ApiCollection] which provide lazy access to pages of the response. # - def list_by_service_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_service_next_async(next_page_link, custom_headers:custom_headers) + list_by_service_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/authorization_servers.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/authorization_servers.rb index 2de59429c1..72e857efee 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/authorization_servers.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/authorization_servers.rb @@ -41,8 +41,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_service_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) first_page.get_all_items end @@ -66,8 +66,8 @@ def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! end # @@ -90,20 +90,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, filter:nil # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -159,8 +153,8 @@ def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil # # @return [OAuth2AuthorizationServerContract] operation results. # - def get(resource_group_name, service_name, authsid, custom_headers:nil) - response = get_async(resource_group_name, service_name, authsid, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, authsid, custom_headers = nil) + response = get_async(resource_group_name, service_name, authsid, custom_headers).value! response.body unless response.nil? end @@ -175,8 +169,8 @@ def get(resource_group_name, service_name, authsid, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, authsid, custom_headers:nil) - get_async(resource_group_name, service_name, authsid, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, authsid, custom_headers = nil) + get_async(resource_group_name, service_name, authsid, custom_headers).value! end # @@ -190,21 +184,15 @@ def get_with_http_info(resource_group_name, service_name, authsid, custom_header # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, authsid, custom_headers:nil) + def get_async(resource_group_name, service_name, authsid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'authsid is nil' if authsid.nil? - fail ArgumentError, "'authsid' should satisfy the constraint - 'MaxLength': '256'" if !authsid.nil? && authsid.length > 256 - fail ArgumentError, "'authsid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !authsid.nil? && authsid.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -261,8 +249,8 @@ def get_async(resource_group_name, service_name, authsid, custom_headers:nil) # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, authsid, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, authsid, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, authsid, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, authsid, parameters, custom_headers).value! nil end @@ -279,8 +267,8 @@ def create_or_update(resource_group_name, service_name, authsid, parameters, cus # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, authsid, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, authsid, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, authsid, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, authsid, parameters, custom_headers).value! end # @@ -296,27 +284,23 @@ def create_or_update_with_http_info(resource_group_name, service_name, authsid, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, authsid, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, authsid, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'authsid is nil' if authsid.nil? - fail ArgumentError, "'authsid' should satisfy the constraint - 'MaxLength': '256'" if !authsid.nil? && authsid.length > 256 - fail ArgumentError, "'authsid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !authsid.nil? && authsid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_10_10::Models::OAuth2AuthorizationServerContract.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -368,8 +352,8 @@ def create_or_update_async(resource_group_name, service_name, authsid, parameter # will be added to the HTTP request. # # - def update(resource_group_name, service_name, authsid, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, authsid, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, authsid, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, authsid, parameters, if_match, custom_headers).value! nil end @@ -389,8 +373,8 @@ def update(resource_group_name, service_name, authsid, parameters, if_match, cus # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, authsid, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, authsid, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, authsid, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, authsid, parameters, if_match, custom_headers).value! end # @@ -409,15 +393,10 @@ def update_with_http_info(resource_group_name, service_name, authsid, parameters # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, authsid, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, authsid, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'authsid is nil' if authsid.nil? - fail ArgumentError, "'authsid' should satisfy the constraint - 'MaxLength': '256'" if !authsid.nil? && authsid.length > 256 - fail ArgumentError, "'authsid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !authsid.nil? && authsid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -425,13 +404,14 @@ def update_async(resource_group_name, service_name, authsid, parameters, if_matc request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_10_10::Models::OAuth2AuthorizationServerUpdateContract.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -481,8 +461,8 @@ def update_async(resource_group_name, service_name, authsid, parameters, if_matc # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, authsid, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, authsid, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, authsid, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, authsid, if_match, custom_headers).value! nil end @@ -500,8 +480,8 @@ def delete(resource_group_name, service_name, authsid, if_match, custom_headers: # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, authsid, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, authsid, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, authsid, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, authsid, if_match, custom_headers).value! end # @@ -518,22 +498,16 @@ def delete_with_http_info(resource_group_name, service_name, authsid, if_match, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, authsid, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, authsid, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'authsid is nil' if authsid.nil? - fail ArgumentError, "'authsid' should satisfy the constraint - 'MaxLength': '256'" if !authsid.nil? && authsid.length > 256 - fail ArgumentError, "'authsid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !authsid.nil? && authsid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'if_match is nil' if if_match.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 @@ -580,8 +554,8 @@ def delete_async(resource_group_name, service_name, authsid, if_match, custom_he # # @return [AuthorizationServerCollection] operation results. # - def list_by_service_next(next_page_link, custom_headers:nil) - response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -596,8 +570,8 @@ def list_by_service_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) - list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! end # @@ -611,12 +585,11 @@ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_next_async(next_page_link, custom_headers:nil) + def list_by_service_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 @@ -681,12 +654,12 @@ def list_by_service_next_async(next_page_link, custom_headers:nil) # @return [AuthorizationServerCollection] which provide lazy access to pages of # the response. # - def list_by_service_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_service_next_async(next_page_link, custom_headers:custom_headers) + list_by_service_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/backends.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/backends.rb index 6ca4fda2c3..467f053062 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/backends.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/backends.rb @@ -40,8 +40,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_service_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) first_page.get_all_items end @@ -64,8 +64,8 @@ def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! end # @@ -87,20 +87,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, filter:nil # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -157,8 +151,8 @@ def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil # # @return [BackendResponse] operation results. # - def get(resource_group_name, service_name, backendid, custom_headers:nil) - response = get_async(resource_group_name, service_name, backendid, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, backendid, custom_headers = nil) + response = get_async(resource_group_name, service_name, backendid, custom_headers).value! response.body unless response.nil? end @@ -174,8 +168,8 @@ def get(resource_group_name, service_name, backendid, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, backendid, custom_headers:nil) - get_async(resource_group_name, service_name, backendid, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, backendid, custom_headers = nil) + get_async(resource_group_name, service_name, backendid, custom_headers).value! end # @@ -190,22 +184,15 @@ def get_with_http_info(resource_group_name, service_name, backendid, custom_head # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, backendid, custom_headers:nil) + def get_async(resource_group_name, service_name, backendid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'backendid is nil' if backendid.nil? - fail ArgumentError, "'backendid' should satisfy the constraint - 'MaxLength': '255'" if !backendid.nil? && backendid.length > 255 - fail ArgumentError, "'backendid' should satisfy the constraint - 'MinLength': '1'" if !backendid.nil? && backendid.length < 1 - fail ArgumentError, "'backendid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !backendid.nil? && backendid.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -262,8 +249,8 @@ def get_async(resource_group_name, service_name, backendid, custom_headers:nil) # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, backendid, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, backendid, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, backendid, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, backendid, parameters, custom_headers).value! nil end @@ -280,8 +267,8 @@ def create_or_update(resource_group_name, service_name, backendid, parameters, c # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, backendid, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, backendid, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, backendid, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, backendid, parameters, custom_headers).value! end # @@ -297,28 +284,23 @@ def create_or_update_with_http_info(resource_group_name, service_name, backendid # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, backendid, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, backendid, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'backendid is nil' if backendid.nil? - fail ArgumentError, "'backendid' should satisfy the constraint - 'MaxLength': '255'" if !backendid.nil? && backendid.length > 255 - fail ArgumentError, "'backendid' should satisfy the constraint - 'MinLength': '1'" if !backendid.nil? && backendid.length < 1 - fail ArgumentError, "'backendid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !backendid.nil? && backendid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_10_10::Models::BackendContract.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -370,8 +352,8 @@ def create_or_update_async(resource_group_name, service_name, backendid, paramet # will be added to the HTTP request. # # - def update(resource_group_name, service_name, backendid, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, backendid, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, backendid, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, backendid, parameters, if_match, custom_headers).value! nil end @@ -391,8 +373,8 @@ def update(resource_group_name, service_name, backendid, parameters, if_match, c # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, backendid, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, backendid, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, backendid, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, backendid, parameters, if_match, custom_headers).value! end # @@ -411,16 +393,10 @@ def update_with_http_info(resource_group_name, service_name, backendid, paramete # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, backendid, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, backendid, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'backendid is nil' if backendid.nil? - fail ArgumentError, "'backendid' should satisfy the constraint - 'MaxLength': '255'" if !backendid.nil? && backendid.length > 255 - fail ArgumentError, "'backendid' should satisfy the constraint - 'MinLength': '1'" if !backendid.nil? && backendid.length < 1 - fail ArgumentError, "'backendid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !backendid.nil? && backendid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -428,13 +404,14 @@ def update_async(resource_group_name, service_name, backendid, parameters, if_ma request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_10_10::Models::BackendUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -485,8 +462,8 @@ def update_async(resource_group_name, service_name, backendid, parameters, if_ma # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, backendid, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, backendid, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, backendid, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, backendid, if_match, custom_headers).value! nil end @@ -505,8 +482,8 @@ def delete(resource_group_name, service_name, backendid, if_match, custom_header # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, backendid, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, backendid, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, backendid, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, backendid, if_match, custom_headers).value! end # @@ -524,23 +501,16 @@ def delete_with_http_info(resource_group_name, service_name, backendid, if_match # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, backendid, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, backendid, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'backendid is nil' if backendid.nil? - fail ArgumentError, "'backendid' should satisfy the constraint - 'MaxLength': '255'" if !backendid.nil? && backendid.length > 255 - fail ArgumentError, "'backendid' should satisfy the constraint - 'MinLength': '1'" if !backendid.nil? && backendid.length < 1 - fail ArgumentError, "'backendid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !backendid.nil? && backendid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'if_match is nil' if if_match.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 @@ -586,8 +556,8 @@ def delete_async(resource_group_name, service_name, backendid, if_match, custom_ # # @return [BackendCollection] operation results. # - def list_by_service_next(next_page_link, custom_headers:nil) - response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -601,8 +571,8 @@ def list_by_service_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) - list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! end # @@ -615,12 +585,11 @@ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_next_async(next_page_link, custom_headers:nil) + def list_by_service_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 @@ -684,12 +653,12 @@ def list_by_service_next_async(next_page_link, custom_headers:nil) # @return [BackendCollection] which provide lazy access to pages of the # response. # - def list_by_service_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_service_next_async(next_page_link, custom_headers:custom_headers) + list_by_service_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/certificates.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/certificates.rb index 0ecd850d7e..c7adaf32ef 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/certificates.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/certificates.rb @@ -44,8 +44,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_service_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) first_page.get_all_items end @@ -72,8 +72,8 @@ def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! end # @@ -99,20 +99,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, filter:nil # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -169,8 +163,8 @@ def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil # # @return [CertificateContract] operation results. # - def get(resource_group_name, service_name, certificate_id, custom_headers:nil) - response = get_async(resource_group_name, service_name, certificate_id, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, certificate_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, certificate_id, custom_headers).value! response.body unless response.nil? end @@ -186,8 +180,8 @@ def get(resource_group_name, service_name, certificate_id, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, certificate_id, custom_headers:nil) - get_async(resource_group_name, service_name, certificate_id, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, certificate_id, custom_headers = nil) + get_async(resource_group_name, service_name, certificate_id, custom_headers).value! end # @@ -202,22 +196,15 @@ def get_with_http_info(resource_group_name, service_name, certificate_id, custom # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, certificate_id, custom_headers:nil) + def get_async(resource_group_name, service_name, certificate_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'certificate_id is nil' if certificate_id.nil? - fail ArgumentError, "'certificate_id' should satisfy the constraint - 'MaxLength': '256'" if !certificate_id.nil? && certificate_id.length > 256 - fail ArgumentError, "'certificate_id' should satisfy the constraint - 'MinLength': '1'" if !certificate_id.nil? && certificate_id.length < 1 - fail ArgumentError, "'certificate_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !certificate_id.nil? && certificate_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -278,8 +265,8 @@ def get_async(resource_group_name, service_name, certificate_id, custom_headers: # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, certificate_id, parameters, if_match:nil, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, certificate_id, parameters, if_match:if_match, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, certificate_id, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, certificate_id, parameters, if_match, custom_headers).value! nil end @@ -300,8 +287,8 @@ def create_or_update(resource_group_name, service_name, certificate_id, paramete # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, certificate_id, parameters, if_match:nil, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, certificate_id, parameters, if_match:if_match, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, certificate_id, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, certificate_id, parameters, if_match, custom_headers).value! end # @@ -321,29 +308,24 @@ def create_or_update_with_http_info(resource_group_name, service_name, certifica # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, certificate_id, parameters, if_match:nil, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, certificate_id, parameters, if_match = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'certificate_id is nil' if certificate_id.nil? - fail ArgumentError, "'certificate_id' should satisfy the constraint - 'MaxLength': '256'" if !certificate_id.nil? && certificate_id.length > 256 - fail ArgumentError, "'certificate_id' should satisfy the constraint - 'MinLength': '1'" if !certificate_id.nil? && certificate_id.length < 1 - fail ArgumentError, "'certificate_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !certificate_id.nil? && certificate_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_10_10::Models::CertificateCreateOrUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -394,8 +376,8 @@ def create_or_update_async(resource_group_name, service_name, certificate_id, pa # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, certificate_id, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, certificate_id, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, certificate_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, certificate_id, if_match, custom_headers).value! nil end @@ -414,8 +396,8 @@ def delete(resource_group_name, service_name, certificate_id, if_match, custom_h # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, certificate_id, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, certificate_id, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, certificate_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, certificate_id, if_match, custom_headers).value! end # @@ -433,23 +415,16 @@ def delete_with_http_info(resource_group_name, service_name, certificate_id, if_ # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, certificate_id, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, certificate_id, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'certificate_id is nil' if certificate_id.nil? - fail ArgumentError, "'certificate_id' should satisfy the constraint - 'MaxLength': '256'" if !certificate_id.nil? && certificate_id.length > 256 - fail ArgumentError, "'certificate_id' should satisfy the constraint - 'MinLength': '1'" if !certificate_id.nil? && certificate_id.length < 1 - fail ArgumentError, "'certificate_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !certificate_id.nil? && certificate_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'if_match is nil' if if_match.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 @@ -495,8 +470,8 @@ def delete_async(resource_group_name, service_name, certificate_id, if_match, cu # # @return [CertificateCollection] operation results. # - def list_by_service_next(next_page_link, custom_headers:nil) - response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -510,8 +485,8 @@ def list_by_service_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) - list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! end # @@ -524,12 +499,11 @@ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_next_async(next_page_link, custom_headers:nil) + def list_by_service_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 @@ -597,12 +571,12 @@ def list_by_service_next_async(next_page_link, custom_headers:nil) # @return [CertificateCollection] which provide lazy access to pages of the # response. # - def list_by_service_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_service_next_async(next_page_link, custom_headers:custom_headers) + list_by_service_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/group_users.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/group_users.rb index 4830bca61c..9739764943 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/group_users.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/group_users.rb @@ -52,8 +52,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_groups(resource_group_name, service_name, group_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_groups_as_lazy(resource_group_name, service_name, group_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_groups(resource_group_name, service_name, group_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_groups_as_lazy(resource_group_name, service_name, group_id, filter, top, skip, custom_headers) first_page.get_all_items end @@ -88,8 +88,8 @@ def list_by_groups(resource_group_name, service_name, group_id, filter:nil, top: # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_groups_with_http_info(resource_group_name, service_name, group_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_groups_async(resource_group_name, service_name, group_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_groups_with_http_info(resource_group_name, service_name, group_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_groups_async(resource_group_name, service_name, group_id, filter, top, skip, custom_headers).value! end # @@ -123,24 +123,15 @@ def list_by_groups_with_http_info(resource_group_name, service_name, group_id, f # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_groups_async(resource_group_name, service_name, group_id, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_groups_async(resource_group_name, service_name, group_id, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'group_id is nil' if group_id.nil? - fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '256'" if !group_id.nil? && group_id.length > 256 - fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 - fail ArgumentError, "'group_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !group_id.nil? && group_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -199,8 +190,8 @@ def list_by_groups_async(resource_group_name, service_name, group_id, filter:nil # # @return [ErrorBodyContract] operation results. # - def create(resource_group_name, service_name, group_id, uid, custom_headers:nil) - response = create_async(resource_group_name, service_name, group_id, uid, custom_headers:custom_headers).value! + def create(resource_group_name, service_name, group_id, uid, custom_headers = nil) + response = create_async(resource_group_name, service_name, group_id, uid, custom_headers).value! response.body unless response.nil? end @@ -218,8 +209,8 @@ def create(resource_group_name, service_name, group_id, uid, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_with_http_info(resource_group_name, service_name, group_id, uid, custom_headers:nil) - create_async(resource_group_name, service_name, group_id, uid, custom_headers:custom_headers).value! + def create_with_http_info(resource_group_name, service_name, group_id, uid, custom_headers = nil) + create_async(resource_group_name, service_name, group_id, uid, custom_headers).value! end # @@ -236,26 +227,16 @@ def create_with_http_info(resource_group_name, service_name, group_id, uid, cust # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_async(resource_group_name, service_name, group_id, uid, custom_headers:nil) + def create_async(resource_group_name, service_name, group_id, uid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'group_id is nil' if group_id.nil? - fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '256'" if !group_id.nil? && group_id.length > 256 - fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 - fail ArgumentError, "'group_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !group_id.nil? && group_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'uid is nil' if uid.nil? - fail ArgumentError, "'uid' should satisfy the constraint - 'MaxLength': '256'" if !uid.nil? && uid.length > 256 - fail ArgumentError, "'uid' should satisfy the constraint - 'MinLength': '1'" if !uid.nil? && uid.length < 1 - fail ArgumentError, "'uid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !uid.nil? && uid.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -314,8 +295,8 @@ def create_async(resource_group_name, service_name, group_id, uid, custom_header # # @return [ErrorBodyContract] operation results. # - def delete(resource_group_name, service_name, group_id, uid, custom_headers:nil) - response = delete_async(resource_group_name, service_name, group_id, uid, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, group_id, uid, custom_headers = nil) + response = delete_async(resource_group_name, service_name, group_id, uid, custom_headers).value! response.body unless response.nil? end @@ -333,8 +314,8 @@ def delete(resource_group_name, service_name, group_id, uid, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, group_id, uid, custom_headers:nil) - delete_async(resource_group_name, service_name, group_id, uid, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, group_id, uid, custom_headers = nil) + delete_async(resource_group_name, service_name, group_id, uid, custom_headers).value! end # @@ -351,26 +332,16 @@ def delete_with_http_info(resource_group_name, service_name, group_id, uid, cust # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, group_id, uid, custom_headers:nil) + def delete_async(resource_group_name, service_name, group_id, uid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'group_id is nil' if group_id.nil? - fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '256'" if !group_id.nil? && group_id.length > 256 - fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 - fail ArgumentError, "'group_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !group_id.nil? && group_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'uid is nil' if uid.nil? - fail ArgumentError, "'uid' should satisfy the constraint - 'MaxLength': '256'" if !uid.nil? && uid.length > 256 - fail ArgumentError, "'uid' should satisfy the constraint - 'MinLength': '1'" if !uid.nil? && uid.length < 1 - fail ArgumentError, "'uid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !uid.nil? && uid.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -425,8 +396,8 @@ def delete_async(resource_group_name, service_name, group_id, uid, custom_header # # @return [UserCollection] operation results. # - def list_by_groups_next(next_page_link, custom_headers:nil) - response = list_by_groups_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_groups_next(next_page_link, custom_headers = nil) + response = list_by_groups_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -440,8 +411,8 @@ def list_by_groups_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_groups_next_with_http_info(next_page_link, custom_headers:nil) - list_by_groups_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_groups_next_with_http_info(next_page_link, custom_headers = nil) + list_by_groups_next_async(next_page_link, custom_headers).value! end # @@ -454,12 +425,11 @@ def list_by_groups_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_groups_next_async(next_page_link, custom_headers:nil) + def list_by_groups_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 @@ -534,12 +504,12 @@ def list_by_groups_next_async(next_page_link, custom_headers:nil) # # @return [UserCollection] which provide lazy access to pages of the response. # - def list_by_groups_as_lazy(resource_group_name, service_name, group_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_groups_async(resource_group_name, service_name, group_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_groups_as_lazy(resource_group_name, service_name, group_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_groups_async(resource_group_name, service_name, group_id, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_groups_next_async(next_page_link, custom_headers:custom_headers) + list_by_groups_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/groups.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/groups.rb index 64418e305f..528e082441 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/groups.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/groups.rb @@ -44,8 +44,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_service_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) first_page.get_all_items end @@ -72,8 +72,8 @@ def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! end # @@ -99,20 +99,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, filter:nil # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -169,8 +163,8 @@ def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil # # @return [GroupContract] operation results. # - def get(resource_group_name, service_name, group_id, custom_headers:nil) - response = get_async(resource_group_name, service_name, group_id, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, group_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, group_id, custom_headers).value! response.body unless response.nil? end @@ -186,8 +180,8 @@ def get(resource_group_name, service_name, group_id, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, group_id, custom_headers:nil) - get_async(resource_group_name, service_name, group_id, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, group_id, custom_headers = nil) + get_async(resource_group_name, service_name, group_id, custom_headers).value! end # @@ -202,22 +196,15 @@ def get_with_http_info(resource_group_name, service_name, group_id, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, group_id, custom_headers:nil) + def get_async(resource_group_name, service_name, group_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'group_id is nil' if group_id.nil? - fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '256'" if !group_id.nil? && group_id.length > 256 - fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 - fail ArgumentError, "'group_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !group_id.nil? && group_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -274,8 +261,8 @@ def get_async(resource_group_name, service_name, group_id, custom_headers:nil) # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, group_id, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, group_id, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, group_id, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, group_id, parameters, custom_headers).value! nil end @@ -292,8 +279,8 @@ def create_or_update(resource_group_name, service_name, group_id, parameters, cu # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, group_id, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, group_id, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, group_id, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, group_id, parameters, custom_headers).value! end # @@ -309,28 +296,23 @@ def create_or_update_with_http_info(resource_group_name, service_name, group_id, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, group_id, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, group_id, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'group_id is nil' if group_id.nil? - fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '256'" if !group_id.nil? && group_id.length > 256 - fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 - fail ArgumentError, "'group_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !group_id.nil? && group_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_10_10::Models::GroupCreateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -383,8 +365,8 @@ def create_or_update_async(resource_group_name, service_name, group_id, paramete # # @return [ErrorBodyContract] operation results. # - def update(resource_group_name, service_name, group_id, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, group_id, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, group_id, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, group_id, parameters, if_match, custom_headers).value! response.body unless response.nil? end @@ -404,8 +386,8 @@ def update(resource_group_name, service_name, group_id, parameters, if_match, cu # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, group_id, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, group_id, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, group_id, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, group_id, parameters, if_match, custom_headers).value! end # @@ -424,16 +406,10 @@ def update_with_http_info(resource_group_name, service_name, group_id, parameter # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, group_id, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, group_id, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'group_id is nil' if group_id.nil? - fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '256'" if !group_id.nil? && group_id.length > 256 - fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 - fail ArgumentError, "'group_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !group_id.nil? && group_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -441,13 +417,14 @@ def update_async(resource_group_name, service_name, group_id, parameters, if_mat request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_10_10::Models::GroupUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -509,8 +486,8 @@ def update_async(resource_group_name, service_name, group_id, parameters, if_mat # # @return [ErrorBodyContract] operation results. # - def delete(resource_group_name, service_name, group_id, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, group_id, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, group_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, group_id, if_match, custom_headers).value! response.body unless response.nil? end @@ -529,8 +506,8 @@ def delete(resource_group_name, service_name, group_id, if_match, custom_headers # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, group_id, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, group_id, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, group_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, group_id, if_match, custom_headers).value! end # @@ -548,23 +525,16 @@ def delete_with_http_info(resource_group_name, service_name, group_id, if_match, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, group_id, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, group_id, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'group_id is nil' if group_id.nil? - fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '256'" if !group_id.nil? && group_id.length > 256 - fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 - fail ArgumentError, "'group_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !group_id.nil? && group_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'if_match is nil' if if_match.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 @@ -620,8 +590,8 @@ def delete_async(resource_group_name, service_name, group_id, if_match, custom_h # # @return [GroupCollection] operation results. # - def list_by_service_next(next_page_link, custom_headers:nil) - response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -635,8 +605,8 @@ def list_by_service_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) - list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! end # @@ -649,12 +619,11 @@ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_next_async(next_page_link, custom_headers:nil) + def list_by_service_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 @@ -721,12 +690,12 @@ def list_by_service_next_async(next_page_link, custom_headers:nil) # # @return [GroupCollection] which provide lazy access to pages of the response. # - def list_by_service_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_service_next_async(next_page_link, custom_headers:custom_headers) + list_by_service_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/identity_providers.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/identity_providers.rb index f848aa05ba..249c7d1c04 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/identity_providers.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/identity_providers.rb @@ -32,8 +32,8 @@ def initialize(client) # # @return [IdentityProviderList] operation results. # - def list_by_service(resource_group_name, service_name, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def list_by_service(resource_group_name, service_name, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, custom_headers).value! response.body unless response.nil? end @@ -48,8 +48,8 @@ def list_by_service(resource_group_name, service_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, custom_headers).value! end # @@ -63,18 +63,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, custom_hea # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, custom_headers:nil) + def list_by_service_async(resource_group_name, service_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, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 @@ -133,8 +129,8 @@ def list_by_service_async(resource_group_name, service_name, custom_headers:nil) # # @return [IdentityProviderContract] operation results. # - def get(resource_group_name, service_name, identity_provider_name, custom_headers:nil) - response = get_async(resource_group_name, service_name, identity_provider_name, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, identity_provider_name, custom_headers = nil) + response = get_async(resource_group_name, service_name, identity_provider_name, custom_headers).value! response.body unless response.nil? end @@ -152,8 +148,8 @@ def get(resource_group_name, service_name, identity_provider_name, custom_header # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, identity_provider_name, custom_headers:nil) - get_async(resource_group_name, service_name, identity_provider_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, identity_provider_name, custom_headers = nil) + get_async(resource_group_name, service_name, identity_provider_name, custom_headers).value! end # @@ -170,19 +166,15 @@ def get_with_http_info(resource_group_name, service_name, identity_provider_name # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, identity_provider_name, custom_headers:nil) + def get_async(resource_group_name, service_name, identity_provider_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, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'identity_provider_name is nil' if identity_provider_name.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 @@ -240,8 +232,8 @@ def get_async(resource_group_name, service_name, identity_provider_name, custom_ # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, identity_provider_name, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, identity_provider_name, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, identity_provider_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, identity_provider_name, parameters, custom_headers).value! nil end @@ -259,8 +251,8 @@ def create_or_update(resource_group_name, service_name, identity_provider_name, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, identity_provider_name, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, identity_provider_name, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, identity_provider_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, identity_provider_name, parameters, custom_headers).value! end # @@ -277,12 +269,9 @@ def create_or_update_with_http_info(resource_group_name, service_name, identity_ # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, identity_provider_name, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, identity_provider_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'identity_provider_name is nil' if identity_provider_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -290,12 +279,13 @@ def create_or_update_async(resource_group_name, service_name, identity_provider_ 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::ApiManagement::Mgmt::V2016_10_10::Models::IdentityProviderContract.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -348,8 +338,8 @@ def create_or_update_async(resource_group_name, service_name, identity_provider_ # will be added to the HTTP request. # # - def update(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers).value! nil end @@ -370,8 +360,8 @@ def update(resource_group_name, service_name, identity_provider_name, parameters # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers).value! end # @@ -391,12 +381,9 @@ def update_with_http_info(resource_group_name, service_name, identity_provider_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'identity_provider_name is nil' if identity_provider_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? @@ -405,13 +392,14 @@ def update_async(resource_group_name, service_name, identity_provider_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['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_10_10::Models::IdentityProviderUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -463,8 +451,8 @@ def update_async(resource_group_name, service_name, identity_provider_name, para # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, identity_provider_name, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, identity_provider_name, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, identity_provider_name, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, identity_provider_name, if_match, custom_headers).value! nil end @@ -484,8 +472,8 @@ def delete(resource_group_name, service_name, identity_provider_name, if_match, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, identity_provider_name, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, identity_provider_name, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, identity_provider_name, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, identity_provider_name, if_match, custom_headers).value! end # @@ -504,12 +492,9 @@ def delete_with_http_info(resource_group_name, service_name, identity_provider_n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, identity_provider_name, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, identity_provider_name, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'identity_provider_name is nil' if identity_provider_name.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -517,7 +502,6 @@ def delete_async(resource_group_name, service_name, identity_provider_name, if_m 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_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/loggers.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/loggers.rb index e010cd8167..a47a277bd8 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/loggers.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/loggers.rb @@ -40,8 +40,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_service_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) first_page.get_all_items end @@ -64,8 +64,8 @@ def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! end # @@ -87,20 +87,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, filter:nil # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -157,8 +151,8 @@ def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil # # @return [LoggerResponse] operation results. # - def get(resource_group_name, service_name, loggerid, custom_headers:nil) - response = get_async(resource_group_name, service_name, loggerid, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, loggerid, custom_headers = nil) + response = get_async(resource_group_name, service_name, loggerid, custom_headers).value! response.body unless response.nil? end @@ -174,8 +168,8 @@ def get(resource_group_name, service_name, loggerid, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, loggerid, custom_headers:nil) - get_async(resource_group_name, service_name, loggerid, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, loggerid, custom_headers = nil) + get_async(resource_group_name, service_name, loggerid, custom_headers).value! end # @@ -190,21 +184,15 @@ def get_with_http_info(resource_group_name, service_name, loggerid, custom_heade # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, loggerid, custom_headers:nil) + def get_async(resource_group_name, service_name, loggerid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'loggerid is nil' if loggerid.nil? - fail ArgumentError, "'loggerid' should satisfy the constraint - 'MaxLength': '256'" if !loggerid.nil? && loggerid.length > 256 - fail ArgumentError, "'loggerid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !loggerid.nil? && loggerid.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -261,8 +249,8 @@ def get_async(resource_group_name, service_name, loggerid, custom_headers:nil) # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, loggerid, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, loggerid, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, loggerid, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, loggerid, parameters, custom_headers).value! nil end @@ -279,8 +267,8 @@ def create_or_update(resource_group_name, service_name, loggerid, parameters, cu # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, loggerid, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, loggerid, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, loggerid, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, loggerid, parameters, custom_headers).value! end # @@ -296,27 +284,23 @@ def create_or_update_with_http_info(resource_group_name, service_name, loggerid, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, loggerid, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, loggerid, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'loggerid is nil' if loggerid.nil? - fail ArgumentError, "'loggerid' should satisfy the constraint - 'MaxLength': '256'" if !loggerid.nil? && loggerid.length > 256 - fail ArgumentError, "'loggerid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !loggerid.nil? && loggerid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_10_10::Models::LoggerCreateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -368,8 +352,8 @@ def create_or_update_async(resource_group_name, service_name, loggerid, paramete # will be added to the HTTP request. # # - def update(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers).value! nil end @@ -389,8 +373,8 @@ def update(resource_group_name, service_name, loggerid, parameters, if_match, cu # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers).value! end # @@ -409,15 +393,10 @@ def update_with_http_info(resource_group_name, service_name, loggerid, parameter # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'loggerid is nil' if loggerid.nil? - fail ArgumentError, "'loggerid' should satisfy the constraint - 'MaxLength': '256'" if !loggerid.nil? && loggerid.length > 256 - fail ArgumentError, "'loggerid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !loggerid.nil? && loggerid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -425,13 +404,14 @@ def update_async(resource_group_name, service_name, loggerid, parameters, if_mat request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_10_10::Models::LoggerUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -482,8 +462,8 @@ def update_async(resource_group_name, service_name, loggerid, parameters, if_mat # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, loggerid, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, loggerid, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, loggerid, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, loggerid, if_match, custom_headers).value! nil end @@ -502,8 +482,8 @@ def delete(resource_group_name, service_name, loggerid, if_match, custom_headers # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, loggerid, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, loggerid, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, loggerid, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, loggerid, if_match, custom_headers).value! end # @@ -521,22 +501,16 @@ def delete_with_http_info(resource_group_name, service_name, loggerid, if_match, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, loggerid, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, loggerid, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'loggerid is nil' if loggerid.nil? - fail ArgumentError, "'loggerid' should satisfy the constraint - 'MaxLength': '256'" if !loggerid.nil? && loggerid.length > 256 - fail ArgumentError, "'loggerid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !loggerid.nil? && loggerid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'if_match is nil' if if_match.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 @@ -582,8 +556,8 @@ def delete_async(resource_group_name, service_name, loggerid, if_match, custom_h # # @return [LoggerCollection] operation results. # - def list_by_service_next(next_page_link, custom_headers:nil) - response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -597,8 +571,8 @@ def list_by_service_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) - list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! end # @@ -611,12 +585,11 @@ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_next_async(next_page_link, custom_headers:nil) + def list_by_service_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 @@ -680,12 +653,12 @@ def list_by_service_next_async(next_page_link, custom_headers:nil) # @return [LoggerCollection] which provide lazy access to pages of the # response. # - def list_by_service_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_service_next_async(next_page_link, custom_headers:custom_headers) + list_by_service_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/access_information_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/access_information_contract.rb index f9ab63c250..7305ddc833 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/access_information_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/access_information_contract.rb @@ -32,7 +32,6 @@ class AccessInformationContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'AccessInformationContract', type: { @@ -40,7 +39,6 @@ def self.mapper() class_name: 'AccessInformationContract', model_properties: { id: { - client_side_validation: true, required: false, serialized_name: 'id', type: { @@ -48,7 +46,6 @@ def self.mapper() } }, primary_key: { - client_side_validation: true, required: false, serialized_name: 'primaryKey', type: { @@ -56,7 +53,6 @@ def self.mapper() } }, secondary_key: { - client_side_validation: true, required: false, serialized_name: 'secondaryKey', type: { @@ -64,7 +60,6 @@ def self.mapper() } }, enabled: { - client_side_validation: true, required: false, serialized_name: 'enabled', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/access_information_update_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/access_information_update_parameters.rb index f1525f8fcb..364030c0e8 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/access_information_update_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/access_information_update_parameters.rb @@ -24,7 +24,6 @@ class AccessInformationUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'AccessInformationUpdateParameters', type: { @@ -32,7 +31,6 @@ def self.mapper() class_name: 'AccessInformationUpdateParameters', model_properties: { enabled: { - client_side_validation: true, required: true, serialized_name: 'enabled', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/additional_region.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/additional_region.rb index a903d30ae1..1f2e3dd3f1 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/additional_region.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/additional_region.rb @@ -41,7 +41,6 @@ class AdditionalRegion # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'AdditionalRegion', type: { @@ -49,7 +48,6 @@ def self.mapper() class_name: 'AdditionalRegion', model_properties: { location: { - client_side_validation: true, required: true, serialized_name: 'location', type: { @@ -57,7 +55,6 @@ def self.mapper() } }, sku_type: { - client_side_validation: true, required: true, serialized_name: 'skuType', type: { @@ -66,7 +63,6 @@ def self.mapper() } }, sku_unit_count: { - client_side_validation: true, required: false, serialized_name: 'skuUnitCount', default_value: 1, @@ -78,14 +74,12 @@ def self.mapper() } }, static_ips: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'staticIPs', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -95,7 +89,6 @@ def self.mapper() } }, vpnconfiguration: { - client_side_validation: true, required: false, serialized_name: 'vpnconfiguration', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_collection.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_collection.rb index 0f73c57ce2..8075162e23 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'ApiCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ApiContractElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_contract.rb index 0c8ff8eb0e..b0a5e415c5 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_contract.rb @@ -39,7 +39,6 @@ class ApiContract < ApiEntityBaseContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiContract', type: { @@ -47,7 +46,6 @@ def self.mapper() class_name: 'ApiContract', model_properties: { description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -55,7 +53,6 @@ def self.mapper() } }, authentication_settings: { - client_side_validation: true, required: false, serialized_name: 'authenticationSettings', type: { @@ -64,7 +61,6 @@ def self.mapper() } }, subscription_key_parameter_names: { - client_side_validation: true, required: false, serialized_name: 'subscriptionKeyParameterNames', type: { @@ -73,7 +69,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, serialized_name: 'type', type: { @@ -82,7 +77,6 @@ def self.mapper() } }, id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -91,7 +85,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: true, serialized_name: 'name', constraints: { @@ -103,7 +96,6 @@ def self.mapper() } }, service_url: { - client_side_validation: true, required: true, serialized_name: 'serviceUrl', constraints: { @@ -115,7 +107,6 @@ def self.mapper() } }, path: { - client_side_validation: true, required: true, serialized_name: 'path', constraints: { @@ -127,13 +118,11 @@ def self.mapper() } }, protocols: { - client_side_validation: true, required: true, serialized_name: 'protocols', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ApiProtocolContractElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_entity_base_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_entity_base_contract.rb index 2bac534f65..8d7955320f 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_entity_base_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_entity_base_contract.rb @@ -35,7 +35,6 @@ class ApiEntityBaseContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiEntityBaseContract', type: { @@ -43,7 +42,6 @@ def self.mapper() class_name: 'ApiEntityBaseContract', model_properties: { description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -51,7 +49,6 @@ def self.mapper() } }, authentication_settings: { - client_side_validation: true, required: false, serialized_name: 'authenticationSettings', type: { @@ -60,7 +57,6 @@ def self.mapper() } }, subscription_key_parameter_names: { - client_side_validation: true, required: false, serialized_name: 'subscriptionKeyParameterNames', type: { @@ -69,7 +65,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, serialized_name: 'type', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_export_result.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_export_result.rb index 1edc0c079f..6553761abe 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_export_result.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_export_result.rb @@ -29,7 +29,6 @@ class ApiExportResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiExportResult', type: { @@ -37,7 +36,6 @@ def self.mapper() class_name: 'ApiExportResult', model_properties: { content: { - client_side_validation: true, required: false, serialized_name: 'content', type: { @@ -45,7 +43,6 @@ def self.mapper() } }, status_code: { - client_side_validation: true, required: false, serialized_name: 'statusCode', type: { @@ -54,7 +51,6 @@ def self.mapper() } }, request_id: { - client_side_validation: true, required: false, serialized_name: 'requestId', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_backup_restore_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_backup_restore_parameters.rb index c81297e071..c78bc06d25 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_backup_restore_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_backup_restore_parameters.rb @@ -36,7 +36,6 @@ class ApiManagementServiceBackupRestoreParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceBackupRestoreParameters', type: { @@ -44,7 +43,6 @@ def self.mapper() class_name: 'ApiManagementServiceBackupRestoreParameters', model_properties: { storage_account: { - client_side_validation: true, required: true, serialized_name: 'storageAccount', type: { @@ -52,7 +50,6 @@ def self.mapper() } }, access_key: { - client_side_validation: true, required: true, serialized_name: 'accessKey', type: { @@ -60,7 +57,6 @@ def self.mapper() } }, container_name: { - client_side_validation: true, required: true, serialized_name: 'containerName', type: { @@ -68,7 +64,6 @@ def self.mapper() } }, backup_name: { - client_side_validation: true, required: true, serialized_name: 'backupName', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_check_name_availability_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_check_name_availability_parameters.rb index a452da0ef2..ae749483b5 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_check_name_availability_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_check_name_availability_parameters.rb @@ -23,7 +23,6 @@ class ApiManagementServiceCheckNameAvailabilityParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceCheckNameAvailabilityParameters', type: { @@ -31,7 +30,6 @@ def self.mapper() class_name: 'ApiManagementServiceCheckNameAvailabilityParameters', model_properties: { name: { - client_side_validation: true, required: true, serialized_name: 'name', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_get_sso_token_result.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_get_sso_token_result.rb index 99fbb9ad02..a3c138bed4 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_get_sso_token_result.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_get_sso_token_result.rb @@ -22,7 +22,6 @@ class ApiManagementServiceGetSsoTokenResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceGetSsoTokenResult', type: { @@ -30,7 +29,6 @@ def self.mapper() class_name: 'ApiManagementServiceGetSsoTokenResult', model_properties: { redirect_uri: { - client_side_validation: true, required: false, serialized_name: 'redirect_uri', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_list_result.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_list_result.rb index efa20bf28b..cc46100322 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_list_result.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_list_result.rb @@ -59,7 +59,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceListResult', type: { @@ -67,13 +66,11 @@ def self.mapper() class_name: 'ApiManagementServiceListResult', model_properties: { value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceResourceElementType', type: { @@ -84,7 +81,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_manage_deployments_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_manage_deployments_parameters.rb index a869ceb71a..22cae317f6 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_manage_deployments_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_manage_deployments_parameters.rb @@ -50,7 +50,6 @@ class ApiManagementServiceManageDeploymentsParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceManageDeploymentsParameters', type: { @@ -58,7 +57,6 @@ def self.mapper() class_name: 'ApiManagementServiceManageDeploymentsParameters', model_properties: { location: { - client_side_validation: true, required: true, serialized_name: 'location', type: { @@ -66,7 +64,6 @@ def self.mapper() } }, sku_type: { - client_side_validation: true, required: true, serialized_name: 'skuType', type: { @@ -75,7 +72,6 @@ def self.mapper() } }, sku_unit_count: { - client_side_validation: true, required: false, serialized_name: 'skuUnitCount', default_value: 1, @@ -84,13 +80,11 @@ def self.mapper() } }, additional_locations: { - client_side_validation: true, required: false, serialized_name: 'additionalLocations', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'AdditionalRegionElementType', type: { @@ -101,7 +95,6 @@ def self.mapper() } }, vpn_configuration: { - client_side_validation: true, required: false, serialized_name: 'vpnConfiguration', type: { @@ -110,7 +103,6 @@ def self.mapper() } }, vpn_type: { - client_side_validation: true, required: false, serialized_name: 'vpnType', default_value: 'None', diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_name_availability_result.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_name_availability_result.rb index deeff392c8..dab4618dc7 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_name_availability_result.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_name_availability_result.rb @@ -38,7 +38,6 @@ class ApiManagementServiceNameAvailabilityResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceNameAvailabilityResult', type: { @@ -46,7 +45,6 @@ def self.mapper() class_name: 'ApiManagementServiceNameAvailabilityResult', model_properties: { name_available: { - client_side_validation: true, required: true, serialized_name: 'nameAvailable', type: { @@ -54,7 +52,6 @@ def self.mapper() } }, message: { - client_side_validation: true, required: false, serialized_name: 'message', type: { @@ -62,7 +59,6 @@ def self.mapper() } }, reason: { - client_side_validation: true, required: false, serialized_name: 'reason', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_resource.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_resource.rb index 3300139e4c..0f3fca2156 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_resource.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_resource.rb @@ -93,7 +93,6 @@ class ApiManagementServiceResource < Resource # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceResource', type: { @@ -101,7 +100,6 @@ def self.mapper() class_name: 'ApiManagementServiceResource', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -110,7 +108,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, serialized_name: 'name', type: { @@ -118,7 +115,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -127,7 +123,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: true, serialized_name: 'location', type: { @@ -135,13 +130,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: { @@ -151,7 +144,6 @@ def self.mapper() } }, publisher_email: { - client_side_validation: true, required: true, serialized_name: 'properties.publisherEmail', constraints: { @@ -162,7 +154,6 @@ def self.mapper() } }, publisher_name: { - client_side_validation: true, required: true, serialized_name: 'properties.publisherName', type: { @@ -170,7 +161,6 @@ def self.mapper() } }, provisioning_state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.provisioningState', @@ -179,7 +169,6 @@ def self.mapper() } }, target_provisioning_state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.targetProvisioningState', @@ -188,7 +177,6 @@ def self.mapper() } }, created_at_utc: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.createdAtUtc', @@ -197,7 +185,6 @@ def self.mapper() } }, runtime_url: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.runtimeUrl', @@ -206,7 +193,6 @@ def self.mapper() } }, portal_url: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.portalUrl', @@ -215,7 +201,6 @@ def self.mapper() } }, management_api_url: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.managementApiUrl', @@ -224,7 +209,6 @@ def self.mapper() } }, scm_url: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.scmUrl', @@ -233,7 +217,6 @@ def self.mapper() } }, addresser_email: { - client_side_validation: true, required: false, serialized_name: 'properties.addresserEmail', type: { @@ -241,13 +224,11 @@ def self.mapper() } }, hostname_configurations: { - client_side_validation: true, required: false, serialized_name: 'properties.hostnameConfigurations', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'HostnameConfigurationElementType', type: { @@ -258,14 +239,12 @@ def self.mapper() } }, static_ips: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.staticIPs', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -275,7 +254,6 @@ def self.mapper() } }, vpnconfiguration: { - client_side_validation: true, required: false, serialized_name: 'properties.vpnconfiguration', type: { @@ -284,13 +262,11 @@ def self.mapper() } }, additional_locations: { - client_side_validation: true, required: false, serialized_name: 'properties.additionalLocations', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'AdditionalRegionElementType', type: { @@ -301,13 +277,11 @@ def self.mapper() } }, custom_properties: { - client_side_validation: true, required: false, serialized_name: 'properties.customProperties', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -317,7 +291,6 @@ def self.mapper() } }, vpn_type: { - client_side_validation: true, required: false, serialized_name: 'properties.vpnType', default_value: 'None', @@ -327,7 +300,6 @@ def self.mapper() } }, sku: { - client_side_validation: true, required: true, serialized_name: 'sku', type: { @@ -336,7 +308,6 @@ def self.mapper() } }, etag: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'etag', diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_sku_properties.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_sku_properties.rb index d17d47c024..ab981ef275 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_sku_properties.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_sku_properties.rb @@ -27,7 +27,6 @@ class ApiManagementServiceSkuProperties # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceSkuProperties', type: { @@ -35,7 +34,6 @@ def self.mapper() class_name: 'ApiManagementServiceSkuProperties', model_properties: { name: { - client_side_validation: true, required: true, serialized_name: 'name', type: { @@ -44,7 +42,6 @@ def self.mapper() } }, capacity: { - client_side_validation: true, required: false, serialized_name: 'capacity', default_value: 1, diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_update_hostname_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_update_hostname_parameters.rb index 358e7f31b1..7ca0573503 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_update_hostname_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_update_hostname_parameters.rb @@ -26,7 +26,6 @@ class ApiManagementServiceUpdateHostnameParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceUpdateHostnameParameters', type: { @@ -34,13 +33,11 @@ def self.mapper() class_name: 'ApiManagementServiceUpdateHostnameParameters', model_properties: { update: { - client_side_validation: true, required: false, serialized_name: 'update', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'HostnameConfigurationElementType', type: { @@ -51,13 +48,11 @@ def self.mapper() } }, delete: { - client_side_validation: true, required: false, serialized_name: 'delete', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'HostnameTypeElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_update_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_update_parameters.rb index 5fbb55049b..4efe27864f 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_update_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_update_parameters.rb @@ -93,7 +93,6 @@ class ApiManagementServiceUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceUpdateParameters', type: { @@ -101,7 +100,6 @@ def self.mapper() class_name: 'ApiManagementServiceUpdateParameters', model_properties: { publisher_email: { - client_side_validation: true, required: true, serialized_name: 'properties.publisherEmail', constraints: { @@ -112,7 +110,6 @@ def self.mapper() } }, publisher_name: { - client_side_validation: true, required: true, serialized_name: 'properties.publisherName', type: { @@ -120,7 +117,6 @@ def self.mapper() } }, provisioning_state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.provisioningState', @@ -129,7 +125,6 @@ def self.mapper() } }, target_provisioning_state: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.targetProvisioningState', @@ -138,7 +133,6 @@ def self.mapper() } }, created_at_utc: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.createdAtUtc', @@ -147,7 +141,6 @@ def self.mapper() } }, runtime_url: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.runtimeUrl', @@ -156,7 +149,6 @@ def self.mapper() } }, portal_url: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.portalUrl', @@ -165,7 +157,6 @@ def self.mapper() } }, management_api_url: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.managementApiUrl', @@ -174,7 +165,6 @@ def self.mapper() } }, scm_url: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.scmUrl', @@ -183,7 +173,6 @@ def self.mapper() } }, addresser_email: { - client_side_validation: true, required: false, serialized_name: 'properties.addresserEmail', type: { @@ -191,13 +180,11 @@ def self.mapper() } }, hostname_configurations: { - client_side_validation: true, required: false, serialized_name: 'properties.hostnameConfigurations', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'HostnameConfigurationElementType', type: { @@ -208,14 +195,12 @@ def self.mapper() } }, static_ips: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'properties.staticIPs', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -225,7 +210,6 @@ def self.mapper() } }, vpnconfiguration: { - client_side_validation: true, required: false, serialized_name: 'properties.vpnconfiguration', type: { @@ -234,13 +218,11 @@ def self.mapper() } }, additional_locations: { - client_side_validation: true, required: false, serialized_name: 'properties.additionalLocations', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'AdditionalRegionElementType', type: { @@ -251,13 +233,11 @@ def self.mapper() } }, custom_properties: { - client_side_validation: true, required: false, serialized_name: 'properties.customProperties', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -267,7 +247,6 @@ def self.mapper() } }, vpn_type: { - client_side_validation: true, required: false, serialized_name: 'properties.vpnType', default_value: 'None', @@ -277,7 +256,6 @@ def self.mapper() } }, sku: { - client_side_validation: true, required: false, serialized_name: 'sku', type: { @@ -286,13 +264,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_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_upload_certificate_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_upload_certificate_parameters.rb index 7a2d8d5c17..d61d2fbdb5 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_upload_certificate_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_upload_certificate_parameters.rb @@ -31,7 +31,6 @@ class ApiManagementServiceUploadCertificateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiManagementServiceUploadCertificateParameters', type: { @@ -39,7 +38,6 @@ def self.mapper() class_name: 'ApiManagementServiceUploadCertificateParameters', model_properties: { type: { - client_side_validation: true, required: true, serialized_name: 'type', type: { @@ -48,7 +46,6 @@ def self.mapper() } }, certificate: { - client_side_validation: true, required: true, serialized_name: 'certificate', type: { @@ -56,7 +53,6 @@ def self.mapper() } }, certificate_password: { - client_side_validation: true, required: true, serialized_name: 'certificate_password', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_update_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_update_contract.rb index b3b39e3536..f8e52fa611 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_update_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_update_contract.rb @@ -39,7 +39,6 @@ class ApiUpdateContract < ApiEntityBaseContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ApiUpdateContract', type: { @@ -47,7 +46,6 @@ def self.mapper() class_name: 'ApiUpdateContract', model_properties: { description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -55,7 +53,6 @@ def self.mapper() } }, authentication_settings: { - client_side_validation: true, required: false, serialized_name: 'authenticationSettings', type: { @@ -64,7 +61,6 @@ def self.mapper() } }, subscription_key_parameter_names: { - client_side_validation: true, required: false, serialized_name: 'subscriptionKeyParameterNames', type: { @@ -73,7 +69,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, serialized_name: 'type', type: { @@ -82,7 +77,6 @@ def self.mapper() } }, id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -91,7 +85,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, serialized_name: 'name', constraints: { @@ -103,7 +96,6 @@ def self.mapper() } }, service_url: { - client_side_validation: true, required: false, serialized_name: 'serviceUrl', constraints: { @@ -115,7 +107,6 @@ def self.mapper() } }, path: { - client_side_validation: true, required: false, serialized_name: 'path', constraints: { @@ -127,13 +118,11 @@ def self.mapper() } }, protocols: { - client_side_validation: true, required: false, serialized_name: 'protocols', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ApiProtocolContractElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/authentication_settings_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/authentication_settings_contract.rb index 5772b41fb6..912a4ecb04 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/authentication_settings_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/authentication_settings_contract.rb @@ -22,7 +22,6 @@ class AuthenticationSettingsContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'AuthenticationSettingsContract', type: { @@ -30,7 +29,6 @@ def self.mapper() class_name: 'AuthenticationSettingsContract', model_properties: { o_auth2: { - client_side_validation: true, required: false, serialized_name: 'oAuth2', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/authorization_server_collection.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/authorization_server_collection.rb index 1d352c9492..18b7595c34 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/authorization_server_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/authorization_server_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'AuthorizationServerCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'AuthorizationServerCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'OAuth2AuthorizationServerContractElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_authorization_header_credentials.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_authorization_header_credentials.rb index 04ef331ce6..fb03fcfb46 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_authorization_header_credentials.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_authorization_header_credentials.rb @@ -25,7 +25,6 @@ class BackendAuthorizationHeaderCredentials # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'BackendAuthorizationHeaderCredentials', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'BackendAuthorizationHeaderCredentials', model_properties: { scheme: { - client_side_validation: true, required: true, serialized_name: 'scheme', constraints: { @@ -45,7 +43,6 @@ def self.mapper() } }, parameter: { - client_side_validation: true, required: true, serialized_name: 'parameter', constraints: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_base_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_base_parameters.rb index 4883b135e9..63e4bfb0cd 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_base_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_base_parameters.rb @@ -60,7 +60,6 @@ class BackendBaseParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'BackendBaseParameters', type: { @@ -68,7 +67,6 @@ def self.mapper() class_name: 'BackendBaseParameters', model_properties: { certificate: { - client_side_validation: true, required: false, serialized_name: 'certificate', constraints: { @@ -77,7 +75,6 @@ def self.mapper() type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -87,19 +84,16 @@ def self.mapper() } }, query: { - client_side_validation: true, required: false, serialized_name: 'query', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'ArrayElementType', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -111,19 +105,16 @@ def self.mapper() } }, header: { - client_side_validation: true, required: false, serialized_name: 'header', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'ArrayElementType', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -135,7 +126,6 @@ def self.mapper() } }, url: { - client_side_validation: true, required: true, serialized_name: 'url', constraints: { @@ -147,7 +137,6 @@ def self.mapper() } }, username: { - client_side_validation: true, required: false, serialized_name: 'username', type: { @@ -155,7 +144,6 @@ def self.mapper() } }, password: { - client_side_validation: true, required: false, serialized_name: 'password', type: { @@ -163,7 +151,6 @@ def self.mapper() } }, title: { - client_side_validation: true, required: false, serialized_name: 'title', constraints: { @@ -175,7 +162,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', constraints: { @@ -187,7 +173,6 @@ def self.mapper() } }, resource_id: { - client_side_validation: true, required: false, serialized_name: 'resourceId', constraints: { @@ -199,7 +184,6 @@ def self.mapper() } }, skip_certificate_chain_validation: { - client_side_validation: true, required: false, serialized_name: 'properties.skipCertificateChainValidation', default_value: false, @@ -208,7 +192,6 @@ def self.mapper() } }, skip_certificate_name_validation: { - client_side_validation: true, required: false, serialized_name: 'properties.skipCertificateNameValidation', default_value: false, diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_collection.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_collection.rb index ab4486f5b1..80d7dad5e2 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'BackendCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'BackendCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'BackendResponseElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_contract.rb index c8ebc4b1ba..34e3cfc0d8 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_contract.rb @@ -29,7 +29,6 @@ class BackendContract < BackendBaseParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'BackendContract', type: { @@ -37,7 +36,6 @@ def self.mapper() class_name: 'BackendContract', model_properties: { certificate: { - client_side_validation: true, required: false, serialized_name: 'certificate', constraints: { @@ -46,7 +44,6 @@ def self.mapper() type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -56,19 +53,16 @@ def self.mapper() } }, query: { - client_side_validation: true, required: false, serialized_name: 'query', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'ArrayElementType', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -80,19 +74,16 @@ def self.mapper() } }, header: { - client_side_validation: true, required: false, serialized_name: 'header', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'ArrayElementType', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -104,7 +95,6 @@ def self.mapper() } }, url: { - client_side_validation: true, required: true, serialized_name: 'url', constraints: { @@ -116,7 +106,6 @@ def self.mapper() } }, username: { - client_side_validation: true, required: false, serialized_name: 'username', type: { @@ -124,7 +113,6 @@ def self.mapper() } }, password: { - client_side_validation: true, required: false, serialized_name: 'password', type: { @@ -132,7 +120,6 @@ def self.mapper() } }, title: { - client_side_validation: true, required: false, serialized_name: 'title', constraints: { @@ -144,7 +131,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', constraints: { @@ -156,7 +142,6 @@ def self.mapper() } }, resource_id: { - client_side_validation: true, required: false, serialized_name: 'resourceId', constraints: { @@ -168,7 +153,6 @@ def self.mapper() } }, skip_certificate_chain_validation: { - client_side_validation: true, required: false, serialized_name: 'properties.skipCertificateChainValidation', default_value: false, @@ -177,7 +161,6 @@ def self.mapper() } }, skip_certificate_name_validation: { - client_side_validation: true, required: false, serialized_name: 'properties.skipCertificateNameValidation', default_value: false, @@ -186,7 +169,6 @@ def self.mapper() } }, id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -195,7 +177,6 @@ def self.mapper() } }, protocol: { - client_side_validation: true, required: true, serialized_name: 'protocol', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_credentials_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_credentials_contract.rb index 823338b0e3..56e58564bb 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_credentials_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_credentials_contract.rb @@ -28,7 +28,6 @@ class BackendCredentialsContract < BackendAuthorizationHeaderCredentials # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'BackendCredentialsContract', type: { @@ -36,7 +35,6 @@ def self.mapper() class_name: 'BackendCredentialsContract', model_properties: { scheme: { - client_side_validation: true, required: true, serialized_name: 'scheme', constraints: { @@ -48,7 +46,6 @@ def self.mapper() } }, parameter: { - client_side_validation: true, required: true, serialized_name: 'parameter', constraints: { @@ -60,7 +57,6 @@ def self.mapper() } }, certificate: { - client_side_validation: true, required: false, serialized_name: 'certificate', constraints: { @@ -69,7 +65,6 @@ def self.mapper() type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -79,19 +74,16 @@ def self.mapper() } }, query: { - client_side_validation: true, required: false, serialized_name: 'query', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'ArrayElementType', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -103,19 +95,16 @@ def self.mapper() } }, header: { - client_side_validation: true, required: false, serialized_name: 'header', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'ArrayElementType', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_proxy_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_proxy_contract.rb index a4b94aa5f1..8e2a571ee8 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_proxy_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_proxy_contract.rb @@ -30,7 +30,6 @@ class BackendProxyContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'BackendProxyContract', type: { @@ -38,7 +37,6 @@ def self.mapper() class_name: 'BackendProxyContract', model_properties: { url: { - client_side_validation: true, required: true, serialized_name: 'url', constraints: { @@ -50,7 +48,6 @@ def self.mapper() } }, username: { - client_side_validation: true, required: false, serialized_name: 'username', type: { @@ -58,7 +55,6 @@ def self.mapper() } }, password: { - client_side_validation: true, required: false, serialized_name: 'password', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_response.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_response.rb index ef5177a235..a1cef3bdf7 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_response.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_response.rb @@ -21,7 +21,6 @@ class BackendResponse < BackendContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'BackendResponse', type: { @@ -29,7 +28,6 @@ def self.mapper() class_name: 'BackendResponse', model_properties: { certificate: { - client_side_validation: true, required: false, serialized_name: 'certificate', constraints: { @@ -38,7 +36,6 @@ def self.mapper() type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -48,19 +45,16 @@ def self.mapper() } }, query: { - client_side_validation: true, required: false, serialized_name: 'query', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'ArrayElementType', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -72,19 +66,16 @@ def self.mapper() } }, header: { - client_side_validation: true, required: false, serialized_name: 'header', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'ArrayElementType', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -96,7 +87,6 @@ def self.mapper() } }, url: { - client_side_validation: true, required: true, serialized_name: 'url', constraints: { @@ -108,7 +98,6 @@ def self.mapper() } }, username: { - client_side_validation: true, required: false, serialized_name: 'username', type: { @@ -116,7 +105,6 @@ def self.mapper() } }, password: { - client_side_validation: true, required: false, serialized_name: 'password', type: { @@ -124,7 +112,6 @@ def self.mapper() } }, title: { - client_side_validation: true, required: false, serialized_name: 'title', constraints: { @@ -136,7 +123,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', constraints: { @@ -148,7 +134,6 @@ def self.mapper() } }, resource_id: { - client_side_validation: true, required: false, serialized_name: 'resourceId', constraints: { @@ -160,7 +145,6 @@ def self.mapper() } }, skip_certificate_chain_validation: { - client_side_validation: true, required: false, serialized_name: 'properties.skipCertificateChainValidation', default_value: false, @@ -169,7 +153,6 @@ def self.mapper() } }, skip_certificate_name_validation: { - client_side_validation: true, required: false, serialized_name: 'properties.skipCertificateNameValidation', default_value: false, @@ -178,7 +161,6 @@ def self.mapper() } }, id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -187,7 +169,6 @@ def self.mapper() } }, protocol: { - client_side_validation: true, required: true, serialized_name: 'protocol', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_update_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_update_parameters.rb index b94f9270ac..80d1f23c56 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_update_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_update_parameters.rb @@ -23,7 +23,6 @@ class BackendUpdateParameters < BackendBaseParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'BackendUpdateParameters', type: { @@ -31,7 +30,6 @@ def self.mapper() class_name: 'BackendUpdateParameters', model_properties: { certificate: { - client_side_validation: true, required: false, serialized_name: 'certificate', constraints: { @@ -40,7 +38,6 @@ def self.mapper() type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -50,19 +47,16 @@ def self.mapper() } }, query: { - client_side_validation: true, required: false, serialized_name: 'query', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'ArrayElementType', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -74,19 +68,16 @@ def self.mapper() } }, header: { - client_side_validation: true, required: false, serialized_name: 'header', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'ArrayElementType', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -98,7 +89,6 @@ def self.mapper() } }, url: { - client_side_validation: true, required: true, serialized_name: 'url', constraints: { @@ -110,7 +100,6 @@ def self.mapper() } }, username: { - client_side_validation: true, required: false, serialized_name: 'username', type: { @@ -118,7 +107,6 @@ def self.mapper() } }, password: { - client_side_validation: true, required: false, serialized_name: 'password', type: { @@ -126,7 +114,6 @@ def self.mapper() } }, title: { - client_side_validation: true, required: false, serialized_name: 'title', constraints: { @@ -138,7 +125,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', constraints: { @@ -150,7 +136,6 @@ def self.mapper() } }, resource_id: { - client_side_validation: true, required: false, serialized_name: 'resourceId', constraints: { @@ -162,7 +147,6 @@ def self.mapper() } }, skip_certificate_chain_validation: { - client_side_validation: true, required: false, serialized_name: 'properties.skipCertificateChainValidation', default_value: false, @@ -171,7 +155,6 @@ def self.mapper() } }, skip_certificate_name_validation: { - client_side_validation: true, required: false, serialized_name: 'properties.skipCertificateNameValidation', default_value: false, @@ -180,7 +163,6 @@ def self.mapper() } }, protocol: { - client_side_validation: true, required: false, serialized_name: 'protocol', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/certificate_collection.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/certificate_collection.rb index 25e15c76ff..56a9e6bbb6 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/certificate_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/certificate_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'CertificateCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'CertificateCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'CertificateContractElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/certificate_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/certificate_contract.rb index 42dca016f5..651dc1f4c0 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/certificate_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/certificate_contract.rb @@ -35,7 +35,6 @@ class CertificateContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'CertificateContract', type: { @@ -43,7 +42,6 @@ def self.mapper() class_name: 'CertificateContract', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -52,7 +50,6 @@ def self.mapper() } }, subject: { - client_side_validation: true, required: true, serialized_name: 'subject', type: { @@ -60,7 +57,6 @@ def self.mapper() } }, thumbprint: { - client_side_validation: true, required: true, serialized_name: 'thumbprint', type: { @@ -68,7 +64,6 @@ def self.mapper() } }, expiration_date: { - client_side_validation: true, required: true, serialized_name: 'expirationDate', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/certificate_create_or_update_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/certificate_create_or_update_parameters.rb index f0c5eacd3e..9db2994ccc 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/certificate_create_or_update_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/certificate_create_or_update_parameters.rb @@ -26,7 +26,6 @@ class CertificateCreateOrUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'CertificateCreateOrUpdateParameters', type: { @@ -34,7 +33,6 @@ def self.mapper() class_name: 'CertificateCreateOrUpdateParameters', model_properties: { data: { - client_side_validation: true, required: true, serialized_name: 'data', type: { @@ -42,7 +40,6 @@ def self.mapper() } }, password: { - client_side_validation: true, required: true, serialized_name: 'password', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/certificate_information.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/certificate_information.rb index 34c3ef5cc6..0ffac4851b 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/certificate_information.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/certificate_information.rb @@ -30,7 +30,6 @@ class CertificateInformation # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'CertificateInformation', type: { @@ -38,7 +37,6 @@ def self.mapper() class_name: 'CertificateInformation', model_properties: { expiry: { - client_side_validation: true, required: true, serialized_name: 'expiry', type: { @@ -46,7 +44,6 @@ def self.mapper() } }, thumbprint: { - client_side_validation: true, required: true, serialized_name: 'thumbprint', type: { @@ -54,7 +51,6 @@ def self.mapper() } }, subject: { - client_side_validation: true, required: true, serialized_name: 'subject', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/connectivity_status_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/connectivity_status_contract.rb index f3cce4d4f2..b8dddd203e 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/connectivity_status_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/connectivity_status_contract.rb @@ -45,7 +45,6 @@ class ConnectivityStatusContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ConnectivityStatusContract', type: { @@ -53,7 +52,6 @@ def self.mapper() class_name: 'ConnectivityStatusContract', model_properties: { name: { - client_side_validation: true, required: true, serialized_name: 'name', constraints: { @@ -64,7 +62,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: true, serialized_name: 'status', type: { @@ -72,7 +69,6 @@ def self.mapper() } }, error: { - client_side_validation: true, required: false, serialized_name: 'error', type: { @@ -80,7 +76,6 @@ def self.mapper() } }, last_updated: { - client_side_validation: true, required: true, serialized_name: 'lastUpdated', type: { @@ -88,7 +83,6 @@ def self.mapper() } }, last_status_change: { - client_side_validation: true, required: true, serialized_name: 'lastStatusChange', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/deploy_configuration_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/deploy_configuration_parameters.rb index 31bf1e04a2..acb50f20d4 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/deploy_configuration_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/deploy_configuration_parameters.rb @@ -27,7 +27,6 @@ class DeployConfigurationParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'DeployConfigurationParameters', type: { @@ -35,7 +34,6 @@ def self.mapper() class_name: 'DeployConfigurationParameters', model_properties: { branch: { - client_side_validation: true, required: true, serialized_name: 'branch', type: { @@ -43,7 +41,6 @@ def self.mapper() } }, force: { - client_side_validation: true, required: false, serialized_name: 'force', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/error_body_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/error_body_contract.rb index 18ad49051b..687b988bcf 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/error_body_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/error_body_contract.rb @@ -30,7 +30,6 @@ class ErrorBodyContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ErrorBodyContract', type: { @@ -38,7 +37,6 @@ def self.mapper() class_name: 'ErrorBodyContract', model_properties: { code: { - client_side_validation: true, required: false, serialized_name: 'code', type: { @@ -46,7 +44,6 @@ def self.mapper() } }, message: { - client_side_validation: true, required: false, serialized_name: 'message', type: { @@ -54,13 +51,11 @@ def self.mapper() } }, details: { - client_side_validation: true, required: false, serialized_name: 'details', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ErrorFieldContractElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/error_field_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/error_field_contract.rb index 10dae1d615..2f51a5e3e1 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/error_field_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/error_field_contract.rb @@ -28,7 +28,6 @@ class ErrorFieldContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ErrorFieldContract', type: { @@ -36,7 +35,6 @@ def self.mapper() class_name: 'ErrorFieldContract', model_properties: { code: { - client_side_validation: true, required: false, serialized_name: 'code', type: { @@ -44,7 +42,6 @@ def self.mapper() } }, message: { - client_side_validation: true, required: false, serialized_name: 'message', type: { @@ -52,7 +49,6 @@ def self.mapper() } }, target: { - client_side_validation: true, required: false, serialized_name: 'target', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/error_response.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/error_response.rb index d967515137..c3055ccb74 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/error_response.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/error_response.rb @@ -25,7 +25,6 @@ class ErrorResponse # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ErrorResponse', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'ErrorResponse', model_properties: { code: { - client_side_validation: true, required: false, serialized_name: 'code', type: { @@ -41,7 +39,6 @@ def self.mapper() } }, message: { - client_side_validation: true, required: false, serialized_name: 'message', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/generate_sso_url_result.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/generate_sso_url_result.rb index fcc1762c35..0116e21f59 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/generate_sso_url_result.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/generate_sso_url_result.rb @@ -22,7 +22,6 @@ class GenerateSsoUrlResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'GenerateSsoUrlResult', type: { @@ -30,7 +29,6 @@ def self.mapper() class_name: 'GenerateSsoUrlResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/group_collection.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/group_collection.rb index 408f56597a..1da1191d22 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/group_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/group_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'GroupCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'GroupCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'GroupContractElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/group_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/group_contract.rb index 9cb572d13c..265fb99ea7 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/group_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/group_contract.rb @@ -44,7 +44,6 @@ class GroupContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'GroupContract', type: { @@ -52,7 +51,6 @@ def self.mapper() class_name: 'GroupContract', 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: true, serialized_name: 'name', constraints: { @@ -73,7 +70,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', constraints: { @@ -84,7 +80,6 @@ def self.mapper() } }, built_in: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'builtIn', @@ -93,7 +88,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -103,7 +97,6 @@ def self.mapper() } }, external_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'externalId', diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/group_create_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/group_create_parameters.rb index 9b2da7bb10..e80190c2e2 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/group_create_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/group_create_parameters.rb @@ -35,7 +35,6 @@ class GroupCreateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'GroupCreateParameters', type: { @@ -43,7 +42,6 @@ def self.mapper() class_name: 'GroupCreateParameters', model_properties: { name: { - client_side_validation: true, required: true, serialized_name: 'name', constraints: { @@ -55,7 +53,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -63,7 +60,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, serialized_name: 'type', type: { @@ -72,7 +68,6 @@ def self.mapper() } }, external_id: { - client_side_validation: true, required: false, serialized_name: 'externalId', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/group_update_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/group_update_parameters.rb index e25e9b483b..cc6c6e63df 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/group_update_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/group_update_parameters.rb @@ -35,7 +35,6 @@ class GroupUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'GroupUpdateParameters', type: { @@ -43,7 +42,6 @@ def self.mapper() class_name: 'GroupUpdateParameters', model_properties: { name: { - client_side_validation: true, required: false, serialized_name: 'name', constraints: { @@ -55,7 +53,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -63,7 +60,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, serialized_name: 'type', type: { @@ -72,7 +68,6 @@ def self.mapper() } }, external_id: { - client_side_validation: true, required: false, serialized_name: 'externalId', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/hostname_configuration.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/hostname_configuration.rb index 3e4c5d9ad2..1cdddc2471 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/hostname_configuration.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/hostname_configuration.rb @@ -29,7 +29,6 @@ class HostnameConfiguration # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'HostnameConfiguration', type: { @@ -37,7 +36,6 @@ def self.mapper() class_name: 'HostnameConfiguration', model_properties: { type: { - client_side_validation: true, required: true, serialized_name: 'type', type: { @@ -46,7 +44,6 @@ def self.mapper() } }, hostname: { - client_side_validation: true, required: true, serialized_name: 'hostname', type: { @@ -54,7 +51,6 @@ def self.mapper() } }, certificate: { - client_side_validation: true, required: true, serialized_name: 'certificate', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/identity_provider_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/identity_provider_contract.rb index cb28dd91ca..c97ae7b171 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/identity_provider_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/identity_provider_contract.rb @@ -41,7 +41,6 @@ class IdentityProviderContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'IdentityProviderContract', type: { @@ -49,7 +48,6 @@ def self.mapper() class_name: 'IdentityProviderContract', model_properties: { client_id: { - client_side_validation: true, required: true, serialized_name: 'clientId', constraints: { @@ -60,7 +58,6 @@ def self.mapper() } }, client_secret: { - client_side_validation: true, required: true, serialized_name: 'clientSecret', constraints: { @@ -71,7 +68,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, serialized_name: 'type', type: { @@ -79,7 +75,6 @@ def self.mapper() } }, allowed_tenants: { - client_side_validation: true, required: false, serialized_name: 'allowedTenants', constraints: { @@ -88,7 +83,6 @@ def self.mapper() type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/identity_provider_list.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/identity_provider_list.rb index 71b9595eda..d0b310d4a9 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/identity_provider_list.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/identity_provider_list.rb @@ -23,7 +23,6 @@ class IdentityProviderList # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'IdentityProviderList', type: { @@ -31,13 +30,11 @@ def self.mapper() class_name: 'IdentityProviderList', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'IdentityProviderContractElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/identity_provider_update_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/identity_provider_update_parameters.rb index 7d95c9743b..72b54ad89c 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/identity_provider_update_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/identity_provider_update_parameters.rb @@ -34,7 +34,6 @@ class IdentityProviderUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'IdentityProviderUpdateParameters', type: { @@ -42,7 +41,6 @@ def self.mapper() class_name: 'IdentityProviderUpdateParameters', model_properties: { client_id: { - client_side_validation: true, required: false, serialized_name: 'clientId', constraints: { @@ -53,7 +51,6 @@ def self.mapper() } }, client_secret: { - client_side_validation: true, required: false, serialized_name: 'clientSecret', constraints: { @@ -64,7 +61,6 @@ def self.mapper() } }, allowed_tenants: { - client_side_validation: true, required: false, serialized_name: 'allowedTenants', constraints: { @@ -73,7 +69,6 @@ def self.mapper() type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/logger_collection.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/logger_collection.rb index 119f620721..8c81b951f7 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/logger_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/logger_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'LoggerCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'LoggerCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'LoggerResponseElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/logger_create_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/logger_create_parameters.rb index c7965cc6f0..119296a1c2 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/logger_create_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/logger_create_parameters.rb @@ -33,7 +33,6 @@ class LoggerCreateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'LoggerCreateParameters', type: { @@ -41,7 +40,6 @@ def self.mapper() class_name: 'LoggerCreateParameters', model_properties: { type: { - client_side_validation: true, required: true, is_constant: true, serialized_name: 'type', @@ -51,7 +49,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -59,13 +56,11 @@ def self.mapper() } }, credentials: { - client_side_validation: true, required: true, serialized_name: 'credentials', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -75,7 +70,6 @@ def self.mapper() } }, is_buffered: { - client_side_validation: true, required: false, serialized_name: 'isBuffered', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/logger_response.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/logger_response.rb index fffd45c114..cd158ff6c8 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/logger_response.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/logger_response.rb @@ -40,7 +40,6 @@ class LoggerResponse # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'LoggerResponse', type: { @@ -48,7 +47,6 @@ def self.mapper() class_name: 'LoggerResponse', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -57,7 +55,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: true, is_constant: true, serialized_name: 'type', @@ -67,7 +64,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', constraints: { @@ -78,13 +74,11 @@ def self.mapper() } }, credentials: { - client_side_validation: true, required: true, serialized_name: 'credentials', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -94,7 +88,6 @@ def self.mapper() } }, is_buffered: { - client_side_validation: true, required: false, serialized_name: 'isBuffered', default_value: true, diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/logger_update_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/logger_update_parameters.rb index f46ec41ce4..866deb0a39 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/logger_update_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/logger_update_parameters.rb @@ -32,7 +32,6 @@ class LoggerUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'LoggerUpdateParameters', type: { @@ -40,7 +39,6 @@ def self.mapper() class_name: 'LoggerUpdateParameters', model_properties: { type: { - client_side_validation: true, required: true, is_constant: true, serialized_name: 'type', @@ -50,7 +48,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -58,13 +55,11 @@ def self.mapper() } }, credentials: { - client_side_validation: true, required: false, serialized_name: 'credentials', type: { name: 'Dictionary', value: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -74,7 +69,6 @@ def self.mapper() } }, is_buffered: { - client_side_validation: true, required: false, serialized_name: 'isBuffered', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/network_status_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/network_status_contract.rb index aeddb395b7..27c0574568 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/network_status_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/network_status_contract.rb @@ -26,7 +26,6 @@ class NetworkStatusContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'NetworkStatusContract', type: { @@ -34,13 +33,11 @@ def self.mapper() class_name: 'NetworkStatusContract', model_properties: { dns_servers: { - client_side_validation: true, required: true, serialized_name: 'dnsServers', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -50,13 +47,11 @@ def self.mapper() } }, connectivity_status: { - client_side_validation: true, required: true, serialized_name: 'connectivityStatus', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ConnectivityStatusContractElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/oauth2authentication_settings_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/oauth2authentication_settings_contract.rb index 65de73ff5c..694120e29c 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/oauth2authentication_settings_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/oauth2authentication_settings_contract.rb @@ -25,7 +25,6 @@ class OAuth2AuthenticationSettingsContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OAuth2AuthenticationSettingsContract', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'OAuth2AuthenticationSettingsContract', model_properties: { authorization_server_id: { - client_side_validation: true, required: false, serialized_name: 'authorizationServerId', type: { @@ -41,7 +39,6 @@ def self.mapper() } }, scope: { - client_side_validation: true, required: false, serialized_name: 'scope', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/oauth2authorization_server_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/oauth2authorization_server_contract.rb index 50e6aeda0e..3a32fdbeb5 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/oauth2authorization_server_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/oauth2authorization_server_contract.rb @@ -98,7 +98,6 @@ class OAuth2AuthorizationServerContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OAuth2AuthorizationServerContract', type: { @@ -106,7 +105,6 @@ def self.mapper() class_name: 'OAuth2AuthorizationServerContract', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -115,7 +113,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: true, serialized_name: 'name', constraints: { @@ -127,7 +124,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -135,7 +131,6 @@ def self.mapper() } }, client_registration_endpoint: { - client_side_validation: true, required: true, serialized_name: 'clientRegistrationEndpoint', type: { @@ -143,7 +138,6 @@ def self.mapper() } }, authorization_endpoint: { - client_side_validation: true, required: true, serialized_name: 'authorizationEndpoint', type: { @@ -151,13 +145,11 @@ def self.mapper() } }, authorization_methods: { - client_side_validation: true, required: false, serialized_name: 'authorizationMethods', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'MethodContractElementType', type: { @@ -168,13 +160,11 @@ def self.mapper() } }, client_authentication_method: { - client_side_validation: true, required: false, serialized_name: 'clientAuthenticationMethod', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ClientAuthenticationMethodContractElementType', type: { @@ -185,13 +175,11 @@ def self.mapper() } }, token_body_parameters: { - client_side_validation: true, required: false, serialized_name: 'tokenBodyParameters', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'TokenBodyParameterContractElementType', type: { @@ -202,7 +190,6 @@ def self.mapper() } }, token_endpoint: { - client_side_validation: true, required: false, serialized_name: 'tokenEndpoint', type: { @@ -210,7 +197,6 @@ def self.mapper() } }, support_state: { - client_side_validation: true, required: false, serialized_name: 'supportState', type: { @@ -218,7 +204,6 @@ def self.mapper() } }, default_scope: { - client_side_validation: true, required: false, serialized_name: 'defaultScope', type: { @@ -226,13 +211,11 @@ def self.mapper() } }, grant_types: { - client_side_validation: true, required: true, serialized_name: 'grantTypes', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'GrantTypesContractElementType', type: { @@ -243,13 +226,11 @@ def self.mapper() } }, bearer_token_sending_methods: { - client_side_validation: true, required: false, serialized_name: 'bearerTokenSendingMethods', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'BearerTokenSendingMethodsContractElementType', type: { @@ -260,7 +241,6 @@ def self.mapper() } }, client_id: { - client_side_validation: true, required: true, serialized_name: 'clientId', type: { @@ -268,7 +248,6 @@ def self.mapper() } }, client_secret: { - client_side_validation: true, required: false, serialized_name: 'clientSecret', type: { @@ -276,7 +255,6 @@ def self.mapper() } }, resource_owner_username: { - client_side_validation: true, required: false, serialized_name: 'resourceOwnerUsername', type: { @@ -284,7 +262,6 @@ def self.mapper() } }, resource_owner_password: { - client_side_validation: true, required: false, serialized_name: 'resourceOwnerPassword', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/oauth2authorization_server_update_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/oauth2authorization_server_update_contract.rb index 325a6f06c5..43090f0c96 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/oauth2authorization_server_update_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/oauth2authorization_server_update_contract.rb @@ -92,7 +92,6 @@ class OAuth2AuthorizationServerUpdateContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OAuth2AuthorizationServerUpdateContract', type: { @@ -100,7 +99,6 @@ def self.mapper() class_name: 'OAuth2AuthorizationServerUpdateContract', model_properties: { name: { - client_side_validation: true, required: false, serialized_name: 'name', constraints: { @@ -112,7 +110,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -120,7 +117,6 @@ def self.mapper() } }, client_registration_endpoint: { - client_side_validation: true, required: false, serialized_name: 'clientRegistrationEndpoint', type: { @@ -128,7 +124,6 @@ def self.mapper() } }, authorization_endpoint: { - client_side_validation: true, required: false, serialized_name: 'authorizationEndpoint', type: { @@ -136,13 +131,11 @@ def self.mapper() } }, authorization_methods: { - client_side_validation: true, required: false, serialized_name: 'authorizationMethods', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'MethodContractElementType', type: { @@ -153,13 +146,11 @@ def self.mapper() } }, client_authentication_method: { - client_side_validation: true, required: false, serialized_name: 'clientAuthenticationMethod', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ClientAuthenticationMethodContractElementType', type: { @@ -170,13 +161,11 @@ def self.mapper() } }, token_body_parameters: { - client_side_validation: true, required: false, serialized_name: 'tokenBodyParameters', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'TokenBodyParameterContractElementType', type: { @@ -187,7 +176,6 @@ def self.mapper() } }, token_endpoint: { - client_side_validation: true, required: false, serialized_name: 'tokenEndpoint', type: { @@ -195,7 +183,6 @@ def self.mapper() } }, support_state: { - client_side_validation: true, required: false, serialized_name: 'supportState', type: { @@ -203,7 +190,6 @@ def self.mapper() } }, default_scope: { - client_side_validation: true, required: false, serialized_name: 'defaultScope', type: { @@ -211,13 +197,11 @@ def self.mapper() } }, grant_types: { - client_side_validation: true, required: false, serialized_name: 'grantTypes', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'GrantTypesContractElementType', type: { @@ -228,13 +212,11 @@ def self.mapper() } }, bearer_token_sending_methods: { - client_side_validation: true, required: false, serialized_name: 'bearerTokenSendingMethods', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'BearerTokenSendingMethodsContractElementType', type: { @@ -245,7 +227,6 @@ def self.mapper() } }, client_id: { - client_side_validation: true, required: false, serialized_name: 'clientId', type: { @@ -253,7 +234,6 @@ def self.mapper() } }, client_secret: { - client_side_validation: true, required: false, serialized_name: 'clientSecret', type: { @@ -261,7 +241,6 @@ def self.mapper() } }, resource_owner_username: { - client_side_validation: true, required: false, serialized_name: 'resourceOwnerUsername', type: { @@ -269,7 +248,6 @@ def self.mapper() } }, resource_owner_password: { - client_side_validation: true, required: false, serialized_name: 'resourceOwnerPassword', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/open_id_connect_provider_collection.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/open_id_connect_provider_collection.rb index 6ef9a89b07..714cf2f7af 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/open_id_connect_provider_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/open_id_connect_provider_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OpenIdConnectProviderCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'OpenIdConnectProviderCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'OpenidConnectProviderContractElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/openid_connect_provider_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/openid_connect_provider_contract.rb index 42f79be715..a913fff85e 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/openid_connect_provider_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/openid_connect_provider_contract.rb @@ -39,7 +39,6 @@ class OpenidConnectProviderContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OpenidConnectProviderContract', type: { @@ -47,7 +46,6 @@ def self.mapper() class_name: 'OpenidConnectProviderContract', model_properties: { id: { - client_side_validation: true, required: false, serialized_name: 'id', type: { @@ -55,7 +53,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: true, serialized_name: 'name', constraints: { @@ -66,7 +63,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -74,7 +70,6 @@ def self.mapper() } }, metadata_endpoint: { - client_side_validation: true, required: true, serialized_name: 'metadataEndpoint', type: { @@ -82,7 +77,6 @@ def self.mapper() } }, client_id: { - client_side_validation: true, required: true, serialized_name: 'clientId', type: { @@ -90,7 +84,6 @@ def self.mapper() } }, client_secret: { - client_side_validation: true, required: false, serialized_name: 'clientSecret', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/openid_connect_provider_create_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/openid_connect_provider_create_contract.rb index 60cbb99015..1c09f4486a 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/openid_connect_provider_create_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/openid_connect_provider_create_contract.rb @@ -36,7 +36,6 @@ class OpenidConnectProviderCreateContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OpenidConnectProviderCreateContract', type: { @@ -44,7 +43,6 @@ def self.mapper() class_name: 'OpenidConnectProviderCreateContract', model_properties: { name: { - client_side_validation: true, required: true, serialized_name: 'name', constraints: { @@ -55,7 +53,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -63,7 +60,6 @@ def self.mapper() } }, metadata_endpoint: { - client_side_validation: true, required: true, serialized_name: 'metadataEndpoint', type: { @@ -71,7 +67,6 @@ def self.mapper() } }, client_id: { - client_side_validation: true, required: true, serialized_name: 'clientId', type: { @@ -79,7 +74,6 @@ def self.mapper() } }, client_secret: { - client_side_validation: true, required: false, serialized_name: 'clientSecret', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/openid_connect_provider_update_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/openid_connect_provider_update_contract.rb index 7246456ff3..8d56e7f431 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/openid_connect_provider_update_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/openid_connect_provider_update_contract.rb @@ -36,7 +36,6 @@ class OpenidConnectProviderUpdateContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OpenidConnectProviderUpdateContract', type: { @@ -44,7 +43,6 @@ def self.mapper() class_name: 'OpenidConnectProviderUpdateContract', model_properties: { name: { - client_side_validation: true, required: false, serialized_name: 'name', constraints: { @@ -55,7 +53,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -63,7 +60,6 @@ def self.mapper() } }, metadata_endpoint: { - client_side_validation: true, required: false, serialized_name: 'metadataEndpoint', type: { @@ -71,7 +67,6 @@ def self.mapper() } }, client_id: { - client_side_validation: true, required: false, serialized_name: 'clientId', type: { @@ -79,7 +74,6 @@ def self.mapper() } }, client_secret: { - client_side_validation: true, required: false, serialized_name: 'clientSecret', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation.rb index ddf594af9f..0b9dd96d75 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation.rb @@ -25,7 +25,6 @@ class Operation # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Operation', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'Operation', model_properties: { name: { - client_side_validation: true, required: false, serialized_name: 'name', type: { @@ -41,7 +39,6 @@ def self.mapper() } }, display: { - client_side_validation: true, required: false, serialized_name: 'display', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_collection.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_collection.rb index dee2536ec4..89942587e7 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OperationCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'OperationCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'OperationContractElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_contract.rb index d37f1c7dda..4ef579799e 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_contract.rb @@ -37,7 +37,6 @@ class OperationContract < OperationEntityBaseContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OperationContract', type: { @@ -45,13 +44,11 @@ def self.mapper() class_name: 'OperationContract', model_properties: { template_parameters: { - client_side_validation: true, required: false, serialized_name: 'templateParameters', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ParameterContractElementType', type: { @@ -62,7 +59,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', constraints: { @@ -73,7 +69,6 @@ def self.mapper() } }, request: { - client_side_validation: true, required: false, serialized_name: 'request', type: { @@ -82,13 +77,11 @@ def self.mapper() } }, responses: { - client_side_validation: true, required: false, serialized_name: 'responses', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ResultContractElementType', type: { @@ -99,7 +92,6 @@ def self.mapper() } }, id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -108,7 +100,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: true, serialized_name: 'name', constraints: { @@ -120,7 +111,6 @@ def self.mapper() } }, method: { - client_side_validation: true, required: true, serialized_name: 'method', type: { @@ -128,7 +118,6 @@ def self.mapper() } }, url_template: { - client_side_validation: true, required: true, serialized_name: 'urlTemplate', constraints: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_display.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_display.rb index 94d51b5c23..89c14ccee4 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_display.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_display.rb @@ -32,7 +32,6 @@ class OperationDisplay # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Operation_display', type: { @@ -40,7 +39,6 @@ def self.mapper() class_name: 'OperationDisplay', model_properties: { provider: { - client_side_validation: true, required: false, serialized_name: 'provider', type: { @@ -48,7 +46,6 @@ def self.mapper() } }, operation: { - client_side_validation: true, required: false, serialized_name: 'operation', type: { @@ -56,7 +53,6 @@ def self.mapper() } }, resource: { - client_side_validation: true, required: false, serialized_name: 'resource', type: { @@ -64,7 +60,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_entity_base_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_entity_base_contract.rb index 978af98b7a..bbb117e751 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_entity_base_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_entity_base_contract.rb @@ -33,7 +33,6 @@ class OperationEntityBaseContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OperationEntityBaseContract', type: { @@ -41,13 +40,11 @@ def self.mapper() class_name: 'OperationEntityBaseContract', model_properties: { template_parameters: { - client_side_validation: true, required: false, serialized_name: 'templateParameters', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ParameterContractElementType', type: { @@ -58,7 +55,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', constraints: { @@ -69,7 +65,6 @@ def self.mapper() } }, request: { - client_side_validation: true, required: false, serialized_name: 'request', type: { @@ -78,13 +73,11 @@ def self.mapper() } }, responses: { - client_side_validation: true, required: false, serialized_name: 'responses', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ResultContractElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_list_result.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_list_result.rb index 9077ae0e13..45f25869fa 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_list_result.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_list_result.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OperationListResult', type: { @@ -68,13 +67,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: { @@ -85,7 +82,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_result_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_result_contract.rb index 9603a4f20a..cc6c7ebcf5 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_result_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_result_contract.rb @@ -44,7 +44,6 @@ class OperationResultContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OperationResultContract', type: { @@ -52,7 +51,6 @@ def self.mapper() class_name: 'OperationResultContract', model_properties: { id: { - client_side_validation: true, required: false, serialized_name: 'id', type: { @@ -60,7 +58,6 @@ def self.mapper() } }, status: { - client_side_validation: true, required: false, serialized_name: 'status', type: { @@ -69,7 +66,6 @@ def self.mapper() } }, started: { - client_side_validation: true, required: false, serialized_name: 'started', type: { @@ -77,7 +73,6 @@ def self.mapper() } }, updated: { - client_side_validation: true, required: false, serialized_name: 'updated', type: { @@ -85,7 +80,6 @@ def self.mapper() } }, result_info: { - client_side_validation: true, required: false, serialized_name: 'resultInfo', type: { @@ -93,7 +87,6 @@ def self.mapper() } }, error: { - client_side_validation: true, required: false, serialized_name: 'error', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_update_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_update_contract.rb index aaad5651f2..17bd89bca6 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_update_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_update_contract.rb @@ -37,7 +37,6 @@ class OperationUpdateContract < OperationEntityBaseContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OperationUpdateContract', type: { @@ -45,13 +44,11 @@ def self.mapper() class_name: 'OperationUpdateContract', model_properties: { template_parameters: { - client_side_validation: true, required: false, serialized_name: 'templateParameters', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ParameterContractElementType', type: { @@ -62,7 +59,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', constraints: { @@ -73,7 +69,6 @@ def self.mapper() } }, request: { - client_side_validation: true, required: false, serialized_name: 'request', type: { @@ -82,13 +77,11 @@ def self.mapper() } }, responses: { - client_side_validation: true, required: false, serialized_name: 'responses', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ResultContractElementType', type: { @@ -99,7 +92,6 @@ def self.mapper() } }, id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -108,7 +100,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, serialized_name: 'name', constraints: { @@ -120,7 +111,6 @@ def self.mapper() } }, method: { - client_side_validation: true, required: false, serialized_name: 'method', type: { @@ -128,7 +118,6 @@ def self.mapper() } }, url_template: { - client_side_validation: true, required: false, serialized_name: 'urlTemplate', constraints: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/parameter_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/parameter_contract.rb index 04cd6fe8ba..d81326788e 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/parameter_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/parameter_contract.rb @@ -37,7 +37,6 @@ class ParameterContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ParameterContract', type: { @@ -45,7 +44,6 @@ def self.mapper() class_name: 'ParameterContract', model_properties: { name: { - client_side_validation: true, required: true, serialized_name: 'name', type: { @@ -53,7 +51,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -61,7 +58,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: true, serialized_name: 'type', type: { @@ -69,7 +65,6 @@ def self.mapper() } }, default_value: { - client_side_validation: true, required: false, serialized_name: 'defaultValue', type: { @@ -77,7 +72,6 @@ def self.mapper() } }, required: { - client_side_validation: true, required: false, serialized_name: 'required', type: { @@ -85,13 +79,11 @@ def self.mapper() } }, values: { - client_side_validation: true, required: false, serialized_name: 'values', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/policy_snippet_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/policy_snippet_contract.rb index 2836c3f8b4..aa82aa08b6 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/policy_snippet_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/policy_snippet_contract.rb @@ -32,7 +32,6 @@ class PolicySnippetContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'PolicySnippetContract', type: { @@ -40,7 +39,6 @@ def self.mapper() class_name: 'PolicySnippetContract', model_properties: { name: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'name', @@ -49,7 +47,6 @@ def self.mapper() } }, content: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'content', @@ -58,7 +55,6 @@ def self.mapper() } }, tool_tip: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'toolTip', @@ -67,7 +63,6 @@ def self.mapper() } }, scope: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'scope', diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/policy_snippets_collection.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/policy_snippets_collection.rb index 2923aa01c3..3494b98c47 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/policy_snippets_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/policy_snippets_collection.rb @@ -22,7 +22,6 @@ class PolicySnippetsCollection # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'PolicySnippetsCollection', type: { @@ -30,13 +29,11 @@ def self.mapper() class_name: 'PolicySnippetsCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'PolicySnippetContractElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/product_collection.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/product_collection.rb index 861912cdb6..acbf00f4f4 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/product_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/product_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ProductCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'ProductCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ProductContractElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/product_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/product_contract.rb index bb6744e23e..cf0086ced4 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/product_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/product_contract.rb @@ -67,7 +67,6 @@ class ProductContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ProductContract', type: { @@ -75,7 +74,6 @@ def self.mapper() class_name: 'ProductContract', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -84,7 +82,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: true, serialized_name: 'name', constraints: { @@ -96,7 +93,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', constraints: { @@ -108,7 +104,6 @@ def self.mapper() } }, terms: { - client_side_validation: true, required: false, serialized_name: 'terms', type: { @@ -116,7 +111,6 @@ def self.mapper() } }, subscription_required: { - client_side_validation: true, required: false, serialized_name: 'subscriptionRequired', default_value: true, @@ -125,7 +119,6 @@ def self.mapper() } }, approval_required: { - client_side_validation: true, required: false, serialized_name: 'approvalRequired', type: { @@ -133,7 +126,6 @@ def self.mapper() } }, subscriptions_limit: { - client_side_validation: true, required: false, serialized_name: 'subscriptionsLimit', type: { @@ -141,7 +133,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, serialized_name: 'state', default_value: 'NotPublished', diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/product_update_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/product_update_parameters.rb index fc446bdece..86824e8237 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/product_update_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/product_update_parameters.rb @@ -58,7 +58,6 @@ class ProductUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ProductUpdateParameters', type: { @@ -66,7 +65,6 @@ def self.mapper() class_name: 'ProductUpdateParameters', model_properties: { name: { - client_side_validation: true, required: false, serialized_name: 'name', constraints: { @@ -78,7 +76,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', constraints: { @@ -90,7 +87,6 @@ def self.mapper() } }, terms: { - client_side_validation: true, required: false, serialized_name: 'terms', type: { @@ -98,7 +94,6 @@ def self.mapper() } }, subscription_required: { - client_side_validation: true, required: false, serialized_name: 'subscriptionRequired', type: { @@ -106,7 +101,6 @@ def self.mapper() } }, approval_required: { - client_side_validation: true, required: false, serialized_name: 'approvalRequired', type: { @@ -114,7 +108,6 @@ def self.mapper() } }, subscriptions_limit: { - client_side_validation: true, required: false, serialized_name: 'subscriptionsLimit', type: { @@ -122,7 +115,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, serialized_name: 'state', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/property_collection.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/property_collection.rb index 5baf397766..7861f1f413 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/property_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/property_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'PropertyCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'PropertyCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'PropertyContractElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/property_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/property_contract.rb index 0f161d0a0f..c1141fb3ca 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/property_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/property_contract.rb @@ -41,7 +41,6 @@ class PropertyContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'PropertyContract', type: { @@ -49,7 +48,6 @@ def self.mapper() class_name: 'PropertyContract', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -58,7 +56,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: true, serialized_name: 'name', constraints: { @@ -71,7 +68,6 @@ def self.mapper() } }, value: { - client_side_validation: true, required: true, serialized_name: 'value', constraints: { @@ -83,7 +79,6 @@ def self.mapper() } }, tags: { - client_side_validation: true, required: false, serialized_name: 'tags', constraints: { @@ -92,7 +87,6 @@ def self.mapper() type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -102,7 +96,6 @@ def self.mapper() } }, secret: { - client_side_validation: true, required: false, serialized_name: 'secret', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/property_create_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/property_create_parameters.rb index 60153975bc..28af2e8b74 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/property_create_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/property_create_parameters.rb @@ -35,7 +35,6 @@ class PropertyCreateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'PropertyCreateParameters', type: { @@ -43,7 +42,6 @@ def self.mapper() class_name: 'PropertyCreateParameters', model_properties: { name: { - client_side_validation: true, required: true, serialized_name: 'name', constraints: { @@ -56,7 +54,6 @@ def self.mapper() } }, value: { - client_side_validation: true, required: true, serialized_name: 'value', constraints: { @@ -68,7 +65,6 @@ def self.mapper() } }, tags: { - client_side_validation: true, required: false, serialized_name: 'tags', constraints: { @@ -77,7 +73,6 @@ def self.mapper() type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -87,7 +82,6 @@ def self.mapper() } }, secret: { - client_side_validation: true, required: false, serialized_name: 'secret', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/property_update_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/property_update_parameters.rb index 2ed7dfd3e6..66c7138ec7 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/property_update_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/property_update_parameters.rb @@ -35,7 +35,6 @@ class PropertyUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'PropertyUpdateParameters', type: { @@ -43,7 +42,6 @@ def self.mapper() class_name: 'PropertyUpdateParameters', model_properties: { name: { - client_side_validation: true, required: false, serialized_name: 'name', constraints: { @@ -56,7 +54,6 @@ def self.mapper() } }, value: { - client_side_validation: true, required: false, serialized_name: 'value', constraints: { @@ -68,7 +65,6 @@ def self.mapper() } }, tags: { - client_side_validation: true, required: false, serialized_name: 'tags', constraints: { @@ -77,7 +73,6 @@ def self.mapper() type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -87,7 +82,6 @@ def self.mapper() } }, secret: { - client_side_validation: true, required: false, serialized_name: 'secret', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/quota_counter_collection.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/quota_counter_collection.rb index bf1ef2a818..14f48b77f0 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/quota_counter_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/quota_counter_collection.rb @@ -28,7 +28,6 @@ class QuotaCounterCollection # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'QuotaCounterCollection', type: { @@ -36,13 +35,11 @@ def self.mapper() class_name: 'QuotaCounterCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'QuotaCounterContractElementType', type: { @@ -53,7 +50,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -61,7 +57,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/quota_counter_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/quota_counter_contract.rb index 66b34a38d0..c2f220105a 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/quota_counter_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/quota_counter_contract.rb @@ -38,7 +38,6 @@ class QuotaCounterContract < QuotaCounterValueContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'QuotaCounterContract', type: { @@ -46,7 +45,6 @@ def self.mapper() class_name: 'QuotaCounterContract', model_properties: { calls_count: { - client_side_validation: true, required: false, serialized_name: 'callsCount', type: { @@ -54,7 +52,6 @@ def self.mapper() } }, kb_transferred: { - client_side_validation: true, required: false, serialized_name: 'kbTransferred', type: { @@ -62,7 +59,6 @@ def self.mapper() } }, counter_key: { - client_side_validation: true, required: true, serialized_name: 'counterKey', constraints: { @@ -73,7 +69,6 @@ def self.mapper() } }, period_key: { - client_side_validation: true, required: true, serialized_name: 'periodKey', constraints: { @@ -84,7 +79,6 @@ def self.mapper() } }, period_start_time: { - client_side_validation: true, required: true, serialized_name: 'periodStartTime', type: { @@ -92,7 +86,6 @@ def self.mapper() } }, period_end_time: { - client_side_validation: true, required: true, serialized_name: 'periodEndTime', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/quota_counter_value_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/quota_counter_value_contract.rb index 7d623615b2..f8fbcfd706 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/quota_counter_value_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/quota_counter_value_contract.rb @@ -25,7 +25,6 @@ class QuotaCounterValueContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'QuotaCounterValueContract', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'QuotaCounterValueContract', model_properties: { calls_count: { - client_side_validation: true, required: false, serialized_name: 'callsCount', type: { @@ -41,7 +39,6 @@ def self.mapper() } }, kb_transferred: { - client_side_validation: true, required: false, serialized_name: 'kbTransferred', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/region_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/region_contract.rb index c2a01459ab..35f8d288d7 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/region_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/region_contract.rb @@ -25,7 +25,6 @@ class RegionContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RegionContract', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'RegionContract', model_properties: { name: { - client_side_validation: true, required: true, serialized_name: 'name', type: { @@ -41,7 +39,6 @@ def self.mapper() } }, is_master_region: { - client_side_validation: true, required: true, serialized_name: 'isMasterRegion', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/region_list_result.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/region_list_result.rb index c9d9124731..e822c0d74d 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/region_list_result.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/region_list_result.rb @@ -22,7 +22,6 @@ class RegionListResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RegionListResult', type: { @@ -30,13 +29,11 @@ def self.mapper() class_name: 'RegionListResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'RegionContractElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/report_collection.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/report_collection.rb index 80368809e1..8ab1328d20 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/report_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/report_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ReportCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'ReportCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ReportRecordContractElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/report_record_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/report_record_contract.rb index ffb50beeea..29eae9ab96 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/report_record_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/report_record_contract.rb @@ -110,7 +110,6 @@ class ReportRecordContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ReportRecordContract', type: { @@ -118,7 +117,6 @@ def self.mapper() class_name: 'ReportRecordContract', model_properties: { name: { - client_side_validation: true, required: false, serialized_name: 'name', type: { @@ -126,7 +124,6 @@ def self.mapper() } }, timestamp: { - client_side_validation: true, required: false, serialized_name: 'timestamp', type: { @@ -134,7 +131,6 @@ def self.mapper() } }, interval: { - client_side_validation: true, required: false, serialized_name: 'interval', type: { @@ -142,7 +138,6 @@ def self.mapper() } }, country: { - client_side_validation: true, required: false, serialized_name: 'country', type: { @@ -150,7 +145,6 @@ def self.mapper() } }, region: { - client_side_validation: true, required: false, serialized_name: 'region', type: { @@ -158,7 +152,6 @@ def self.mapper() } }, zip: { - client_side_validation: true, required: false, serialized_name: 'zip', type: { @@ -166,7 +159,6 @@ def self.mapper() } }, user_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'userId', @@ -175,7 +167,6 @@ def self.mapper() } }, product_id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'productId', @@ -184,7 +175,6 @@ def self.mapper() } }, api_id: { - client_side_validation: true, required: false, serialized_name: 'apiId', type: { @@ -192,7 +182,6 @@ def self.mapper() } }, operation_id: { - client_side_validation: true, required: false, serialized_name: 'operationId', type: { @@ -200,7 +189,6 @@ def self.mapper() } }, api_region: { - client_side_validation: true, required: false, serialized_name: 'apiRegion', type: { @@ -208,7 +196,6 @@ def self.mapper() } }, subscription_id: { - client_side_validation: true, required: false, serialized_name: 'subscriptionId', type: { @@ -216,7 +203,6 @@ def self.mapper() } }, call_count_success: { - client_side_validation: true, required: false, serialized_name: 'callCountSuccess', type: { @@ -224,7 +210,6 @@ def self.mapper() } }, call_count_blocked: { - client_side_validation: true, required: false, serialized_name: 'callCountBlocked', type: { @@ -232,7 +217,6 @@ def self.mapper() } }, call_count_failed: { - client_side_validation: true, required: false, serialized_name: 'callCountFailed', type: { @@ -240,7 +224,6 @@ def self.mapper() } }, call_count_other: { - client_side_validation: true, required: false, serialized_name: 'callCountOther', type: { @@ -248,7 +231,6 @@ def self.mapper() } }, call_count_total: { - client_side_validation: true, required: false, serialized_name: 'callCountTotal', type: { @@ -256,7 +238,6 @@ def self.mapper() } }, bandwidth: { - client_side_validation: true, required: false, serialized_name: 'bandwidth', type: { @@ -264,7 +245,6 @@ def self.mapper() } }, cache_hit_count: { - client_side_validation: true, required: false, serialized_name: 'cacheHitCount', type: { @@ -272,7 +252,6 @@ def self.mapper() } }, cache_miss_count: { - client_side_validation: true, required: false, serialized_name: 'cacheMissCount', type: { @@ -280,7 +259,6 @@ def self.mapper() } }, api_time_avg: { - client_side_validation: true, required: false, serialized_name: 'apiTimeAvg', type: { @@ -288,7 +266,6 @@ def self.mapper() } }, api_time_min: { - client_side_validation: true, required: false, serialized_name: 'apiTimeMin', type: { @@ -296,7 +273,6 @@ def self.mapper() } }, api_time_max: { - client_side_validation: true, required: false, serialized_name: 'apiTimeMax', type: { @@ -304,7 +280,6 @@ def self.mapper() } }, service_time_avg: { - client_side_validation: true, required: false, serialized_name: 'serviceTimeAvg', type: { @@ -312,7 +287,6 @@ def self.mapper() } }, service_time_min: { - client_side_validation: true, required: false, serialized_name: 'serviceTimeMin', type: { @@ -320,7 +294,6 @@ def self.mapper() } }, service_time_max: { - client_side_validation: true, required: false, serialized_name: 'serviceTimeMax', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/representation_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/representation_contract.rb index 70eb452ab0..657ee5df30 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/representation_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/representation_contract.rb @@ -26,7 +26,6 @@ class RepresentationContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RepresentationContract', type: { @@ -34,7 +33,6 @@ def self.mapper() class_name: 'RepresentationContract', model_properties: { content_type: { - client_side_validation: true, required: true, serialized_name: 'contentType', type: { @@ -42,7 +40,6 @@ def self.mapper() } }, sample: { - client_side_validation: true, required: false, serialized_name: 'sample', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/request_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/request_contract.rb index 89fc1f1e51..862b827b62 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/request_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/request_contract.rb @@ -34,7 +34,6 @@ class RequestContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RequestContract', type: { @@ -42,7 +41,6 @@ def self.mapper() class_name: 'RequestContract', model_properties: { description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -50,13 +48,11 @@ def self.mapper() } }, query_parameters: { - client_side_validation: true, required: false, serialized_name: 'queryParameters', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ParameterContractElementType', type: { @@ -67,13 +63,11 @@ def self.mapper() } }, headers: { - client_side_validation: true, required: false, serialized_name: 'headers', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ParameterContractElementType', type: { @@ -84,13 +78,11 @@ def self.mapper() } }, representations: { - client_side_validation: true, required: false, serialized_name: 'representations', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'RepresentationContractElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/resource.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/resource.rb index 456714c79c..649edb1f41 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/resource.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/resource.rb @@ -29,22 +29,12 @@ class Resource attr_accessor :tags - # @return [String] the name of the resource group of the resource. - def resource_group - unless self.id.nil? - groups = self.id.match(/.+\/resourceGroups\/([^\/]+)\/.+/) - groups.captures[0].strip if groups - end - end - - # # Mapper for Resource class as Ruby Hash. # This will be used for serialization/deserialization. # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Resource', type: { @@ -52,7 +42,6 @@ def self.mapper() class_name: 'Resource', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -61,7 +50,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, serialized_name: 'name', type: { @@ -69,7 +57,6 @@ def self.mapper() } }, type: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'type', @@ -78,7 +65,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: true, serialized_name: 'location', type: { @@ -86,13 +72,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_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/result_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/result_contract.rb index 46a1654ca2..38fe4bbbf8 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/result_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/result_contract.rb @@ -29,7 +29,6 @@ class ResultContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ResultContract', type: { @@ -37,7 +36,6 @@ def self.mapper() class_name: 'ResultContract', model_properties: { status_code: { - client_side_validation: true, required: true, serialized_name: 'statusCode', constraints: { @@ -49,7 +47,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -57,13 +54,11 @@ def self.mapper() } }, representations: { - client_side_validation: true, required: false, serialized_name: 'representations', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'RepresentationContractElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/save_configuration_parameter.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/save_configuration_parameter.rb index bf0113e09d..e19802930e 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/save_configuration_parameter.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/save_configuration_parameter.rb @@ -28,7 +28,6 @@ class SaveConfigurationParameter # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SaveConfigurationParameter', type: { @@ -36,7 +35,6 @@ def self.mapper() class_name: 'SaveConfigurationParameter', model_properties: { branch: { - client_side_validation: true, required: true, serialized_name: 'branch', type: { @@ -44,7 +42,6 @@ def self.mapper() } }, force: { - client_side_validation: true, required: false, serialized_name: 'force', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_collection.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_collection.rb index cd7c1ee4aa..7d96639f51 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SubscriptionCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'SubscriptionCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'SubscriptionContractElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_contract.rb index ad79f37456..29226a0260 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_contract.rb @@ -91,7 +91,6 @@ class SubscriptionContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SubscriptionContract', type: { @@ -99,7 +98,6 @@ def self.mapper() class_name: 'SubscriptionContract', model_properties: { id: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'id', @@ -108,7 +106,6 @@ def self.mapper() } }, user_id: { - client_side_validation: true, required: false, serialized_name: 'userId', type: { @@ -116,7 +113,6 @@ def self.mapper() } }, product_id: { - client_side_validation: true, required: false, serialized_name: 'productId', type: { @@ -124,7 +120,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, serialized_name: 'name', constraints: { @@ -136,7 +131,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, serialized_name: 'state', type: { @@ -145,7 +139,6 @@ def self.mapper() } }, created_date: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'createdDate', @@ -154,7 +147,6 @@ def self.mapper() } }, start_date: { - client_side_validation: true, required: false, serialized_name: 'startDate', type: { @@ -162,7 +154,6 @@ def self.mapper() } }, expiration_date: { - client_side_validation: true, required: false, serialized_name: 'expirationDate', type: { @@ -170,7 +161,6 @@ def self.mapper() } }, end_date: { - client_side_validation: true, required: false, serialized_name: 'endDate', type: { @@ -178,7 +168,6 @@ def self.mapper() } }, notification_date: { - client_side_validation: true, required: false, serialized_name: 'notificationDate', type: { @@ -186,7 +175,6 @@ def self.mapper() } }, primary_key: { - client_side_validation: true, required: false, serialized_name: 'primaryKey', constraints: { @@ -198,7 +186,6 @@ def self.mapper() } }, secondary_key: { - client_side_validation: true, required: false, serialized_name: 'secondaryKey', constraints: { @@ -210,7 +197,6 @@ def self.mapper() } }, state_comment: { - client_side_validation: true, required: false, serialized_name: 'stateComment', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb index 483f14b7da..51725fff82 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb @@ -51,7 +51,6 @@ class SubscriptionCreateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SubscriptionCreateParameters', type: { @@ -59,7 +58,6 @@ def self.mapper() class_name: 'SubscriptionCreateParameters', model_properties: { user_id: { - client_side_validation: true, required: true, serialized_name: 'userId', type: { @@ -67,7 +65,6 @@ def self.mapper() } }, product_id: { - client_side_validation: true, required: true, serialized_name: 'productId', type: { @@ -75,7 +72,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: true, serialized_name: 'name', constraints: { @@ -87,7 +83,6 @@ def self.mapper() } }, primary_key: { - client_side_validation: true, required: false, serialized_name: 'primaryKey', constraints: { @@ -99,7 +94,6 @@ def self.mapper() } }, secondary_key: { - client_side_validation: true, required: false, serialized_name: 'secondaryKey', constraints: { @@ -111,7 +105,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, serialized_name: 'state', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_key_parameter_names_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_key_parameter_names_contract.rb index 19369231fa..1b9e8c3ec2 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_key_parameter_names_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_key_parameter_names_contract.rb @@ -25,7 +25,6 @@ class SubscriptionKeyParameterNamesContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SubscriptionKeyParameterNamesContract', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'SubscriptionKeyParameterNamesContract', model_properties: { header: { - client_side_validation: true, required: false, serialized_name: 'header', type: { @@ -41,7 +39,6 @@ def self.mapper() } }, query: { - client_side_validation: true, required: false, serialized_name: 'query', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_update_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_update_parameters.rb index 46a29f3e08..b963321d24 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_update_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_update_parameters.rb @@ -53,7 +53,6 @@ class SubscriptionUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'SubscriptionUpdateParameters', type: { @@ -61,7 +60,6 @@ def self.mapper() class_name: 'SubscriptionUpdateParameters', model_properties: { user_id: { - client_side_validation: true, required: false, serialized_name: 'userId', type: { @@ -69,7 +67,6 @@ def self.mapper() } }, product_id: { - client_side_validation: true, required: false, serialized_name: 'productId', type: { @@ -77,7 +74,6 @@ def self.mapper() } }, expiration_date: { - client_side_validation: true, required: false, serialized_name: 'expirationDate', type: { @@ -85,7 +81,6 @@ def self.mapper() } }, name: { - client_side_validation: true, required: false, serialized_name: 'name', type: { @@ -93,7 +88,6 @@ def self.mapper() } }, primary_key: { - client_side_validation: true, required: false, serialized_name: 'primaryKey', constraints: { @@ -105,7 +99,6 @@ def self.mapper() } }, secondary_key: { - client_side_validation: true, required: false, serialized_name: 'secondaryKey', constraints: { @@ -117,7 +110,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, serialized_name: 'state', type: { @@ -126,7 +118,6 @@ def self.mapper() } }, state_comment: { - client_side_validation: true, required: false, serialized_name: 'stateComment', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/tenant_configuration_sync_state_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/tenant_configuration_sync_state_contract.rb index 5a09d23a78..944426c6a0 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/tenant_configuration_sync_state_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/tenant_configuration_sync_state_contract.rb @@ -49,7 +49,6 @@ class TenantConfigurationSyncStateContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'TenantConfigurationSyncStateContract', type: { @@ -57,7 +56,6 @@ def self.mapper() class_name: 'TenantConfigurationSyncStateContract', model_properties: { branch: { - client_side_validation: true, required: false, serialized_name: 'branch', type: { @@ -65,7 +63,6 @@ def self.mapper() } }, commit_id: { - client_side_validation: true, required: false, serialized_name: 'commitId', type: { @@ -73,7 +70,6 @@ def self.mapper() } }, is_export: { - client_side_validation: true, required: false, serialized_name: 'isExport', type: { @@ -81,7 +77,6 @@ def self.mapper() } }, is_synced: { - client_side_validation: true, required: false, serialized_name: 'isSynced', type: { @@ -89,7 +84,6 @@ def self.mapper() } }, is_git_enabled: { - client_side_validation: true, required: false, serialized_name: 'isGitEnabled', type: { @@ -97,7 +91,6 @@ def self.mapper() } }, sync_date: { - client_side_validation: true, required: false, serialized_name: 'syncDate', type: { @@ -105,7 +98,6 @@ def self.mapper() } }, configuration_change_date: { - client_side_validation: true, required: false, serialized_name: 'configurationChangeDate', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/token_body_parameter_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/token_body_parameter_contract.rb index 318f3b4a4f..d0c9436475 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/token_body_parameter_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/token_body_parameter_contract.rb @@ -25,7 +25,6 @@ class TokenBodyParameterContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'TokenBodyParameterContract', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'TokenBodyParameterContract', model_properties: { name: { - client_side_validation: true, required: true, serialized_name: 'name', type: { @@ -41,7 +39,6 @@ def self.mapper() } }, value: { - client_side_validation: true, required: true, serialized_name: 'value', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_collection.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_collection.rb index b066255f38..5e4a04d71d 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_collection.rb @@ -60,7 +60,6 @@ def get_next_page # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'UserCollection', type: { @@ -68,13 +67,11 @@ def self.mapper() class_name: 'UserCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'UserContractElementType', type: { @@ -85,7 +82,6 @@ def self.mapper() } }, count: { - client_side_validation: true, required: false, serialized_name: 'count', type: { @@ -93,7 +89,6 @@ def self.mapper() } }, next_link: { - client_side_validation: true, required: false, serialized_name: 'nextLink', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_contract.rb index f82f459b7c..8338db9327 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_contract.rb @@ -47,7 +47,6 @@ class UserContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'UserContract', type: { @@ -55,7 +54,6 @@ def self.mapper() class_name: 'UserContract', model_properties: { id: { - client_side_validation: true, required: false, serialized_name: 'id', type: { @@ -63,7 +61,6 @@ def self.mapper() } }, first_name: { - client_side_validation: true, required: false, serialized_name: 'firstName', type: { @@ -71,7 +68,6 @@ def self.mapper() } }, last_name: { - client_side_validation: true, required: false, serialized_name: 'lastName', type: { @@ -79,7 +75,6 @@ def self.mapper() } }, email: { - client_side_validation: true, required: false, serialized_name: 'email', type: { @@ -87,7 +82,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, serialized_name: 'state', type: { @@ -96,7 +90,6 @@ def self.mapper() } }, registration_date: { - client_side_validation: true, required: false, serialized_name: 'registrationDate', type: { @@ -104,7 +97,6 @@ def self.mapper() } }, note: { - client_side_validation: true, required: false, serialized_name: 'note', type: { @@ -112,14 +104,12 @@ def self.mapper() } }, identities: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'identities', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'UserIdentityContractElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_create_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_create_parameters.rb index 64c75a6182..0cf8f586c0 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_create_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_create_parameters.rb @@ -42,7 +42,6 @@ class UserCreateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'UserCreateParameters', type: { @@ -50,7 +49,6 @@ def self.mapper() class_name: 'UserCreateParameters', model_properties: { email: { - client_side_validation: true, required: true, serialized_name: 'email', constraints: { @@ -62,7 +60,6 @@ def self.mapper() } }, password: { - client_side_validation: true, required: true, serialized_name: 'password', type: { @@ -70,7 +67,6 @@ def self.mapper() } }, first_name: { - client_side_validation: true, required: true, serialized_name: 'firstName', constraints: { @@ -82,7 +78,6 @@ def self.mapper() } }, last_name: { - client_side_validation: true, required: true, serialized_name: 'lastName', constraints: { @@ -94,7 +89,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, serialized_name: 'state', default_value: 'Active', @@ -104,7 +98,6 @@ def self.mapper() } }, note: { - client_side_validation: true, required: false, serialized_name: 'note', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_identity_collection.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_identity_collection.rb index 61d2cc1fc4..44733961ab 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_identity_collection.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_identity_collection.rb @@ -22,7 +22,6 @@ class UserIdentityCollection # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'UserIdentityCollection', type: { @@ -30,13 +29,11 @@ def self.mapper() class_name: 'UserIdentityCollection', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'UserIdentityContractElementType', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_identity_contract.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_identity_contract.rb index b56fa43ea8..5690a80ecd 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_identity_contract.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_identity_contract.rb @@ -25,7 +25,6 @@ class UserIdentityContract # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'UserIdentityContract', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'UserIdentityContract', model_properties: { provider: { - client_side_validation: true, required: false, serialized_name: 'provider', type: { @@ -41,7 +39,6 @@ def self.mapper() } }, id: { - client_side_validation: true, required: false, serialized_name: 'id', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_token_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_token_parameters.rb index dba0db0e27..2857fdc20c 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_token_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_token_parameters.rb @@ -30,7 +30,6 @@ class UserTokenParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'UserTokenParameters', type: { @@ -38,7 +37,6 @@ def self.mapper() class_name: 'UserTokenParameters', model_properties: { key_type: { - client_side_validation: true, required: true, serialized_name: 'keyType', default_value: 'primary', @@ -48,7 +46,6 @@ def self.mapper() } }, expiry: { - client_side_validation: true, required: true, serialized_name: 'expiry', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_token_result.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_token_result.rb index 1daf73d071..b72fce9aef 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_token_result.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_token_result.rb @@ -22,7 +22,6 @@ class UserTokenResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'UserTokenResult', type: { @@ -30,7 +29,6 @@ def self.mapper() class_name: 'UserTokenResult', model_properties: { value: { - client_side_validation: true, required: false, serialized_name: 'value', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_update_parameters.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_update_parameters.rb index a418874e7c..337b3155d4 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_update_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_update_parameters.rb @@ -38,7 +38,6 @@ class UserUpdateParameters # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'UserUpdateParameters', type: { @@ -46,7 +45,6 @@ def self.mapper() class_name: 'UserUpdateParameters', model_properties: { email: { - client_side_validation: true, required: false, serialized_name: 'email', type: { @@ -54,7 +52,6 @@ def self.mapper() } }, password: { - client_side_validation: true, required: false, serialized_name: 'password', type: { @@ -62,7 +59,6 @@ def self.mapper() } }, first_name: { - client_side_validation: true, required: false, serialized_name: 'firstName', constraints: { @@ -74,7 +70,6 @@ def self.mapper() } }, last_name: { - client_side_validation: true, required: false, serialized_name: 'lastName', constraints: { @@ -86,7 +81,6 @@ def self.mapper() } }, state: { - client_side_validation: true, required: false, serialized_name: 'state', type: { @@ -95,7 +89,6 @@ def self.mapper() } }, note: { - client_side_validation: true, required: false, serialized_name: 'note', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/virtual_network_configuration.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/virtual_network_configuration.rb index 4b969e30fe..dbf3a8842d 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/virtual_network_configuration.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/models/virtual_network_configuration.rb @@ -34,7 +34,6 @@ class VirtualNetworkConfiguration # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'VirtualNetworkConfiguration', type: { @@ -42,7 +41,6 @@ def self.mapper() class_name: 'VirtualNetworkConfiguration', model_properties: { vnetid: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'vnetid', @@ -51,7 +49,6 @@ def self.mapper() } }, subnetname: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'subnetname', @@ -60,7 +57,6 @@ def self.mapper() } }, subnet_resource_id: { - client_side_validation: true, required: false, serialized_name: 'subnetResourceId', constraints: { @@ -71,7 +67,6 @@ def self.mapper() } }, location: { - client_side_validation: true, required: false, serialized_name: 'location', type: { diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/network_status.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/network_status.rb index 04e0bf8efd..85ba5f74be 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/network_status.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/network_status.rb @@ -33,8 +33,8 @@ def initialize(client) # # @return [NetworkStatusContract] operation results. # - def get_by_service(resource_group_name, service_name, custom_headers:nil) - response = get_by_service_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get_by_service(resource_group_name, service_name, custom_headers = nil) + response = get_by_service_async(resource_group_name, service_name, custom_headers).value! response.body unless response.nil? end @@ -50,8 +50,8 @@ def get_by_service(resource_group_name, service_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_by_service_with_http_info(resource_group_name, service_name, custom_headers:nil) - get_by_service_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get_by_service_with_http_info(resource_group_name, service_name, custom_headers = nil) + get_by_service_async(resource_group_name, service_name, custom_headers).value! end # @@ -66,18 +66,14 @@ def get_by_service_with_http_info(resource_group_name, service_name, custom_head # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_by_service_async(resource_group_name, service_name, custom_headers:nil) + def get_by_service_async(resource_group_name, service_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, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/open_id_connect_providers.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/open_id_connect_providers.rb index af50dbf535..980ca68b67 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/open_id_connect_providers.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/open_id_connect_providers.rb @@ -40,8 +40,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_service_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) first_page.get_all_items end @@ -64,8 +64,8 @@ def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! end # @@ -87,20 +87,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, filter:nil # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -156,8 +150,8 @@ def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil # # @return [OpenidConnectProviderContract] operation results. # - def get(resource_group_name, service_name, opid, custom_headers:nil) - response = get_async(resource_group_name, service_name, opid, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, opid, custom_headers = nil) + response = get_async(resource_group_name, service_name, opid, custom_headers).value! response.body unless response.nil? end @@ -172,8 +166,8 @@ def get(resource_group_name, service_name, opid, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, opid, custom_headers:nil) - get_async(resource_group_name, service_name, opid, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, opid, custom_headers = nil) + get_async(resource_group_name, service_name, opid, custom_headers).value! end # @@ -187,21 +181,15 @@ def get_with_http_info(resource_group_name, service_name, opid, custom_headers:n # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, opid, custom_headers:nil) + def get_async(resource_group_name, service_name, opid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'opid is nil' if opid.nil? - fail ArgumentError, "'opid' should satisfy the constraint - 'MaxLength': '256'" if !opid.nil? && opid.length > 256 - fail ArgumentError, "'opid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !opid.nil? && opid.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -257,8 +245,8 @@ def get_async(resource_group_name, service_name, opid, custom_headers:nil) # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, opid, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, opid, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, opid, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, opid, parameters, custom_headers).value! nil end @@ -274,8 +262,8 @@ def create_or_update(resource_group_name, service_name, opid, parameters, custom # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, opid, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, opid, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, opid, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, opid, parameters, custom_headers).value! end # @@ -290,27 +278,23 @@ def create_or_update_with_http_info(resource_group_name, service_name, opid, par # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, opid, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, opid, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'opid is nil' if opid.nil? - fail ArgumentError, "'opid' should satisfy the constraint - 'MaxLength': '256'" if !opid.nil? && opid.length > 256 - fail ArgumentError, "'opid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !opid.nil? && opid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_10_10::Models::OpenidConnectProviderCreateContract.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -361,8 +345,8 @@ def create_or_update_async(resource_group_name, service_name, opid, parameters, # will be added to the HTTP request. # # - def update(resource_group_name, service_name, opid, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, opid, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, opid, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, opid, parameters, if_match, custom_headers).value! nil end @@ -381,8 +365,8 @@ def update(resource_group_name, service_name, opid, parameters, if_match, custom # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, opid, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, opid, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, opid, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, opid, parameters, if_match, custom_headers).value! end # @@ -400,15 +384,10 @@ def update_with_http_info(resource_group_name, service_name, opid, parameters, i # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, opid, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, opid, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'opid is nil' if opid.nil? - fail ArgumentError, "'opid' should satisfy the constraint - 'MaxLength': '256'" if !opid.nil? && opid.length > 256 - fail ArgumentError, "'opid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !opid.nil? && opid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -416,13 +395,14 @@ def update_async(resource_group_name, service_name, opid, parameters, if_match, request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_10_10::Models::OpenidConnectProviderUpdateContract.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -474,8 +454,8 @@ def update_async(resource_group_name, service_name, opid, parameters, if_match, # # @return [ErrorBodyContract] operation results. # - def delete(resource_group_name, service_name, opid, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, opid, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, opid, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, opid, if_match, custom_headers).value! response.body unless response.nil? end @@ -494,8 +474,8 @@ def delete(resource_group_name, service_name, opid, if_match, custom_headers:nil # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, opid, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, opid, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, opid, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, opid, if_match, custom_headers).value! end # @@ -513,22 +493,16 @@ def delete_with_http_info(resource_group_name, service_name, opid, if_match, cus # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, opid, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, opid, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'opid is nil' if opid.nil? - fail ArgumentError, "'opid' should satisfy the constraint - 'MaxLength': '256'" if !opid.nil? && opid.length > 256 - fail ArgumentError, "'opid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !opid.nil? && opid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'if_match is nil' if if_match.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 @@ -584,8 +558,8 @@ def delete_async(resource_group_name, service_name, opid, if_match, custom_heade # # @return [OpenIdConnectProviderCollection] operation results. # - def list_by_service_next(next_page_link, custom_headers:nil) - response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -599,8 +573,8 @@ def list_by_service_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) - list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! end # @@ -613,12 +587,11 @@ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_next_async(next_page_link, custom_headers:nil) + def list_by_service_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 @@ -682,12 +655,12 @@ def list_by_service_next_async(next_page_link, custom_headers:nil) # @return [OpenIdConnectProviderCollection] which provide lazy access to pages # of the response. # - def list_by_service_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_service_next_async(next_page_link, custom_headers:custom_headers) + list_by_service_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/policy_snippets.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/policy_snippets.rb index f5ec88b6ba..e2d7bafd28 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/policy_snippets.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/policy_snippets.rb @@ -33,8 +33,8 @@ def initialize(client) # # @return [PolicySnippetsCollection] operation results. # - def list_by_service(resource_group_name, service_name, scope:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, scope:scope, custom_headers:custom_headers).value! + def list_by_service(resource_group_name, service_name, scope = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, scope, custom_headers).value! response.body unless response.nil? end @@ -50,8 +50,8 @@ def list_by_service(resource_group_name, service_name, scope:nil, custom_headers # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, scope:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, scope:scope, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, scope = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, scope, custom_headers).value! end # @@ -66,18 +66,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, scope:nil, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, scope:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, scope = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/product_apis.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/product_apis.rb index 630e83f4f0..93af689fdb 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/product_apis.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/product_apis.rb @@ -49,8 +49,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_products(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_products_as_lazy(resource_group_name, service_name, product_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_products(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_products_as_lazy(resource_group_name, service_name, product_id, filter, top, skip, custom_headers) first_page.get_all_items end @@ -82,8 +82,8 @@ def list_by_products(resource_group_name, service_name, product_id, filter:nil, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_products_with_http_info(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_products_async(resource_group_name, service_name, product_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_products_with_http_info(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_products_async(resource_group_name, service_name, product_id, filter, top, skip, custom_headers).value! end # @@ -114,24 +114,15 @@ def list_by_products_with_http_info(resource_group_name, service_name, product_i # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_products_async(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_products_async(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -189,8 +180,8 @@ def list_by_products_async(resource_group_name, service_name, product_id, filter # will be added to the HTTP request. # # - def create(resource_group_name, service_name, product_id, api_id, custom_headers:nil) - response = create_async(resource_group_name, service_name, product_id, api_id, custom_headers:custom_headers).value! + def create(resource_group_name, service_name, product_id, api_id, custom_headers = nil) + response = create_async(resource_group_name, service_name, product_id, api_id, custom_headers).value! nil end @@ -208,8 +199,8 @@ def create(resource_group_name, service_name, product_id, api_id, custom_headers # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_with_http_info(resource_group_name, service_name, product_id, api_id, custom_headers:nil) - create_async(resource_group_name, service_name, product_id, api_id, custom_headers:custom_headers).value! + def create_with_http_info(resource_group_name, service_name, product_id, api_id, custom_headers = nil) + create_async(resource_group_name, service_name, product_id, api_id, custom_headers).value! end # @@ -226,26 +217,16 @@ def create_with_http_info(resource_group_name, service_name, product_id, api_id, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_async(resource_group_name, service_name, product_id, api_id, custom_headers:nil) + def create_async(resource_group_name, service_name, product_id, api_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -293,8 +274,8 @@ def create_async(resource_group_name, service_name, product_id, api_id, custom_h # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, product_id, api_id, custom_headers:nil) - response = delete_async(resource_group_name, service_name, product_id, api_id, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, product_id, api_id, custom_headers = nil) + response = delete_async(resource_group_name, service_name, product_id, api_id, custom_headers).value! nil end @@ -312,8 +293,8 @@ def delete(resource_group_name, service_name, product_id, api_id, custom_headers # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, product_id, api_id, custom_headers:nil) - delete_async(resource_group_name, service_name, product_id, api_id, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, product_id, api_id, custom_headers = nil) + delete_async(resource_group_name, service_name, product_id, api_id, custom_headers).value! end # @@ -330,26 +311,16 @@ def delete_with_http_info(resource_group_name, service_name, product_id, api_id, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, product_id, api_id, custom_headers:nil) + def delete_async(resource_group_name, service_name, product_id, api_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'api_id is nil' if api_id.nil? - fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256 - fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1 - fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -394,8 +365,8 @@ def delete_async(resource_group_name, service_name, product_id, api_id, custom_h # # @return [ApiCollection] operation results. # - def list_by_products_next(next_page_link, custom_headers:nil) - response = list_by_products_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_products_next(next_page_link, custom_headers = nil) + response = list_by_products_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -409,8 +380,8 @@ def list_by_products_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_products_next_with_http_info(next_page_link, custom_headers:nil) - list_by_products_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_products_next_with_http_info(next_page_link, custom_headers = nil) + list_by_products_next_async(next_page_link, custom_headers).value! end # @@ -423,12 +394,11 @@ def list_by_products_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_products_next_async(next_page_link, custom_headers:nil) + def list_by_products_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 @@ -500,12 +470,12 @@ def list_by_products_next_async(next_page_link, custom_headers:nil) # # @return [ApiCollection] which provide lazy access to pages of the response. # - def list_by_products_as_lazy(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_products_async(resource_group_name, service_name, product_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_products_as_lazy(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_products_async(resource_group_name, service_name, product_id, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_products_next_async(next_page_link, custom_headers:custom_headers) + list_by_products_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/product_groups.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/product_groups.rb index 1c5068c67e..1c62c336a8 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/product_groups.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/product_groups.rb @@ -47,8 +47,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_products(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_products_as_lazy(resource_group_name, service_name, product_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_products(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_products_as_lazy(resource_group_name, service_name, product_id, filter, top, skip, custom_headers) first_page.get_all_items end @@ -78,8 +78,8 @@ def list_by_products(resource_group_name, service_name, product_id, filter:nil, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_products_with_http_info(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_products_async(resource_group_name, service_name, product_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_products_with_http_info(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_products_async(resource_group_name, service_name, product_id, filter, top, skip, custom_headers).value! end # @@ -108,24 +108,15 @@ def list_by_products_with_http_info(resource_group_name, service_name, product_i # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_products_async(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_products_async(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -184,8 +175,8 @@ def list_by_products_async(resource_group_name, service_name, product_id, filter # will be added to the HTTP request. # # - def create(resource_group_name, service_name, product_id, group_id, custom_headers:nil) - response = create_async(resource_group_name, service_name, product_id, group_id, custom_headers:custom_headers).value! + def create(resource_group_name, service_name, product_id, group_id, custom_headers = nil) + response = create_async(resource_group_name, service_name, product_id, group_id, custom_headers).value! nil end @@ -204,8 +195,8 @@ def create(resource_group_name, service_name, product_id, group_id, custom_heade # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_with_http_info(resource_group_name, service_name, product_id, group_id, custom_headers:nil) - create_async(resource_group_name, service_name, product_id, group_id, custom_headers:custom_headers).value! + def create_with_http_info(resource_group_name, service_name, product_id, group_id, custom_headers = nil) + create_async(resource_group_name, service_name, product_id, group_id, custom_headers).value! end # @@ -223,26 +214,16 @@ def create_with_http_info(resource_group_name, service_name, product_id, group_i # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_async(resource_group_name, service_name, product_id, group_id, custom_headers:nil) + def create_async(resource_group_name, service_name, product_id, group_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'group_id is nil' if group_id.nil? - fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '256'" if !group_id.nil? && group_id.length > 256 - fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 - fail ArgumentError, "'group_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !group_id.nil? && group_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -291,8 +272,8 @@ def create_async(resource_group_name, service_name, product_id, group_id, custom # # @return [ErrorBodyContract] operation results. # - def delete(resource_group_name, service_name, product_id, group_id, custom_headers:nil) - response = delete_async(resource_group_name, service_name, product_id, group_id, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, product_id, group_id, custom_headers = nil) + response = delete_async(resource_group_name, service_name, product_id, group_id, custom_headers).value! response.body unless response.nil? end @@ -310,8 +291,8 @@ def delete(resource_group_name, service_name, product_id, group_id, custom_heade # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, product_id, group_id, custom_headers:nil) - delete_async(resource_group_name, service_name, product_id, group_id, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, product_id, group_id, custom_headers = nil) + delete_async(resource_group_name, service_name, product_id, group_id, custom_headers).value! end # @@ -328,26 +309,16 @@ def delete_with_http_info(resource_group_name, service_name, product_id, group_i # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, product_id, group_id, custom_headers:nil) + def delete_async(resource_group_name, service_name, product_id, group_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'group_id is nil' if group_id.nil? - fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '256'" if !group_id.nil? && group_id.length > 256 - fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 - fail ArgumentError, "'group_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !group_id.nil? && group_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -403,8 +374,8 @@ def delete_async(resource_group_name, service_name, product_id, group_id, custom # # @return [GroupCollection] operation results. # - def list_by_products_next(next_page_link, custom_headers:nil) - response = list_by_products_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_products_next(next_page_link, custom_headers = nil) + response = list_by_products_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -419,8 +390,8 @@ def list_by_products_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_products_next_with_http_info(next_page_link, custom_headers:nil) - list_by_products_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_products_next_with_http_info(next_page_link, custom_headers = nil) + list_by_products_next_async(next_page_link, custom_headers).value! end # @@ -434,12 +405,11 @@ def list_by_products_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_products_next_async(next_page_link, custom_headers:nil) + def list_by_products_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 @@ -509,12 +479,12 @@ def list_by_products_next_async(next_page_link, custom_headers:nil) # # @return [GroupCollection] which provide lazy access to pages of the response. # - def list_by_products_as_lazy(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_products_async(resource_group_name, service_name, product_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_products_as_lazy(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_products_async(resource_group_name, service_name, product_id, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_products_next_async(next_page_link, custom_headers:custom_headers) + list_by_products_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/product_policy.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/product_policy.rb index 5c01929439..ea4e72b41d 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/product_policy.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/product_policy.rb @@ -33,8 +33,8 @@ def initialize(client) # # @return [NOT_IMPLEMENTED] operation results. # - def get(resource_group_name, service_name, product_id, custom_headers:nil) - response = get_async(resource_group_name, service_name, product_id, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, product_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, product_id, custom_headers).value! response.body unless response.nil? end @@ -50,8 +50,8 @@ def get(resource_group_name, service_name, product_id, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, product_id, custom_headers:nil) - get_async(resource_group_name, service_name, product_id, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, product_id, custom_headers = nil) + get_async(resource_group_name, service_name, product_id, custom_headers).value! end # @@ -66,22 +66,15 @@ def get_with_http_info(resource_group_name, service_name, product_id, custom_hea # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, product_id, custom_headers:nil) + def get_async(resource_group_name, service_name, product_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -114,7 +107,6 @@ def get_async(resource_group_name, service_name, product_id, 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: { @@ -148,8 +140,8 @@ def get_async(resource_group_name, service_name, product_id, custom_headers:nil) # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, product_id, parameters, if_match, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, product_id, parameters, if_match, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers).value! nil end @@ -169,8 +161,8 @@ def create_or_update(resource_group_name, service_name, product_id, parameters, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, product_id, parameters, if_match, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, product_id, parameters, if_match, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers).value! end # @@ -189,16 +181,10 @@ def create_or_update_with_http_info(resource_group_name, service_name, product_i # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -206,16 +192,16 @@ def create_or_update_async(resource_group_name, service_name, product_id, parame request_headers = {} - request_headers['Content-Type'] = 'application/vnd.ms-azure-apim.policy+xml' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + request_headers['Content-Type'] = 'application/vnd.ms-azure-apim.policy+xml' + # Serialize Request request_mapper = { - client_side_validation: true, required: true, serialized_name: 'parameters', type: { @@ -223,6 +209,7 @@ def create_or_update_async(resource_group_name, service_name, product_id, parame } } 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.ApiManagement/service/{serviceName}/products/{productId}/policy' @@ -269,8 +256,8 @@ def create_or_update_async(resource_group_name, service_name, product_id, parame # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, product_id, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, product_id, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, product_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, product_id, if_match, custom_headers).value! nil end @@ -289,8 +276,8 @@ def delete(resource_group_name, service_name, product_id, if_match, custom_heade # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, product_id, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, product_id, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, product_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, product_id, if_match, custom_headers).value! end # @@ -308,23 +295,16 @@ def delete_with_http_info(resource_group_name, service_name, product_id, if_matc # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, product_id, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, product_id, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'if_match is nil' if if_match.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 diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/product_subscriptions.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/product_subscriptions.rb index d405e1276c..ab09e85102 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/product_subscriptions.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/product_subscriptions.rb @@ -50,8 +50,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_products(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_products_as_lazy(resource_group_name, service_name, product_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_products(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_products_as_lazy(resource_group_name, service_name, product_id, filter, top, skip, custom_headers) first_page.get_all_items end @@ -84,8 +84,8 @@ def list_by_products(resource_group_name, service_name, product_id, filter:nil, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_products_with_http_info(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_products_async(resource_group_name, service_name, product_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_products_with_http_info(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_products_async(resource_group_name, service_name, product_id, filter, top, skip, custom_headers).value! end # @@ -117,24 +117,15 @@ def list_by_products_with_http_info(resource_group_name, service_name, product_i # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_products_async(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_products_async(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -189,8 +180,8 @@ def list_by_products_async(resource_group_name, service_name, product_id, filter # # @return [SubscriptionCollection] operation results. # - def list_by_products_next(next_page_link, custom_headers:nil) - response = list_by_products_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_products_next(next_page_link, custom_headers = nil) + response = list_by_products_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -204,8 +195,8 @@ def list_by_products_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_products_next_with_http_info(next_page_link, custom_headers:nil) - list_by_products_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_products_next_with_http_info(next_page_link, custom_headers = nil) + list_by_products_next_async(next_page_link, custom_headers).value! end # @@ -218,12 +209,11 @@ def list_by_products_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_products_next_async(next_page_link, custom_headers:nil) + def list_by_products_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 @@ -297,12 +287,12 @@ def list_by_products_next_async(next_page_link, custom_headers:nil) # @return [SubscriptionCollection] which provide lazy access to pages of the # response. # - def list_by_products_as_lazy(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_products_async(resource_group_name, service_name, product_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_products_as_lazy(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_products_async(resource_group_name, service_name, product_id, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_products_next_async(next_page_link, custom_headers:custom_headers) + list_by_products_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/products.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/products.rb index c47525eb90..3c1fe90deb 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/products.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/products.rb @@ -48,8 +48,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip:nil, expand_groups:nil, custom_headers:nil) - first_page = list_by_service_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, expand_groups:expand_groups, custom_headers:custom_headers) + def list_by_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, expand_groups = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, expand_groups, custom_headers) first_page.get_all_items end @@ -80,8 +80,8 @@ def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, expand_groups:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, expand_groups:expand_groups, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, expand_groups = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, expand_groups, custom_headers).value! end # @@ -111,20 +111,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, filter:nil # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, expand_groups:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, expand_groups = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -181,8 +175,8 @@ def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil # # @return [ProductContract] operation results. # - def get(resource_group_name, service_name, product_id, custom_headers:nil) - response = get_async(resource_group_name, service_name, product_id, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, product_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, product_id, custom_headers).value! response.body unless response.nil? end @@ -198,8 +192,8 @@ def get(resource_group_name, service_name, product_id, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, product_id, custom_headers:nil) - get_async(resource_group_name, service_name, product_id, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, product_id, custom_headers = nil) + get_async(resource_group_name, service_name, product_id, custom_headers).value! end # @@ -214,22 +208,15 @@ def get_with_http_info(resource_group_name, service_name, product_id, custom_hea # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, product_id, custom_headers:nil) + def get_async(resource_group_name, service_name, product_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -286,8 +273,8 @@ def get_async(resource_group_name, service_name, product_id, custom_headers:nil) # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, product_id, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, product_id, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, product_id, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, product_id, parameters, custom_headers).value! nil end @@ -304,8 +291,8 @@ def create_or_update(resource_group_name, service_name, product_id, parameters, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, product_id, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, product_id, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, product_id, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, product_id, parameters, custom_headers).value! end # @@ -321,28 +308,23 @@ def create_or_update_with_http_info(resource_group_name, service_name, product_i # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, product_id, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, product_id, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_10_10::Models::ProductContract.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -394,8 +376,8 @@ def create_or_update_async(resource_group_name, service_name, product_id, parame # will be added to the HTTP request. # # - def update(resource_group_name, service_name, product_id, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, product_id, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers).value! nil end @@ -415,8 +397,8 @@ def update(resource_group_name, service_name, product_id, parameters, if_match, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, product_id, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, product_id, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers).value! end # @@ -435,16 +417,10 @@ def update_with_http_info(resource_group_name, service_name, product_id, paramet # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -452,13 +428,14 @@ def update_async(resource_group_name, service_name, product_id, parameters, if_m request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_10_10::Models::ProductUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -511,8 +488,8 @@ def update_async(resource_group_name, service_name, product_id, parameters, if_m # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, product_id, if_match, delete_subscriptions:nil, custom_headers:nil) - response = delete_async(resource_group_name, service_name, product_id, if_match, delete_subscriptions:delete_subscriptions, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, product_id, if_match, delete_subscriptions = nil, custom_headers = nil) + response = delete_async(resource_group_name, service_name, product_id, if_match, delete_subscriptions, custom_headers).value! nil end @@ -533,8 +510,8 @@ def delete(resource_group_name, service_name, product_id, if_match, delete_subsc # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, product_id, if_match, delete_subscriptions:nil, custom_headers:nil) - delete_async(resource_group_name, service_name, product_id, if_match, delete_subscriptions:delete_subscriptions, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, product_id, if_match, delete_subscriptions = nil, custom_headers = nil) + delete_async(resource_group_name, service_name, product_id, if_match, delete_subscriptions, custom_headers).value! end # @@ -554,23 +531,16 @@ def delete_with_http_info(resource_group_name, service_name, product_id, if_matc # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, product_id, if_match, delete_subscriptions:nil, custom_headers:nil) + def delete_async(resource_group_name, service_name, product_id, if_match, delete_subscriptions = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'product_id is nil' if product_id.nil? - fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '256'" if !product_id.nil? && product_id.length > 256 - fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1 - fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !product_id.nil? && product_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'if_match is nil' if if_match.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 @@ -616,8 +586,8 @@ def delete_async(resource_group_name, service_name, product_id, if_match, delete # # @return [ProductCollection] operation results. # - def list_by_service_next(next_page_link, custom_headers:nil) - response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -631,8 +601,8 @@ def list_by_service_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) - list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! end # @@ -645,12 +615,11 @@ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_next_async(next_page_link, custom_headers:nil) + def list_by_service_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 @@ -722,12 +691,12 @@ def list_by_service_next_async(next_page_link, custom_headers:nil) # @return [ProductCollection] which provide lazy access to pages of the # response. # - def list_by_service_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, expand_groups:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, expand_groups:expand_groups, custom_headers:custom_headers).value! + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, expand_groups = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, expand_groups, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_service_next_async(next_page_link, custom_headers:custom_headers) + list_by_service_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/properties.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/properties.rb index 70b7622e1a..54a25b09b0 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/properties.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/properties.rb @@ -40,8 +40,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_service_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) first_page.get_all_items end @@ -64,8 +64,8 @@ def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! end # @@ -87,20 +87,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, filter:nil # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -155,8 +149,8 @@ def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil # # @return [PropertyCollection] operation results. # - def list_by_service_next(next_page_link, custom_headers:nil) - response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -170,8 +164,8 @@ def list_by_service_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) - list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! end # @@ -184,12 +178,11 @@ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_next_async(next_page_link, custom_headers:nil) + def list_by_service_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 @@ -253,12 +246,12 @@ def list_by_service_next_async(next_page_link, custom_headers:nil) # @return [PropertyCollection] which provide lazy access to pages of the # response. # - def list_by_service_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_service_next_async(next_page_link, custom_headers:custom_headers) + list_by_service_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/property.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/property.rb index 50948cc660..478e47b4de 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/property.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/property.rb @@ -32,8 +32,8 @@ def initialize(client) # # @return [PropertyContract] operation results. # - def get(resource_group_name, service_name, prop_id, custom_headers:nil) - response = get_async(resource_group_name, service_name, prop_id, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, prop_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, prop_id, custom_headers).value! response.body unless response.nil? end @@ -48,8 +48,8 @@ def get(resource_group_name, service_name, prop_id, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, prop_id, custom_headers:nil) - get_async(resource_group_name, service_name, prop_id, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, prop_id, custom_headers = nil) + get_async(resource_group_name, service_name, prop_id, custom_headers).value! end # @@ -63,21 +63,15 @@ def get_with_http_info(resource_group_name, service_name, prop_id, custom_header # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, prop_id, custom_headers:nil) + def get_async(resource_group_name, service_name, prop_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'prop_id is nil' if prop_id.nil? - fail ArgumentError, "'prop_id' should satisfy the constraint - 'MaxLength': '256'" if !prop_id.nil? && prop_id.length > 256 - fail ArgumentError, "'prop_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !prop_id.nil? && prop_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -133,8 +127,8 @@ def get_async(resource_group_name, service_name, prop_id, custom_headers:nil) # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, prop_id, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, prop_id, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, prop_id, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, prop_id, parameters, custom_headers).value! nil end @@ -150,8 +144,8 @@ def create_or_update(resource_group_name, service_name, prop_id, parameters, cus # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, prop_id, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, prop_id, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, prop_id, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, prop_id, parameters, custom_headers).value! end # @@ -166,27 +160,23 @@ def create_or_update_with_http_info(resource_group_name, service_name, prop_id, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, prop_id, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, prop_id, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'prop_id is nil' if prop_id.nil? - fail ArgumentError, "'prop_id' should satisfy the constraint - 'MaxLength': '256'" if !prop_id.nil? && prop_id.length > 256 - fail ArgumentError, "'prop_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !prop_id.nil? && prop_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_10_10::Models::PropertyCreateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -237,8 +227,8 @@ def create_or_update_async(resource_group_name, service_name, prop_id, parameter # will be added to the HTTP request. # # - def update(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers).value! nil end @@ -257,8 +247,8 @@ def update(resource_group_name, service_name, prop_id, parameters, if_match, cus # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers).value! end # @@ -276,15 +266,10 @@ def update_with_http_info(resource_group_name, service_name, prop_id, parameters # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'prop_id is nil' if prop_id.nil? - fail ArgumentError, "'prop_id' should satisfy the constraint - 'MaxLength': '256'" if !prop_id.nil? && prop_id.length > 256 - fail ArgumentError, "'prop_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !prop_id.nil? && prop_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -292,13 +277,14 @@ def update_async(resource_group_name, service_name, prop_id, parameters, if_matc request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_10_10::Models::PropertyUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -349,8 +335,8 @@ def update_async(resource_group_name, service_name, prop_id, parameters, if_matc # # @return [ErrorBodyContract] operation results. # - def delete(resource_group_name, service_name, prop_id, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, prop_id, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, prop_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, prop_id, if_match, custom_headers).value! response.body unless response.nil? end @@ -368,8 +354,8 @@ def delete(resource_group_name, service_name, prop_id, if_match, custom_headers: # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, prop_id, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, prop_id, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, prop_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, prop_id, if_match, custom_headers).value! end # @@ -386,22 +372,16 @@ def delete_with_http_info(resource_group_name, service_name, prop_id, if_match, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, prop_id, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, prop_id, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'prop_id is nil' if prop_id.nil? - fail ArgumentError, "'prop_id' should satisfy the constraint - 'MaxLength': '256'" if !prop_id.nil? && prop_id.length > 256 - fail ArgumentError, "'prop_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !prop_id.nil? && prop_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'if_match is nil' if if_match.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 diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/quota_by_counter_keys.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/quota_by_counter_keys.rb index 3d1ae8343b..236caa4be1 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/quota_by_counter_keys.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/quota_by_counter_keys.rb @@ -34,8 +34,8 @@ def initialize(client) # # @return [QuotaCounterCollection] operation results. # - def list_by_service(resource_group_name, service_name, quota_counter_key, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, quota_counter_key, custom_headers:custom_headers).value! + def list_by_service(resource_group_name, service_name, quota_counter_key, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, quota_counter_key, custom_headers).value! response.body unless response.nil? end @@ -52,8 +52,8 @@ def list_by_service(resource_group_name, service_name, quota_counter_key, custom # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, quota_counter_key, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, quota_counter_key, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, quota_counter_key, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, quota_counter_key, custom_headers).value! end # @@ -69,19 +69,15 @@ def list_by_service_with_http_info(resource_group_name, service_name, quota_coun # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, quota_counter_key, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, quota_counter_key, 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, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'quota_counter_key is nil' if quota_counter_key.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 @@ -140,8 +136,8 @@ def list_by_service_async(resource_group_name, service_name, quota_counter_key, # will be added to the HTTP request. # # - def update(resource_group_name, service_name, quota_counter_key, parameters, custom_headers:nil) - response = update_async(resource_group_name, service_name, quota_counter_key, parameters, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, quota_counter_key, parameters, custom_headers = nil) + response = update_async(resource_group_name, service_name, quota_counter_key, parameters, custom_headers).value! nil end @@ -160,8 +156,8 @@ def update(resource_group_name, service_name, quota_counter_key, parameters, cus # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, quota_counter_key, parameters, custom_headers:nil) - update_async(resource_group_name, service_name, quota_counter_key, parameters, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, quota_counter_key, parameters, custom_headers = nil) + update_async(resource_group_name, service_name, quota_counter_key, parameters, custom_headers).value! end # @@ -179,12 +175,9 @@ def update_with_http_info(resource_group_name, service_name, quota_counter_key, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, quota_counter_key, parameters, custom_headers:nil) + def update_async(resource_group_name, service_name, quota_counter_key, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'quota_counter_key is nil' if quota_counter_key.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -192,12 +185,13 @@ def update_async(resource_group_name, service_name, quota_counter_key, parameter 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::ApiManagement::Mgmt::V2016_10_10::Models::QuotaCounterValueContract.mapper() request_content = @client.serialize(request_mapper, parameters) diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/quota_by_period_keys.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/quota_by_period_keys.rb index 2086cb52d4..3ef6886837 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/quota_by_period_keys.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/quota_by_period_keys.rb @@ -34,8 +34,8 @@ def initialize(client) # # @return [QuotaCounterContract] operation results. # - def get(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers:nil) - response = get_async(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers = nil) + response = get_async(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers).value! response.body unless response.nil? end @@ -52,8 +52,8 @@ def get(resource_group_name, service_name, quota_counter_key, quota_period_key, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers:nil) - get_async(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers = nil) + get_async(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers).value! end # @@ -69,20 +69,16 @@ def get_with_http_info(resource_group_name, service_name, quota_counter_key, quo # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers:nil) + def get_async(resource_group_name, service_name, quota_counter_key, quota_period_key, 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, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'quota_counter_key is nil' if quota_counter_key.nil? fail ArgumentError, 'quota_period_key is nil' if quota_period_key.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 @@ -140,8 +136,8 @@ def get_async(resource_group_name, service_name, quota_counter_key, quota_period # will be added to the HTTP request. # # - def update(resource_group_name, service_name, quota_counter_key, quota_period_key, parameters, custom_headers:nil) - response = update_async(resource_group_name, service_name, quota_counter_key, quota_period_key, parameters, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, quota_counter_key, quota_period_key, parameters, custom_headers = nil) + response = update_async(resource_group_name, service_name, quota_counter_key, quota_period_key, parameters, custom_headers).value! nil end @@ -159,8 +155,8 @@ def update(resource_group_name, service_name, quota_counter_key, quota_period_ke # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, quota_counter_key, quota_period_key, parameters, custom_headers:nil) - update_async(resource_group_name, service_name, quota_counter_key, quota_period_key, parameters, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, quota_counter_key, quota_period_key, parameters, custom_headers = nil) + update_async(resource_group_name, service_name, quota_counter_key, quota_period_key, parameters, custom_headers).value! end # @@ -177,12 +173,9 @@ def update_with_http_info(resource_group_name, service_name, quota_counter_key, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, quota_counter_key, quota_period_key, parameters, custom_headers:nil) + def update_async(resource_group_name, service_name, quota_counter_key, quota_period_key, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'quota_counter_key is nil' if quota_counter_key.nil? fail ArgumentError, 'quota_period_key is nil' if quota_period_key.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? @@ -191,12 +184,13 @@ def update_async(resource_group_name, service_name, quota_counter_key, quota_per 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::ApiManagement::Mgmt::V2016_10_10::Models::QuotaCounterValueContract.mapper() request_content = @client.serialize(request_mapper, parameters) diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/regions.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/regions.rb index 57705c1e85..78e70262e2 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/regions.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/regions.rb @@ -31,8 +31,8 @@ def initialize(client) # # @return [RegionListResult] operation results. # - def list_by_service(resource_group_name, service_name, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def list_by_service(resource_group_name, service_name, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, custom_headers).value! response.body unless response.nil? end @@ -46,8 +46,8 @@ def list_by_service(resource_group_name, service_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, custom_headers).value! end # @@ -60,18 +60,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, custom_hea # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/reports.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/reports.rb index 5119f2dbca..74fe4af141 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/reports.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/reports.rb @@ -43,8 +43,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, aggregation, filter:nil, top:nil, skip:nil, interval:nil, custom_headers:nil) - first_page = list_by_service_as_lazy(resource_group_name, service_name, aggregation, filter:filter, top:top, skip:skip, interval:interval, custom_headers:custom_headers) + def list_by_service(resource_group_name, service_name, aggregation, filter = nil, top = nil, skip = nil, interval = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, aggregation, filter, top, skip, interval, custom_headers) first_page.get_all_items end @@ -70,8 +70,8 @@ def list_by_service(resource_group_name, service_name, aggregation, filter:nil, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, aggregation, filter:nil, top:nil, skip:nil, interval:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, aggregation, filter:filter, top:top, skip:skip, interval:interval, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, aggregation, filter = nil, top = nil, skip = nil, interval = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, aggregation, filter, top, skip, interval, custom_headers).value! end # @@ -96,21 +96,15 @@ def list_by_service_with_http_info(resource_group_name, service_name, aggregatio # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, aggregation, filter:nil, top:nil, skip:nil, interval:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, aggregation, filter = nil, top = nil, skip = nil, interval = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'aggregation is nil' if aggregation.nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -165,8 +159,8 @@ def list_by_service_async(resource_group_name, service_name, aggregation, filter # # @return [ReportCollection] operation results. # - def list_by_service_next(next_page_link, custom_headers:nil) - response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -180,8 +174,8 @@ def list_by_service_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) - list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! end # @@ -194,12 +188,11 @@ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_next_async(next_page_link, custom_headers:nil) + def list_by_service_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 @@ -266,12 +259,12 @@ def list_by_service_next_async(next_page_link, custom_headers:nil) # @return [ReportCollection] which provide lazy access to pages of the # response. # - def list_by_service_as_lazy(resource_group_name, service_name, aggregation, filter:nil, top:nil, skip:nil, interval:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, aggregation, filter:filter, top:top, skip:skip, interval:interval, custom_headers:custom_headers).value! + def list_by_service_as_lazy(resource_group_name, service_name, aggregation, filter = nil, top = nil, skip = nil, interval = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, aggregation, filter, top, skip, interval, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_service_next_async(next_page_link, custom_headers:custom_headers) + list_by_service_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/subscriptions.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/subscriptions.rb index bf09fb3b35..d1ad3f9055 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/subscriptions.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/subscriptions.rb @@ -48,8 +48,8 @@ def initialize(client) # # @return [Array] operation results. # - def list(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) first_page.get_all_items end @@ -80,8 +80,8 @@ def list(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custo # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! end # @@ -111,20 +111,14 @@ def list_with_http_info(resource_group_name, service_name, filter:nil, top:nil, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -181,8 +175,8 @@ def list_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, # # @return [SubscriptionContract] operation results. # - def get(resource_group_name, service_name, sid, custom_headers:nil) - response = get_async(resource_group_name, service_name, sid, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, sid, custom_headers = nil) + response = get_async(resource_group_name, service_name, sid, custom_headers).value! response.body unless response.nil? end @@ -198,8 +192,8 @@ def get(resource_group_name, service_name, sid, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, sid, custom_headers:nil) - get_async(resource_group_name, service_name, sid, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, sid, custom_headers = nil) + get_async(resource_group_name, service_name, sid, custom_headers).value! end # @@ -214,21 +208,15 @@ def get_with_http_info(resource_group_name, service_name, sid, custom_headers:ni # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, sid, custom_headers:nil) + def get_async(resource_group_name, service_name, sid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'sid is nil' if sid.nil? - fail ArgumentError, "'sid' should satisfy the constraint - 'MaxLength': '256'" if !sid.nil? && sid.length > 256 - fail ArgumentError, "'sid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !sid.nil? && sid.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -286,8 +274,8 @@ def get_async(resource_group_name, service_name, sid, custom_headers:nil) # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, sid, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, sid, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, sid, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, sid, parameters, custom_headers).value! nil end @@ -305,8 +293,8 @@ def create_or_update(resource_group_name, service_name, sid, parameters, custom_ # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, sid, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, sid, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, sid, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, sid, parameters, custom_headers).value! end # @@ -323,27 +311,23 @@ def create_or_update_with_http_info(resource_group_name, service_name, sid, para # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, sid, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, sid, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'sid is nil' if sid.nil? - fail ArgumentError, "'sid' should satisfy the constraint - 'MaxLength': '256'" if !sid.nil? && sid.length > 256 - fail ArgumentError, "'sid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !sid.nil? && sid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_10_10::Models::SubscriptionCreateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -395,8 +379,8 @@ def create_or_update_async(resource_group_name, service_name, sid, parameters, c # will be added to the HTTP request. # # - def update(resource_group_name, service_name, sid, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, sid, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, sid, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, sid, parameters, if_match, custom_headers).value! nil end @@ -416,8 +400,8 @@ def update(resource_group_name, service_name, sid, parameters, if_match, custom_ # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, sid, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, sid, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, sid, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, sid, parameters, if_match, custom_headers).value! end # @@ -436,15 +420,10 @@ def update_with_http_info(resource_group_name, service_name, sid, parameters, if # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, sid, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, sid, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'sid is nil' if sid.nil? - fail ArgumentError, "'sid' should satisfy the constraint - 'MaxLength': '256'" if !sid.nil? && sid.length > 256 - fail ArgumentError, "'sid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !sid.nil? && sid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -452,13 +431,14 @@ def update_async(resource_group_name, service_name, sid, parameters, if_match, 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['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_10_10::Models::SubscriptionUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -509,8 +489,8 @@ def update_async(resource_group_name, service_name, sid, parameters, if_match, c # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, sid, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, sid, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, sid, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, sid, if_match, custom_headers).value! nil end @@ -529,8 +509,8 @@ def delete(resource_group_name, service_name, sid, if_match, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, sid, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, sid, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, sid, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, sid, if_match, custom_headers).value! end # @@ -548,22 +528,16 @@ def delete_with_http_info(resource_group_name, service_name, sid, if_match, cust # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, sid, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, sid, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'sid is nil' if sid.nil? - fail ArgumentError, "'sid' should satisfy the constraint - 'MaxLength': '256'" if !sid.nil? && sid.length > 256 - fail ArgumentError, "'sid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !sid.nil? && sid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'if_match is nil' if if_match.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 @@ -611,8 +585,8 @@ def delete_async(resource_group_name, service_name, sid, if_match, custom_header # will be added to the HTTP request. # # - def regenerate_primary_key(resource_group_name, service_name, sid, custom_headers:nil) - response = regenerate_primary_key_async(resource_group_name, service_name, sid, custom_headers:custom_headers).value! + def regenerate_primary_key(resource_group_name, service_name, sid, custom_headers = nil) + response = regenerate_primary_key_async(resource_group_name, service_name, sid, custom_headers).value! nil end @@ -629,8 +603,8 @@ def regenerate_primary_key(resource_group_name, service_name, sid, custom_header # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def regenerate_primary_key_with_http_info(resource_group_name, service_name, sid, custom_headers:nil) - regenerate_primary_key_async(resource_group_name, service_name, sid, custom_headers:custom_headers).value! + def regenerate_primary_key_with_http_info(resource_group_name, service_name, sid, custom_headers = nil) + regenerate_primary_key_async(resource_group_name, service_name, sid, custom_headers).value! end # @@ -646,21 +620,15 @@ def regenerate_primary_key_with_http_info(resource_group_name, service_name, sid # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def regenerate_primary_key_async(resource_group_name, service_name, sid, custom_headers:nil) + def regenerate_primary_key_async(resource_group_name, service_name, sid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'sid is nil' if sid.nil? - fail ArgumentError, "'sid' should satisfy the constraint - 'MaxLength': '256'" if !sid.nil? && sid.length > 256 - fail ArgumentError, "'sid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !sid.nil? && sid.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -707,8 +675,8 @@ def regenerate_primary_key_async(resource_group_name, service_name, sid, custom_ # will be added to the HTTP request. # # - def regenerate_secondary_key(resource_group_name, service_name, sid, custom_headers:nil) - response = regenerate_secondary_key_async(resource_group_name, service_name, sid, custom_headers:custom_headers).value! + def regenerate_secondary_key(resource_group_name, service_name, sid, custom_headers = nil) + response = regenerate_secondary_key_async(resource_group_name, service_name, sid, custom_headers).value! nil end @@ -725,8 +693,8 @@ def regenerate_secondary_key(resource_group_name, service_name, sid, custom_head # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def regenerate_secondary_key_with_http_info(resource_group_name, service_name, sid, custom_headers:nil) - regenerate_secondary_key_async(resource_group_name, service_name, sid, custom_headers:custom_headers).value! + def regenerate_secondary_key_with_http_info(resource_group_name, service_name, sid, custom_headers = nil) + regenerate_secondary_key_async(resource_group_name, service_name, sid, custom_headers).value! end # @@ -742,21 +710,15 @@ def regenerate_secondary_key_with_http_info(resource_group_name, service_name, s # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def regenerate_secondary_key_async(resource_group_name, service_name, sid, custom_headers:nil) + def regenerate_secondary_key_async(resource_group_name, service_name, sid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'sid is nil' if sid.nil? - fail ArgumentError, "'sid' should satisfy the constraint - 'MaxLength': '256'" if !sid.nil? && sid.length > 256 - fail ArgumentError, "'sid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !sid.nil? && sid.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -801,8 +763,8 @@ def regenerate_secondary_key_async(resource_group_name, service_name, sid, custo # # @return [SubscriptionCollection] 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 @@ -816,8 +778,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 # @@ -830,12 +792,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 @@ -907,12 +868,12 @@ def list_next_async(next_page_link, custom_headers:nil) # @return [SubscriptionCollection] which provide lazy access to pages of the # response. # - def list_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_async(resource_group_name, service_name, filter, top, skip, 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_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_access.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_access.rb index 0c587b6a37..4f3cfd5b61 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_access.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_access.rb @@ -31,8 +31,8 @@ def initialize(client) # # @return [AccessInformationContract] operation results. # - def get(resource_group_name, service_name, custom_headers:nil) - response = get_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, custom_headers = nil) + response = get_async(resource_group_name, service_name, custom_headers).value! response.body unless response.nil? end @@ -46,8 +46,8 @@ def get(resource_group_name, service_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, custom_headers:nil) - get_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, custom_headers = nil) + get_async(resource_group_name, service_name, custom_headers).value! end # @@ -60,18 +60,14 @@ def get_with_http_info(resource_group_name, service_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, custom_headers:nil) + def get_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 @@ -129,8 +125,8 @@ def get_async(resource_group_name, service_name, custom_headers:nil) # will be added to the HTTP request. # # - def update(resource_group_name, service_name, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, parameters, if_match, custom_headers).value! nil end @@ -148,8 +144,8 @@ def update(resource_group_name, service_name, parameters, if_match, custom_heade # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, parameters, if_match, custom_headers).value! end # @@ -166,12 +162,9 @@ def update_with_http_info(resource_group_name, service_name, parameters, if_matc # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -179,13 +172,14 @@ def update_async(resource_group_name, service_name, parameters, if_match, 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['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_10_10::Models::AccessInformationUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -231,8 +225,8 @@ def update_async(resource_group_name, service_name, parameters, if_match, custom # will be added to the HTTP request. # # - def regenerate_primary_key(resource_group_name, service_name, custom_headers:nil) - response = regenerate_primary_key_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def regenerate_primary_key(resource_group_name, service_name, custom_headers = nil) + response = regenerate_primary_key_async(resource_group_name, service_name, custom_headers).value! nil end @@ -246,8 +240,8 @@ def regenerate_primary_key(resource_group_name, service_name, custom_headers:nil # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def regenerate_primary_key_with_http_info(resource_group_name, service_name, custom_headers:nil) - regenerate_primary_key_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def regenerate_primary_key_with_http_info(resource_group_name, service_name, custom_headers = nil) + regenerate_primary_key_async(resource_group_name, service_name, custom_headers).value! end # @@ -260,18 +254,14 @@ def regenerate_primary_key_with_http_info(resource_group_name, service_name, cus # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def regenerate_primary_key_async(resource_group_name, service_name, custom_headers:nil) + def regenerate_primary_key_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 @@ -315,8 +305,8 @@ def regenerate_primary_key_async(resource_group_name, service_name, custom_heade # will be added to the HTTP request. # # - def regenerate_secondary_key(resource_group_name, service_name, custom_headers:nil) - response = regenerate_secondary_key_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def regenerate_secondary_key(resource_group_name, service_name, custom_headers = nil) + response = regenerate_secondary_key_async(resource_group_name, service_name, custom_headers).value! nil end @@ -330,8 +320,8 @@ def regenerate_secondary_key(resource_group_name, service_name, custom_headers:n # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def regenerate_secondary_key_with_http_info(resource_group_name, service_name, custom_headers:nil) - regenerate_secondary_key_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def regenerate_secondary_key_with_http_info(resource_group_name, service_name, custom_headers = nil) + regenerate_secondary_key_async(resource_group_name, service_name, custom_headers).value! end # @@ -344,18 +334,14 @@ def regenerate_secondary_key_with_http_info(resource_group_name, service_name, c # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def regenerate_secondary_key_async(resource_group_name, service_name, custom_headers:nil) + def regenerate_secondary_key_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_access_git.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_access_git.rb index 5e57170d38..124c02d6c5 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_access_git.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_access_git.rb @@ -31,8 +31,8 @@ def initialize(client) # # @return [AccessInformationContract] operation results. # - def get(resource_group_name, service_name, custom_headers:nil) - response = get_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, custom_headers = nil) + response = get_async(resource_group_name, service_name, custom_headers).value! response.body unless response.nil? end @@ -46,8 +46,8 @@ def get(resource_group_name, service_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, custom_headers:nil) - get_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, custom_headers = nil) + get_async(resource_group_name, service_name, custom_headers).value! end # @@ -60,18 +60,14 @@ def get_with_http_info(resource_group_name, service_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, custom_headers:nil) + def get_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 @@ -125,8 +121,8 @@ def get_async(resource_group_name, service_name, custom_headers:nil) # will be added to the HTTP request. # # - def regenerate_primary_key(resource_group_name, service_name, custom_headers:nil) - response = regenerate_primary_key_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def regenerate_primary_key(resource_group_name, service_name, custom_headers = nil) + response = regenerate_primary_key_async(resource_group_name, service_name, custom_headers).value! nil end @@ -140,8 +136,8 @@ def regenerate_primary_key(resource_group_name, service_name, custom_headers:nil # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def regenerate_primary_key_with_http_info(resource_group_name, service_name, custom_headers:nil) - regenerate_primary_key_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def regenerate_primary_key_with_http_info(resource_group_name, service_name, custom_headers = nil) + regenerate_primary_key_async(resource_group_name, service_name, custom_headers).value! end # @@ -154,18 +150,14 @@ def regenerate_primary_key_with_http_info(resource_group_name, service_name, cus # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def regenerate_primary_key_async(resource_group_name, service_name, custom_headers:nil) + def regenerate_primary_key_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 @@ -209,8 +201,8 @@ def regenerate_primary_key_async(resource_group_name, service_name, custom_heade # will be added to the HTTP request. # # - def regenerate_secondary_key(resource_group_name, service_name, custom_headers:nil) - response = regenerate_secondary_key_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def regenerate_secondary_key(resource_group_name, service_name, custom_headers = nil) + response = regenerate_secondary_key_async(resource_group_name, service_name, custom_headers).value! nil end @@ -224,8 +216,8 @@ def regenerate_secondary_key(resource_group_name, service_name, custom_headers:n # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def regenerate_secondary_key_with_http_info(resource_group_name, service_name, custom_headers:nil) - regenerate_secondary_key_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def regenerate_secondary_key_with_http_info(resource_group_name, service_name, custom_headers = nil) + regenerate_secondary_key_async(resource_group_name, service_name, custom_headers).value! end # @@ -238,18 +230,14 @@ def regenerate_secondary_key_with_http_info(resource_group_name, service_name, c # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def regenerate_secondary_key_async(resource_group_name, service_name, custom_headers:nil) + def regenerate_secondary_key_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_configuration.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_configuration.rb index a449a23a7b..88c33344fb 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_configuration.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_configuration.rb @@ -35,8 +35,8 @@ def initialize(client) # # @return [OperationResultContract] operation results. # - def deploy(resource_group_name, service_name, parameters, custom_headers:nil) - response = deploy_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def deploy(resource_group_name, service_name, parameters, custom_headers = nil) + response = deploy_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -51,9 +51,9 @@ def deploy(resource_group_name, service_name, parameters, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def deploy_async(resource_group_name, service_name, parameters, custom_headers:nil) + def deploy_async(resource_group_name, service_name, parameters, custom_headers = nil) # Send request - promise = begin_deploy_async(resource_group_name, service_name, parameters, custom_headers:custom_headers) + promise = begin_deploy_async(resource_group_name, service_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -82,8 +82,8 @@ def deploy_async(resource_group_name, service_name, parameters, custom_headers:n # # @return [OperationResultContract] operation results. # - def save(resource_group_name, service_name, parameters, custom_headers:nil) - response = save_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def save(resource_group_name, service_name, parameters, custom_headers = nil) + response = save_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -97,9 +97,9 @@ def save(resource_group_name, service_name, parameters, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def save_async(resource_group_name, service_name, parameters, custom_headers:nil) + def save_async(resource_group_name, service_name, parameters, custom_headers = nil) # Send request - promise = begin_save_async(resource_group_name, service_name, parameters, custom_headers:custom_headers) + promise = begin_save_async(resource_group_name, service_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -128,8 +128,8 @@ def save_async(resource_group_name, service_name, parameters, custom_headers:nil # # @return [OperationResultContract] operation results. # - def validate(resource_group_name, service_name, parameters, custom_headers:nil) - response = validate_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def validate(resource_group_name, service_name, parameters, custom_headers = nil) + response = validate_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -144,9 +144,9 @@ def validate(resource_group_name, service_name, parameters, custom_headers:nil) # @return [Concurrent::Promise] promise which provides async access to http # response. # - def validate_async(resource_group_name, service_name, parameters, custom_headers:nil) + def validate_async(resource_group_name, service_name, parameters, custom_headers = nil) # Send request - promise = begin_validate_async(resource_group_name, service_name, parameters, custom_headers:custom_headers) + promise = begin_validate_async(resource_group_name, service_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -176,8 +176,8 @@ def validate_async(resource_group_name, service_name, parameters, custom_headers # # @return [OperationResultContract] operation results. # - def begin_deploy(resource_group_name, service_name, parameters, custom_headers:nil) - response = begin_deploy_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_deploy(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_deploy_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -195,8 +195,8 @@ def begin_deploy(resource_group_name, service_name, parameters, custom_headers:n # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_deploy_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) - begin_deploy_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_deploy_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_deploy_async(resource_group_name, service_name, parameters, custom_headers).value! end # @@ -213,24 +213,22 @@ def begin_deploy_with_http_info(resource_group_name, service_name, parameters, c # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_deploy_async(resource_group_name, service_name, parameters, custom_headers:nil) + def begin_deploy_async(resource_group_name, service_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_10_10::Models::DeployConfigurationParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -290,8 +288,8 @@ def begin_deploy_async(resource_group_name, service_name, parameters, custom_hea # # @return [OperationResultContract] operation results. # - def begin_save(resource_group_name, service_name, parameters, custom_headers:nil) - response = begin_save_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_save(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_save_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -308,8 +306,8 @@ def begin_save(resource_group_name, service_name, parameters, custom_headers:nil # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_save_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) - begin_save_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_save_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_save_async(resource_group_name, service_name, parameters, custom_headers).value! end # @@ -325,24 +323,22 @@ def begin_save_with_http_info(resource_group_name, service_name, parameters, cus # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_save_async(resource_group_name, service_name, parameters, custom_headers:nil) + def begin_save_async(resource_group_name, service_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_10_10::Models::SaveConfigurationParameter.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -402,8 +398,8 @@ def begin_save_async(resource_group_name, service_name, parameters, custom_heade # # @return [OperationResultContract] operation results. # - def begin_validate(resource_group_name, service_name, parameters, custom_headers:nil) - response = begin_validate_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_validate(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_validate_async(resource_group_name, service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -420,8 +416,8 @@ def begin_validate(resource_group_name, service_name, parameters, custom_headers # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_validate_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) - begin_validate_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! + def begin_validate_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_validate_async(resource_group_name, service_name, parameters, custom_headers).value! end # @@ -437,24 +433,22 @@ def begin_validate_with_http_info(resource_group_name, service_name, parameters, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_validate_async(resource_group_name, service_name, parameters, custom_headers:nil) + def begin_validate_async(resource_group_name, service_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_10_10::Models::DeployConfigurationParameters.mapper() request_content = @client.serialize(request_mapper, parameters) diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_configuration_sync_state.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_configuration_sync_state.rb index a65c281f5e..a3953d9494 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_configuration_sync_state.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_configuration_sync_state.rb @@ -32,8 +32,8 @@ def initialize(client) # # @return [TenantConfigurationSyncStateContract] operation results. # - def get(resource_group_name, service_name, custom_headers:nil) - response = get_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, custom_headers = nil) + response = get_async(resource_group_name, service_name, custom_headers).value! response.body unless response.nil? end @@ -48,8 +48,8 @@ def get(resource_group_name, service_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, custom_headers:nil) - get_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, custom_headers = nil) + get_async(resource_group_name, service_name, custom_headers).value! end # @@ -63,18 +63,14 @@ def get_with_http_info(resource_group_name, service_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, custom_headers:nil) + def get_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_policy.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_policy.rb index 2371634f04..63604368ff 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_policy.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_policy.rb @@ -31,8 +31,8 @@ def initialize(client) # # @return [NOT_IMPLEMENTED] operation results. # - def get(resource_group_name, service_name, custom_headers:nil) - response = get_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, custom_headers = nil) + response = get_async(resource_group_name, service_name, custom_headers).value! response.body unless response.nil? end @@ -46,8 +46,8 @@ def get(resource_group_name, service_name, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, custom_headers:nil) - get_async(resource_group_name, service_name, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, custom_headers = nil) + get_async(resource_group_name, service_name, custom_headers).value! end # @@ -60,18 +60,14 @@ def get_with_http_info(resource_group_name, service_name, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, custom_headers:nil) + def get_async(resource_group_name, service_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).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 @@ -104,7 +100,6 @@ def get_async(resource_group_name, service_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: { @@ -136,8 +131,8 @@ def get_async(resource_group_name, service_name, custom_headers:nil) # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, parameters, if_match, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, parameters, if_match, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, parameters, if_match, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, parameters, if_match, custom_headers).value! nil end @@ -155,8 +150,8 @@ def create_or_update(resource_group_name, service_name, parameters, if_match, cu # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, parameters, if_match, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, parameters, if_match, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, parameters, if_match, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, parameters, if_match, custom_headers).value! end # @@ -173,12 +168,9 @@ def create_or_update_with_http_info(resource_group_name, service_name, parameter # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, parameters, if_match, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -186,16 +178,16 @@ def create_or_update_async(resource_group_name, service_name, parameters, if_mat request_headers = {} - request_headers['Content-Type'] = 'application/vnd.ms-azure-apim.policy+xml' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + request_headers['Content-Type'] = 'application/vnd.ms-azure-apim.policy+xml' + # Serialize Request request_mapper = { - client_side_validation: true, required: true, serialized_name: 'parameters', type: { @@ -203,6 +195,7 @@ def create_or_update_async(resource_group_name, service_name, parameters, if_mat } } 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.ApiManagement/service/{serviceName}/tenant/policy' @@ -247,8 +240,8 @@ def create_or_update_async(resource_group_name, service_name, parameters, if_mat # will be added to the HTTP request. # # - def delete(resource_group_name, service_name, if_match, custom_headers:nil) - response = delete_async(resource_group_name, service_name, if_match, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, if_match, custom_headers).value! nil end @@ -265,8 +258,8 @@ def delete(resource_group_name, service_name, if_match, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, if_match, custom_headers:nil) - delete_async(resource_group_name, service_name, if_match, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, if_match, custom_headers).value! end # @@ -282,19 +275,15 @@ def delete_with_http_info(resource_group_name, service_name, if_match, custom_he # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, if_match, custom_headers:nil) + def delete_async(resource_group_name, service_name, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'if_match is nil' if if_match.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 diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/user_groups.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/user_groups.rb index 8a1fb5c01c..a03e1f3584 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/user_groups.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/user_groups.rb @@ -44,8 +44,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_users(resource_group_name, service_name, uid, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_users_as_lazy(resource_group_name, service_name, uid, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_users(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_users_as_lazy(resource_group_name, service_name, uid, filter, top, skip, custom_headers) first_page.get_all_items end @@ -72,8 +72,8 @@ def list_by_users(resource_group_name, service_name, uid, filter:nil, top:nil, s # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_users_with_http_info(resource_group_name, service_name, uid, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_users_async(resource_group_name, service_name, uid, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_users_with_http_info(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_users_async(resource_group_name, service_name, uid, filter, top, skip, custom_headers).value! end # @@ -99,24 +99,15 @@ def list_by_users_with_http_info(resource_group_name, service_name, uid, filter: # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_users_async(resource_group_name, service_name, uid, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_users_async(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'uid is nil' if uid.nil? - fail ArgumentError, "'uid' should satisfy the constraint - 'MaxLength': '256'" if !uid.nil? && uid.length > 256 - fail ArgumentError, "'uid' should satisfy the constraint - 'MinLength': '1'" if !uid.nil? && uid.length < 1 - fail ArgumentError, "'uid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !uid.nil? && uid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -171,8 +162,8 @@ def list_by_users_async(resource_group_name, service_name, uid, filter:nil, top: # # @return [GroupCollection] operation results. # - def list_by_users_next(next_page_link, custom_headers:nil) - response = list_by_users_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_users_next(next_page_link, custom_headers = nil) + response = list_by_users_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -186,8 +177,8 @@ def list_by_users_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_users_next_with_http_info(next_page_link, custom_headers:nil) - list_by_users_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_users_next_with_http_info(next_page_link, custom_headers = nil) + list_by_users_next_async(next_page_link, custom_headers).value! end # @@ -200,12 +191,11 @@ def list_by_users_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_users_next_async(next_page_link, custom_headers:nil) + def list_by_users_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 @@ -272,12 +262,12 @@ def list_by_users_next_async(next_page_link, custom_headers:nil) # # @return [GroupCollection] which provide lazy access to pages of the response. # - def list_by_users_as_lazy(resource_group_name, service_name, uid, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_users_async(resource_group_name, service_name, uid, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_users_as_lazy(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_users_async(resource_group_name, service_name, uid, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_users_next_async(next_page_link, custom_headers:custom_headers) + list_by_users_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/user_identities.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/user_identities.rb index 65e044c836..1ad8839657 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/user_identities.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/user_identities.rb @@ -33,8 +33,8 @@ def initialize(client) # # @return [UserIdentityCollection] operation results. # - def list_by_users(resource_group_name, service_name, uid, custom_headers:nil) - response = list_by_users_async(resource_group_name, service_name, uid, custom_headers:custom_headers).value! + def list_by_users(resource_group_name, service_name, uid, custom_headers = nil) + response = list_by_users_async(resource_group_name, service_name, uid, custom_headers).value! response.body unless response.nil? end @@ -50,8 +50,8 @@ def list_by_users(resource_group_name, service_name, uid, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_users_with_http_info(resource_group_name, service_name, uid, custom_headers:nil) - list_by_users_async(resource_group_name, service_name, uid, custom_headers:custom_headers).value! + def list_by_users_with_http_info(resource_group_name, service_name, uid, custom_headers = nil) + list_by_users_async(resource_group_name, service_name, uid, custom_headers).value! end # @@ -66,22 +66,15 @@ def list_by_users_with_http_info(resource_group_name, service_name, uid, custom_ # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_users_async(resource_group_name, service_name, uid, custom_headers:nil) + def list_by_users_async(resource_group_name, service_name, uid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'uid is nil' if uid.nil? - fail ArgumentError, "'uid' should satisfy the constraint - 'MaxLength': '256'" if !uid.nil? && uid.length > 256 - fail ArgumentError, "'uid' should satisfy the constraint - 'MinLength': '1'" if !uid.nil? && uid.length < 1 - fail ArgumentError, "'uid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !uid.nil? && uid.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/user_subscriptions.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/user_subscriptions.rb index 7b880d377f..31f4f05812 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/user_subscriptions.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/user_subscriptions.rb @@ -50,8 +50,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_users(resource_group_name, service_name, uid, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_users_as_lazy(resource_group_name, service_name, uid, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_users(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_users_as_lazy(resource_group_name, service_name, uid, filter, top, skip, custom_headers) first_page.get_all_items end @@ -84,8 +84,8 @@ def list_by_users(resource_group_name, service_name, uid, filter:nil, top:nil, s # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_users_with_http_info(resource_group_name, service_name, uid, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_users_async(resource_group_name, service_name, uid, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_users_with_http_info(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_users_async(resource_group_name, service_name, uid, filter, top, skip, custom_headers).value! end # @@ -117,24 +117,15 @@ def list_by_users_with_http_info(resource_group_name, service_name, uid, filter: # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_users_async(resource_group_name, service_name, uid, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_users_async(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'uid is nil' if uid.nil? - fail ArgumentError, "'uid' should satisfy the constraint - 'MaxLength': '256'" if !uid.nil? && uid.length > 256 - fail ArgumentError, "'uid' should satisfy the constraint - 'MinLength': '1'" if !uid.nil? && uid.length < 1 - fail ArgumentError, "'uid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !uid.nil? && uid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -189,8 +180,8 @@ def list_by_users_async(resource_group_name, service_name, uid, filter:nil, top: # # @return [SubscriptionCollection] operation results. # - def list_by_users_next(next_page_link, custom_headers:nil) - response = list_by_users_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_users_next(next_page_link, custom_headers = nil) + response = list_by_users_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -204,8 +195,8 @@ def list_by_users_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_users_next_with_http_info(next_page_link, custom_headers:nil) - list_by_users_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_users_next_with_http_info(next_page_link, custom_headers = nil) + list_by_users_next_async(next_page_link, custom_headers).value! end # @@ -218,12 +209,11 @@ def list_by_users_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_users_next_async(next_page_link, custom_headers:nil) + def list_by_users_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 @@ -297,12 +287,12 @@ def list_by_users_next_async(next_page_link, custom_headers:nil) # @return [SubscriptionCollection] which provide lazy access to pages of the # response. # - def list_by_users_as_lazy(resource_group_name, service_name, uid, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_users_async(resource_group_name, service_name, uid, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_users_as_lazy(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_users_async(resource_group_name, service_name, uid, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_users_next_async(next_page_link, custom_headers:custom_headers) + list_by_users_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/users.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/users.rb index 8fa737b0d7..85cd961fed 100644 --- a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/users.rb +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/users.rb @@ -50,8 +50,8 @@ def initialize(client) # # @return [Array] operation results. # - def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - first_page = list_by_service_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers) + def list_by_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) first_page.get_all_items end @@ -84,8 +84,8 @@ def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! end # @@ -117,20 +117,14 @@ def list_by_service_with_http_info(resource_group_name, service_name, filter:nil # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) + def list_by_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? - fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 - fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 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 @@ -187,8 +181,8 @@ def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil # # @return [UserContract] operation results. # - def get(resource_group_name, service_name, uid, custom_headers:nil) - response = get_async(resource_group_name, service_name, uid, custom_headers:custom_headers).value! + def get(resource_group_name, service_name, uid, custom_headers = nil) + response = get_async(resource_group_name, service_name, uid, custom_headers).value! response.body unless response.nil? end @@ -204,8 +198,8 @@ def get(resource_group_name, service_name, uid, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_with_http_info(resource_group_name, service_name, uid, custom_headers:nil) - get_async(resource_group_name, service_name, uid, custom_headers:custom_headers).value! + def get_with_http_info(resource_group_name, service_name, uid, custom_headers = nil) + get_async(resource_group_name, service_name, uid, custom_headers).value! end # @@ -220,22 +214,15 @@ def get_with_http_info(resource_group_name, service_name, uid, custom_headers:ni # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_async(resource_group_name, service_name, uid, custom_headers:nil) + def get_async(resource_group_name, service_name, uid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'uid is nil' if uid.nil? - fail ArgumentError, "'uid' should satisfy the constraint - 'MaxLength': '256'" if !uid.nil? && uid.length > 256 - fail ArgumentError, "'uid' should satisfy the constraint - 'MinLength': '1'" if !uid.nil? && uid.length < 1 - fail ArgumentError, "'uid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !uid.nil? && uid.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -292,8 +279,8 @@ def get_async(resource_group_name, service_name, uid, custom_headers:nil) # will be added to the HTTP request. # # - def create_or_update(resource_group_name, service_name, uid, parameters, custom_headers:nil) - response = create_or_update_async(resource_group_name, service_name, uid, parameters, custom_headers:custom_headers).value! + def create_or_update(resource_group_name, service_name, uid, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, uid, parameters, custom_headers).value! nil end @@ -310,8 +297,8 @@ def create_or_update(resource_group_name, service_name, uid, parameters, custom_ # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_with_http_info(resource_group_name, service_name, uid, parameters, custom_headers:nil) - create_or_update_async(resource_group_name, service_name, uid, parameters, custom_headers:custom_headers).value! + def create_or_update_with_http_info(resource_group_name, service_name, uid, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, uid, parameters, custom_headers).value! end # @@ -327,28 +314,23 @@ def create_or_update_with_http_info(resource_group_name, service_name, uid, para # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_async(resource_group_name, service_name, uid, parameters, custom_headers:nil) + def create_or_update_async(resource_group_name, service_name, uid, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'uid is nil' if uid.nil? - fail ArgumentError, "'uid' should satisfy the constraint - 'MaxLength': '256'" if !uid.nil? && uid.length > 256 - fail ArgumentError, "'uid' should satisfy the constraint - 'MinLength': '1'" if !uid.nil? && uid.length < 1 - fail ArgumentError, "'uid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !uid.nil? && uid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_10_10::Models::UserCreateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -401,8 +383,8 @@ def create_or_update_async(resource_group_name, service_name, uid, parameters, c # # @return [ErrorBodyContract] operation results. # - def update(resource_group_name, service_name, uid, parameters, if_match, custom_headers:nil) - response = update_async(resource_group_name, service_name, uid, parameters, if_match, custom_headers:custom_headers).value! + def update(resource_group_name, service_name, uid, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, uid, parameters, if_match, custom_headers).value! response.body unless response.nil? end @@ -422,8 +404,8 @@ def update(resource_group_name, service_name, uid, parameters, if_match, custom_ # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_with_http_info(resource_group_name, service_name, uid, parameters, if_match, custom_headers:nil) - update_async(resource_group_name, service_name, uid, parameters, if_match, custom_headers:custom_headers).value! + def update_with_http_info(resource_group_name, service_name, uid, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, uid, parameters, if_match, custom_headers).value! end # @@ -442,16 +424,10 @@ def update_with_http_info(resource_group_name, service_name, uid, parameters, if # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_async(resource_group_name, service_name, uid, parameters, if_match, custom_headers:nil) + def update_async(resource_group_name, service_name, uid, parameters, if_match, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'uid is nil' if uid.nil? - fail ArgumentError, "'uid' should satisfy the constraint - 'MaxLength': '256'" if !uid.nil? && uid.length > 256 - fail ArgumentError, "'uid' should satisfy the constraint - 'MinLength': '1'" if !uid.nil? && uid.length < 1 - fail ArgumentError, "'uid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !uid.nil? && uid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'if_match is nil' if if_match.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? @@ -459,13 +435,14 @@ def update_async(resource_group_name, service_name, uid, parameters, if_match, 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['If-Match'] = if_match unless if_match.nil? 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::ApiManagement::Mgmt::V2016_10_10::Models::UserUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -529,8 +506,8 @@ def update_async(resource_group_name, service_name, uid, parameters, if_match, c # # @return [ErrorBodyContract] operation results. # - def delete(resource_group_name, service_name, uid, if_match, delete_subscriptions:nil, custom_headers:nil) - response = delete_async(resource_group_name, service_name, uid, if_match, delete_subscriptions:delete_subscriptions, custom_headers:custom_headers).value! + def delete(resource_group_name, service_name, uid, if_match, delete_subscriptions = nil, custom_headers = nil) + response = delete_async(resource_group_name, service_name, uid, if_match, delete_subscriptions, custom_headers).value! response.body unless response.nil? end @@ -551,8 +528,8 @@ def delete(resource_group_name, service_name, uid, if_match, delete_subscription # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_with_http_info(resource_group_name, service_name, uid, if_match, delete_subscriptions:nil, custom_headers:nil) - delete_async(resource_group_name, service_name, uid, if_match, delete_subscriptions:delete_subscriptions, custom_headers:custom_headers).value! + def delete_with_http_info(resource_group_name, service_name, uid, if_match, delete_subscriptions = nil, custom_headers = nil) + delete_async(resource_group_name, service_name, uid, if_match, delete_subscriptions, custom_headers).value! end # @@ -572,23 +549,16 @@ def delete_with_http_info(resource_group_name, service_name, uid, if_match, dele # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_async(resource_group_name, service_name, uid, if_match, delete_subscriptions:nil, custom_headers:nil) + def delete_async(resource_group_name, service_name, uid, if_match, delete_subscriptions = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'uid is nil' if uid.nil? - fail ArgumentError, "'uid' should satisfy the constraint - 'MaxLength': '256'" if !uid.nil? && uid.length > 256 - fail ArgumentError, "'uid' should satisfy the constraint - 'MinLength': '1'" if !uid.nil? && uid.length < 1 - fail ArgumentError, "'uid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !uid.nil? && uid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'if_match is nil' if if_match.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 @@ -647,8 +617,8 @@ def delete_async(resource_group_name, service_name, uid, if_match, delete_subscr # # @return [GenerateSsoUrlResult] operation results. # - def generate_sso_url(resource_group_name, service_name, uid, custom_headers:nil) - response = generate_sso_url_async(resource_group_name, service_name, uid, custom_headers:custom_headers).value! + def generate_sso_url(resource_group_name, service_name, uid, custom_headers = nil) + response = generate_sso_url_async(resource_group_name, service_name, uid, custom_headers).value! response.body unless response.nil? end @@ -665,8 +635,8 @@ def generate_sso_url(resource_group_name, service_name, uid, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def generate_sso_url_with_http_info(resource_group_name, service_name, uid, custom_headers:nil) - generate_sso_url_async(resource_group_name, service_name, uid, custom_headers:custom_headers).value! + def generate_sso_url_with_http_info(resource_group_name, service_name, uid, custom_headers = nil) + generate_sso_url_async(resource_group_name, service_name, uid, custom_headers).value! end # @@ -682,22 +652,15 @@ def generate_sso_url_with_http_info(resource_group_name, service_name, uid, cust # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def generate_sso_url_async(resource_group_name, service_name, uid, custom_headers:nil) + def generate_sso_url_async(resource_group_name, service_name, uid, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'uid is nil' if uid.nil? - fail ArgumentError, "'uid' should satisfy the constraint - 'MaxLength': '256'" if !uid.nil? && uid.length > 256 - fail ArgumentError, "'uid' should satisfy the constraint - 'MinLength': '1'" if !uid.nil? && uid.length < 1 - fail ArgumentError, "'uid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !uid.nil? && uid.match(Regexp.new('^^[^*#&+:<>?]+$$')).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 @@ -756,8 +719,8 @@ def generate_sso_url_async(resource_group_name, service_name, uid, custom_header # # @return [UserTokenResult] operation results. # - def get_shared_access_token(resource_group_name, service_name, uid, parameters, custom_headers:nil) - response = get_shared_access_token_async(resource_group_name, service_name, uid, parameters, custom_headers:custom_headers).value! + def get_shared_access_token(resource_group_name, service_name, uid, parameters, custom_headers = nil) + response = get_shared_access_token_async(resource_group_name, service_name, uid, parameters, custom_headers).value! response.body unless response.nil? end @@ -775,8 +738,8 @@ def get_shared_access_token(resource_group_name, service_name, uid, parameters, # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_shared_access_token_with_http_info(resource_group_name, service_name, uid, parameters, custom_headers:nil) - get_shared_access_token_async(resource_group_name, service_name, uid, parameters, custom_headers:custom_headers).value! + def get_shared_access_token_with_http_info(resource_group_name, service_name, uid, parameters, custom_headers = nil) + get_shared_access_token_async(resource_group_name, service_name, uid, parameters, custom_headers).value! end # @@ -793,28 +756,23 @@ def get_shared_access_token_with_http_info(resource_group_name, service_name, ui # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_shared_access_token_async(resource_group_name, service_name, uid, parameters, custom_headers:nil) + def get_shared_access_token_async(resource_group_name, service_name, uid, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? - fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 - fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 - fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'uid is nil' if uid.nil? - fail ArgumentError, "'uid' should satisfy the constraint - 'MaxLength': '256'" if !uid.nil? && uid.length > 256 - fail ArgumentError, "'uid' should satisfy the constraint - 'MinLength': '1'" if !uid.nil? && uid.length < 1 - fail ArgumentError, "'uid' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !uid.nil? && uid.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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::ApiManagement::Mgmt::V2016_10_10::Models::UserTokenParameters.mapper() request_content = @client.serialize(request_mapper, parameters) @@ -871,8 +829,8 @@ def get_shared_access_token_async(resource_group_name, service_name, uid, parame # # @return [UserCollection] operation results. # - def list_by_service_next(next_page_link, custom_headers:nil) - response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end @@ -886,8 +844,8 @@ def list_by_service_next(next_page_link, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) - list_by_service_next_async(next_page_link, custom_headers:custom_headers).value! + def list_by_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! end # @@ -900,12 +858,11 @@ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_by_service_next_async(next_page_link, custom_headers:nil) + def list_by_service_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 @@ -978,12 +935,12 @@ def list_by_service_next_async(next_page_link, custom_headers:nil) # # @return [UserCollection] which provide lazy access to pages of the response. # - def list_by_service_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) - response = list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_by_service_next_async(next_page_link, custom_headers:custom_headers) + list_by_service_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/version.rb b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/version.rb new file mode 100644 index 0000000000..30548f0dda --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/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::ApiManagement::Mgmt::V2016_10_10 + VERSION = '0.17.0' +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management.rb new file mode 100644 index 0000000000..9183456d9e --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management.rb @@ -0,0 +1,294 @@ +# 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. + +require 'uri' +require 'cgi' +require 'date' +require 'json' +require 'base64' +require 'erb' +require 'securerandom' +require 'time' +require 'timeliness' +require 'faraday' +require 'faraday-cookie_jar' +require 'concurrent' +require 'ms_rest' +require '2018-01-01/generated/azure_mgmt_api_management/module_definition' +require 'ms_rest_azure' + +module Azure::ApiManagement::Mgmt::V2018_01_01_preview + autoload :Policy, '2018-01-01/generated/azure_mgmt_api_management/policy.rb' + autoload :PolicySnippets, '2018-01-01/generated/azure_mgmt_api_management/policy_snippets.rb' + autoload :Regions, '2018-01-01/generated/azure_mgmt_api_management/regions.rb' + autoload :Api, '2018-01-01/generated/azure_mgmt_api_management/api.rb' + autoload :ApiRevisions, '2018-01-01/generated/azure_mgmt_api_management/api_revisions.rb' + autoload :ApiRelease, '2018-01-01/generated/azure_mgmt_api_management/api_release.rb' + autoload :ApiOperation, '2018-01-01/generated/azure_mgmt_api_management/api_operation.rb' + autoload :ApiOperationPolicy, '2018-01-01/generated/azure_mgmt_api_management/api_operation_policy.rb' + autoload :ApiProduct, '2018-01-01/generated/azure_mgmt_api_management/api_product.rb' + autoload :ApiPolicy, '2018-01-01/generated/azure_mgmt_api_management/api_policy.rb' + autoload :ApiSchema, '2018-01-01/generated/azure_mgmt_api_management/api_schema.rb' + autoload :ApiDiagnostic, '2018-01-01/generated/azure_mgmt_api_management/api_diagnostic.rb' + autoload :ApiDiagnosticLogger, '2018-01-01/generated/azure_mgmt_api_management/api_diagnostic_logger.rb' + autoload :ApiIssue, '2018-01-01/generated/azure_mgmt_api_management/api_issue.rb' + autoload :ApiIssueComment, '2018-01-01/generated/azure_mgmt_api_management/api_issue_comment.rb' + autoload :ApiIssueAttachment, '2018-01-01/generated/azure_mgmt_api_management/api_issue_attachment.rb' + autoload :AuthorizationServer, '2018-01-01/generated/azure_mgmt_api_management/authorization_server.rb' + autoload :Backend, '2018-01-01/generated/azure_mgmt_api_management/backend.rb' + autoload :Certificate, '2018-01-01/generated/azure_mgmt_api_management/certificate.rb' + autoload :ApiManagementOperations, '2018-01-01/generated/azure_mgmt_api_management/api_management_operations.rb' + autoload :ApiManagementService, '2018-01-01/generated/azure_mgmt_api_management/api_management_service.rb' + autoload :Diagnostic, '2018-01-01/generated/azure_mgmt_api_management/diagnostic.rb' + autoload :DiagnosticLogger, '2018-01-01/generated/azure_mgmt_api_management/diagnostic_logger.rb' + autoload :EmailTemplate, '2018-01-01/generated/azure_mgmt_api_management/email_template.rb' + autoload :Group, '2018-01-01/generated/azure_mgmt_api_management/group.rb' + autoload :GroupUser, '2018-01-01/generated/azure_mgmt_api_management/group_user.rb' + autoload :IdentityProvider, '2018-01-01/generated/azure_mgmt_api_management/identity_provider.rb' + autoload :Logger, '2018-01-01/generated/azure_mgmt_api_management/logger.rb' + autoload :Notification, '2018-01-01/generated/azure_mgmt_api_management/notification.rb' + autoload :NotificationRecipientUser, '2018-01-01/generated/azure_mgmt_api_management/notification_recipient_user.rb' + autoload :NotificationRecipientEmail, '2018-01-01/generated/azure_mgmt_api_management/notification_recipient_email.rb' + autoload :NetworkStatus, '2018-01-01/generated/azure_mgmt_api_management/network_status.rb' + autoload :OpenIdConnectProvider, '2018-01-01/generated/azure_mgmt_api_management/open_id_connect_provider.rb' + autoload :SignInSettings, '2018-01-01/generated/azure_mgmt_api_management/sign_in_settings.rb' + autoload :SignUpSettings, '2018-01-01/generated/azure_mgmt_api_management/sign_up_settings.rb' + autoload :DelegationSettings, '2018-01-01/generated/azure_mgmt_api_management/delegation_settings.rb' + autoload :Product, '2018-01-01/generated/azure_mgmt_api_management/product.rb' + autoload :ProductApi, '2018-01-01/generated/azure_mgmt_api_management/product_api.rb' + autoload :ProductGroup, '2018-01-01/generated/azure_mgmt_api_management/product_group.rb' + autoload :ProductSubscriptions, '2018-01-01/generated/azure_mgmt_api_management/product_subscriptions.rb' + autoload :ProductPolicy, '2018-01-01/generated/azure_mgmt_api_management/product_policy.rb' + autoload :Property, '2018-01-01/generated/azure_mgmt_api_management/property.rb' + autoload :QuotaByCounterKeys, '2018-01-01/generated/azure_mgmt_api_management/quota_by_counter_keys.rb' + autoload :QuotaByPeriodKeys, '2018-01-01/generated/azure_mgmt_api_management/quota_by_period_keys.rb' + autoload :Reports, '2018-01-01/generated/azure_mgmt_api_management/reports.rb' + autoload :Subscription, '2018-01-01/generated/azure_mgmt_api_management/subscription.rb' + autoload :TagResource, '2018-01-01/generated/azure_mgmt_api_management/tag_resource.rb' + autoload :Tag, '2018-01-01/generated/azure_mgmt_api_management/tag.rb' + autoload :TagDescription, '2018-01-01/generated/azure_mgmt_api_management/tag_description.rb' + autoload :OperationOperations, '2018-01-01/generated/azure_mgmt_api_management/operation_operations.rb' + autoload :TenantAccess, '2018-01-01/generated/azure_mgmt_api_management/tenant_access.rb' + autoload :TenantAccessGit, '2018-01-01/generated/azure_mgmt_api_management/tenant_access_git.rb' + autoload :TenantConfiguration, '2018-01-01/generated/azure_mgmt_api_management/tenant_configuration.rb' + autoload :User, '2018-01-01/generated/azure_mgmt_api_management/user.rb' + autoload :UserGroup, '2018-01-01/generated/azure_mgmt_api_management/user_group.rb' + autoload :UserSubscription, '2018-01-01/generated/azure_mgmt_api_management/user_subscription.rb' + autoload :UserIdentities, '2018-01-01/generated/azure_mgmt_api_management/user_identities.rb' + autoload :ApiVersionSet, '2018-01-01/generated/azure_mgmt_api_management/api_version_set.rb' + autoload :ApiExport, '2018-01-01/generated/azure_mgmt_api_management/api_export.rb' + autoload :ApiManagementClient, '2018-01-01/generated/azure_mgmt_api_management/api_management_client.rb' + + module Models + autoload :VirtualNetworkConfiguration, '2018-01-01/generated/azure_mgmt_api_management/models/virtual_network_configuration.rb' + autoload :ErrorFieldContract, '2018-01-01/generated/azure_mgmt_api_management/models/error_field_contract.rb' + autoload :ApiManagementServiceSkuProperties, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_sku_properties.rb' + autoload :ErrorResponse, '2018-01-01/generated/azure_mgmt_api_management/models/error_response.rb' + autoload :AdditionalLocation, '2018-01-01/generated/azure_mgmt_api_management/models/additional_location.rb' + autoload :PolicyCollection, '2018-01-01/generated/azure_mgmt_api_management/models/policy_collection.rb' + autoload :ApiManagementServiceBackupRestoreParameters, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_backup_restore_parameters.rb' + autoload :PolicySnippetsCollection, '2018-01-01/generated/azure_mgmt_api_management/models/policy_snippets_collection.rb' + autoload :ApiManagementServiceBaseProperties, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_base_properties.rb' + autoload :RegionListResult, '2018-01-01/generated/azure_mgmt_api_management/models/region_list_result.rb' + autoload :ApiManagementServiceIdentity, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_identity.rb' + autoload :ApiExportResult, '2018-01-01/generated/azure_mgmt_api_management/models/api_export_result.rb' + autoload :ApiVersionSetContractDetails, '2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_contract_details.rb' + autoload :AccessInformationContract, '2018-01-01/generated/azure_mgmt_api_management/models/access_information_contract.rb' + autoload :CertificateConfiguration, '2018-01-01/generated/azure_mgmt_api_management/models/certificate_configuration.rb' + autoload :ApiCollection, '2018-01-01/generated/azure_mgmt_api_management/models/api_collection.rb' + autoload :HostnameConfiguration, '2018-01-01/generated/azure_mgmt_api_management/models/hostname_configuration.rb' + autoload :ApiCreateOrUpdateParameter, '2018-01-01/generated/azure_mgmt_api_management/models/api_create_or_update_parameter.rb' + autoload :ErrorResponseBody, '2018-01-01/generated/azure_mgmt_api_management/models/error_response_body.rb' + autoload :OAuth2AuthenticationSettingsContract, '2018-01-01/generated/azure_mgmt_api_management/models/oauth2authentication_settings_contract.rb' + autoload :OpenIdAuthenticationSettingsContract, '2018-01-01/generated/azure_mgmt_api_management/models/open_id_authentication_settings_contract.rb' + autoload :AuthenticationSettingsContract, '2018-01-01/generated/azure_mgmt_api_management/models/authentication_settings_contract.rb' + autoload :PropertyUpdateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/property_update_parameters.rb' + autoload :ApiEntityBaseContract, '2018-01-01/generated/azure_mgmt_api_management/models/api_entity_base_contract.rb' + autoload :PolicySnippetContract, '2018-01-01/generated/azure_mgmt_api_management/models/policy_snippet_contract.rb' + autoload :ApiRevisionCollection, '2018-01-01/generated/azure_mgmt_api_management/models/api_revision_collection.rb' + autoload :RegionContract, '2018-01-01/generated/azure_mgmt_api_management/models/region_contract.rb' + autoload :TagDescriptionCreateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/tag_description_create_parameters.rb' + autoload :Resource, '2018-01-01/generated/azure_mgmt_api_management/models/resource.rb' + autoload :TagDescriptionCollection, '2018-01-01/generated/azure_mgmt_api_management/models/tag_description_collection.rb' + autoload :PropertyCollection, '2018-01-01/generated/azure_mgmt_api_management/models/property_collection.rb' + autoload :ParameterContract, '2018-01-01/generated/azure_mgmt_api_management/models/parameter_contract.rb' + autoload :PropertyEntityBaseParameters, '2018-01-01/generated/azure_mgmt_api_management/models/property_entity_base_parameters.rb' + autoload :RequestContract, '2018-01-01/generated/azure_mgmt_api_management/models/request_contract.rb' + autoload :ApimResource, '2018-01-01/generated/azure_mgmt_api_management/models/apim_resource.rb' + autoload :OperationEntityBaseContract, '2018-01-01/generated/azure_mgmt_api_management/models/operation_entity_base_contract.rb' + autoload :AccessInformationUpdateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/access_information_update_parameters.rb' + autoload :ApiManagementServiceListResult, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_list_result.rb' + autoload :TagCreateUpdateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/tag_create_update_parameters.rb' + autoload :ApiManagementServiceGetSsoTokenResult, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_get_sso_token_result.rb' + autoload :TagCollection, '2018-01-01/generated/azure_mgmt_api_management/models/tag_collection.rb' + autoload :ApiManagementServiceCheckNameAvailabilityParameters, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_check_name_availability_parameters.rb' + autoload :DeployConfigurationParameters, '2018-01-01/generated/azure_mgmt_api_management/models/deploy_configuration_parameters.rb' + autoload :ApiManagementServiceNameAvailabilityResult, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_name_availability_result.rb' + autoload :SubscriptionUpdateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/subscription_update_parameters.rb' + autoload :ApiManagementServiceApplyNetworkConfigurationParameters, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_apply_network_configuration_parameters.rb' + autoload :SubscriptionCreateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb' + autoload :ApiManagementServiceUploadCertificateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_upload_certificate_parameters.rb' + autoload :ProductEntityBaseParameters, '2018-01-01/generated/azure_mgmt_api_management/models/product_entity_base_parameters.rb' + autoload :HostnameConfigurationOld, '2018-01-01/generated/azure_mgmt_api_management/models/hostname_configuration_old.rb' + autoload :OperationTagResourceContractProperties, '2018-01-01/generated/azure_mgmt_api_management/models/operation_tag_resource_contract_properties.rb' + autoload :ApiManagementServiceUpdateHostnameParameters, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_update_hostname_parameters.rb' + autoload :TagTagResourceContractProperties, '2018-01-01/generated/azure_mgmt_api_management/models/tag_tag_resource_contract_properties.rb' + autoload :OperationDisplay, '2018-01-01/generated/azure_mgmt_api_management/models/operation_display.rb' + autoload :TagResourceCollection, '2018-01-01/generated/azure_mgmt_api_management/models/tag_resource_collection.rb' + autoload :Operation, '2018-01-01/generated/azure_mgmt_api_management/models/operation.rb' + autoload :ProductCollection, '2018-01-01/generated/azure_mgmt_api_management/models/product_collection.rb' + autoload :OperationListResult, '2018-01-01/generated/azure_mgmt_api_management/models/operation_list_result.rb' + autoload :AuthorizationServerCollection, '2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_collection.rb' + autoload :EmailTemplateParametersContractProperties, '2018-01-01/generated/azure_mgmt_api_management/models/email_template_parameters_contract_properties.rb' + autoload :TokenBodyParameterContract, '2018-01-01/generated/azure_mgmt_api_management/models/token_body_parameter_contract.rb' + autoload :ApiVersionSetUpdateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_update_parameters.rb' + autoload :BackendAuthorizationHeaderCredentials, '2018-01-01/generated/azure_mgmt_api_management/models/backend_authorization_header_credentials.rb' + autoload :EmailTemplateCollection, '2018-01-01/generated/azure_mgmt_api_management/models/email_template_collection.rb' + autoload :BackendServiceFabricClusterProperties, '2018-01-01/generated/azure_mgmt_api_management/models/backend_service_fabric_cluster_properties.rb' + autoload :EmailTemplateUpdateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/email_template_update_parameters.rb' + autoload :BackendCredentialsContract, '2018-01-01/generated/azure_mgmt_api_management/models/backend_credentials_contract.rb' + autoload :GroupContractProperties, '2018-01-01/generated/azure_mgmt_api_management/models/group_contract_properties.rb' + autoload :BackendTlsProperties, '2018-01-01/generated/azure_mgmt_api_management/models/backend_tls_properties.rb' + autoload :ApiVersionSetEntityBase, '2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_entity_base.rb' + autoload :QuotaCounterCollection, '2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_collection.rb' + autoload :GroupCollection, '2018-01-01/generated/azure_mgmt_api_management/models/group_collection.rb' + autoload :BackendUpdateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/backend_update_parameters.rb' + autoload :GroupCreateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/group_create_parameters.rb' + autoload :QuotaCounterValueContractProperties, '2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_value_contract_properties.rb' + autoload :GroupUpdateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/group_update_parameters.rb' + autoload :CertificateCreateOrUpdateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/certificate_create_or_update_parameters.rb' + autoload :UserIdentityContract, '2018-01-01/generated/azure_mgmt_api_management/models/user_identity_contract.rb' + autoload :ApiCreateOrUpdatePropertiesWsdlSelector, '2018-01-01/generated/azure_mgmt_api_management/models/api_create_or_update_properties_wsdl_selector.rb' + autoload :UserEntityBaseParameters, '2018-01-01/generated/azure_mgmt_api_management/models/user_entity_base_parameters.rb' + autoload :SubscriptionKeyParameterNamesContract, '2018-01-01/generated/azure_mgmt_api_management/models/subscription_key_parameter_names_contract.rb' + autoload :ApiVersionSetCollection, '2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_collection.rb' + autoload :ApiRevisionInfoContract, '2018-01-01/generated/azure_mgmt_api_management/models/api_revision_info_contract.rb' + autoload :UserCollection, '2018-01-01/generated/azure_mgmt_api_management/models/user_collection.rb' + autoload :OperationCollection, '2018-01-01/generated/azure_mgmt_api_management/models/operation_collection.rb' + autoload :UserUpdateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/user_update_parameters.rb' + autoload :ResponseContract, '2018-01-01/generated/azure_mgmt_api_management/models/response_contract.rb' + autoload :IdentityProviderList, '2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_list.rb' + autoload :SchemaCollection, '2018-01-01/generated/azure_mgmt_api_management/models/schema_collection.rb' + autoload :IdentityProviderUpdateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_update_parameters.rb' + autoload :IssueCommentCollection, '2018-01-01/generated/azure_mgmt_api_management/models/issue_comment_collection.rb' + autoload :IdentityProviderBaseParameters, '2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_base_parameters.rb' + autoload :LoggerCollection, '2018-01-01/generated/azure_mgmt_api_management/models/logger_collection.rb' + autoload :LoggerUpdateContract, '2018-01-01/generated/azure_mgmt_api_management/models/logger_update_contract.rb' + autoload :RequestReportCollection, '2018-01-01/generated/azure_mgmt_api_management/models/request_report_collection.rb' + autoload :RecipientsContractProperties, '2018-01-01/generated/azure_mgmt_api_management/models/recipients_contract_properties.rb' + autoload :TagResourceContract, '2018-01-01/generated/azure_mgmt_api_management/models/tag_resource_contract.rb' + autoload :UserTokenResult, '2018-01-01/generated/azure_mgmt_api_management/models/user_token_result.rb' + autoload :ReportRecordContract, '2018-01-01/generated/azure_mgmt_api_management/models/report_record_contract.rb' + autoload :NotificationCollection, '2018-01-01/generated/azure_mgmt_api_management/models/notification_collection.rb' + autoload :AuthorizationServerContractBaseProperties, '2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_contract_base_properties.rb' + autoload :UserTokenParameters, '2018-01-01/generated/azure_mgmt_api_management/models/user_token_parameters.rb' + autoload :BackendProperties, '2018-01-01/generated/azure_mgmt_api_management/models/backend_properties.rb' + autoload :RecipientUserCollection, '2018-01-01/generated/azure_mgmt_api_management/models/recipient_user_collection.rb' + autoload :BackendBaseParameters, '2018-01-01/generated/azure_mgmt_api_management/models/backend_base_parameters.rb' + autoload :UserIdentityCollection, '2018-01-01/generated/azure_mgmt_api_management/models/user_identity_collection.rb' + autoload :QuotaCounterContract, '2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_contract.rb' + autoload :RecipientEmailCollection, '2018-01-01/generated/azure_mgmt_api_management/models/recipient_email_collection.rb' + autoload :CertificateInformation, '2018-01-01/generated/azure_mgmt_api_management/models/certificate_information.rb' + autoload :ConnectivityStatusContract, '2018-01-01/generated/azure_mgmt_api_management/models/connectivity_status_contract.rb' + autoload :ApiRevisionContract, '2018-01-01/generated/azure_mgmt_api_management/models/api_revision_contract.rb' + autoload :NetworkStatusContract, '2018-01-01/generated/azure_mgmt_api_management/models/network_status_contract.rb' + autoload :RepresentationContract, '2018-01-01/generated/azure_mgmt_api_management/models/representation_contract.rb' + autoload :NetworkStatusContractByLocation, '2018-01-01/generated/azure_mgmt_api_management/models/network_status_contract_by_location.rb' + autoload :IssueCollection, '2018-01-01/generated/azure_mgmt_api_management/models/issue_collection.rb' + autoload :UserCreateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/user_create_parameters.rb' + autoload :DiagnosticCollection, '2018-01-01/generated/azure_mgmt_api_management/models/diagnostic_collection.rb' + autoload :OpenIdConnectProviderCollection, '2018-01-01/generated/azure_mgmt_api_management/models/open_id_connect_provider_collection.rb' + autoload :ReportCollection, '2018-01-01/generated/azure_mgmt_api_management/models/report_collection.rb' + autoload :OpenidConnectProviderUpdateContract, '2018-01-01/generated/azure_mgmt_api_management/models/openid_connect_provider_update_contract.rb' + autoload :X509CertificateName, '2018-01-01/generated/azure_mgmt_api_management/models/x509certificate_name.rb' + autoload :GenerateSsoUrlResult, '2018-01-01/generated/azure_mgmt_api_management/models/generate_sso_url_result.rb' + autoload :BackendCollection, '2018-01-01/generated/azure_mgmt_api_management/models/backend_collection.rb' + autoload :TermsOfServiceProperties, '2018-01-01/generated/azure_mgmt_api_management/models/terms_of_service_properties.rb' + autoload :ApiUpdateContract, '2018-01-01/generated/azure_mgmt_api_management/models/api_update_contract.rb' + autoload :TenantConfigurationSyncStateContract, '2018-01-01/generated/azure_mgmt_api_management/models/tenant_configuration_sync_state_contract.rb' + autoload :OperationUpdateContract, '2018-01-01/generated/azure_mgmt_api_management/models/operation_update_contract.rb' + autoload :SubscriptionsDelegationSettingsProperties, '2018-01-01/generated/azure_mgmt_api_management/models/subscriptions_delegation_settings_properties.rb' + autoload :RequestReportRecordContract, '2018-01-01/generated/azure_mgmt_api_management/models/request_report_record_contract.rb' + autoload :RegistrationDelegationSettingsProperties, '2018-01-01/generated/azure_mgmt_api_management/models/registration_delegation_settings_properties.rb' + autoload :BackendProxyContract, '2018-01-01/generated/azure_mgmt_api_management/models/backend_proxy_contract.rb' + autoload :SaveConfigurationParameter, '2018-01-01/generated/azure_mgmt_api_management/models/save_configuration_parameter.rb' + autoload :ApiReleaseCollection, '2018-01-01/generated/azure_mgmt_api_management/models/api_release_collection.rb' + autoload :ProductUpdateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/product_update_parameters.rb' + autoload :QuotaCounterValueContract, '2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_value_contract.rb' + autoload :OperationResultContract, '2018-01-01/generated/azure_mgmt_api_management/models/operation_result_contract.rb' + autoload :IssueAttachmentCollection, '2018-01-01/generated/azure_mgmt_api_management/models/issue_attachment_collection.rb' + autoload :SubscriptionCollection, '2018-01-01/generated/azure_mgmt_api_management/models/subscription_collection.rb' + autoload :CertificateCollection, '2018-01-01/generated/azure_mgmt_api_management/models/certificate_collection.rb' + autoload :OperationResultLogItemContract, '2018-01-01/generated/azure_mgmt_api_management/models/operation_result_log_item_contract.rb' + autoload :PolicyContract, '2018-01-01/generated/azure_mgmt_api_management/models/policy_contract.rb' + autoload :ApiContractProperties, '2018-01-01/generated/azure_mgmt_api_management/models/api_contract_properties.rb' + autoload :ApiContract, '2018-01-01/generated/azure_mgmt_api_management/models/api_contract.rb' + autoload :ApiReleaseContract, '2018-01-01/generated/azure_mgmt_api_management/models/api_release_contract.rb' + autoload :OperationContract, '2018-01-01/generated/azure_mgmt_api_management/models/operation_contract.rb' + autoload :SchemaContract, '2018-01-01/generated/azure_mgmt_api_management/models/schema_contract.rb' + autoload :IssueContract, '2018-01-01/generated/azure_mgmt_api_management/models/issue_contract.rb' + autoload :IssueCommentContract, '2018-01-01/generated/azure_mgmt_api_management/models/issue_comment_contract.rb' + autoload :IssueAttachmentContract, '2018-01-01/generated/azure_mgmt_api_management/models/issue_attachment_contract.rb' + autoload :LoggerContract, '2018-01-01/generated/azure_mgmt_api_management/models/logger_contract.rb' + autoload :DiagnosticContract, '2018-01-01/generated/azure_mgmt_api_management/models/diagnostic_contract.rb' + autoload :ProductTagResourceContractProperties, '2018-01-01/generated/azure_mgmt_api_management/models/product_tag_resource_contract_properties.rb' + autoload :ApiTagResourceContractProperties, '2018-01-01/generated/azure_mgmt_api_management/models/api_tag_resource_contract_properties.rb' + autoload :ProductContract, '2018-01-01/generated/azure_mgmt_api_management/models/product_contract.rb' + autoload :AuthorizationServerContract, '2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_contract.rb' + autoload :AuthorizationServerUpdateContract, '2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_update_contract.rb' + autoload :BackendContract, '2018-01-01/generated/azure_mgmt_api_management/models/backend_contract.rb' + autoload :BackendReconnectContract, '2018-01-01/generated/azure_mgmt_api_management/models/backend_reconnect_contract.rb' + autoload :CertificateContract, '2018-01-01/generated/azure_mgmt_api_management/models/certificate_contract.rb' + autoload :ApiManagementServiceResource, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_resource.rb' + autoload :ApiManagementServiceUpdateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_update_parameters.rb' + autoload :EmailTemplateContract, '2018-01-01/generated/azure_mgmt_api_management/models/email_template_contract.rb' + autoload :GroupContract, '2018-01-01/generated/azure_mgmt_api_management/models/group_contract.rb' + autoload :UserContract, '2018-01-01/generated/azure_mgmt_api_management/models/user_contract.rb' + autoload :IdentityProviderContract, '2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_contract.rb' + autoload :NotificationContract, '2018-01-01/generated/azure_mgmt_api_management/models/notification_contract.rb' + autoload :RecipientUserContract, '2018-01-01/generated/azure_mgmt_api_management/models/recipient_user_contract.rb' + autoload :RecipientEmailContract, '2018-01-01/generated/azure_mgmt_api_management/models/recipient_email_contract.rb' + autoload :OpenidConnectProviderContract, '2018-01-01/generated/azure_mgmt_api_management/models/openid_connect_provider_contract.rb' + autoload :PortalSigninSettings, '2018-01-01/generated/azure_mgmt_api_management/models/portal_signin_settings.rb' + autoload :PortalSignupSettings, '2018-01-01/generated/azure_mgmt_api_management/models/portal_signup_settings.rb' + autoload :PortalDelegationSettings, '2018-01-01/generated/azure_mgmt_api_management/models/portal_delegation_settings.rb' + autoload :SubscriptionContract, '2018-01-01/generated/azure_mgmt_api_management/models/subscription_contract.rb' + autoload :PropertyContract, '2018-01-01/generated/azure_mgmt_api_management/models/property_contract.rb' + autoload :TagContract, '2018-01-01/generated/azure_mgmt_api_management/models/tag_contract.rb' + autoload :TagDescriptionContract, '2018-01-01/generated/azure_mgmt_api_management/models/tag_description_contract.rb' + autoload :ApiVersionSetContract, '2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_contract.rb' + autoload :PolicyContentFormat, '2018-01-01/generated/azure_mgmt_api_management/models/policy_content_format.rb' + autoload :Protocol, '2018-01-01/generated/azure_mgmt_api_management/models/protocol.rb' + autoload :ContentFormat, '2018-01-01/generated/azure_mgmt_api_management/models/content_format.rb' + autoload :SoapApiType, '2018-01-01/generated/azure_mgmt_api_management/models/soap_api_type.rb' + autoload :BearerTokenSendingMethods, '2018-01-01/generated/azure_mgmt_api_management/models/bearer_token_sending_methods.rb' + autoload :ApiType, '2018-01-01/generated/azure_mgmt_api_management/models/api_type.rb' + autoload :State, '2018-01-01/generated/azure_mgmt_api_management/models/state.rb' + autoload :LoggerType, '2018-01-01/generated/azure_mgmt_api_management/models/logger_type.rb' + autoload :ProductState, '2018-01-01/generated/azure_mgmt_api_management/models/product_state.rb' + autoload :GrantType, '2018-01-01/generated/azure_mgmt_api_management/models/grant_type.rb' + autoload :AuthorizationMethod, '2018-01-01/generated/azure_mgmt_api_management/models/authorization_method.rb' + autoload :ClientAuthenticationMethod, '2018-01-01/generated/azure_mgmt_api_management/models/client_authentication_method.rb' + autoload :BearerTokenSendingMethod, '2018-01-01/generated/azure_mgmt_api_management/models/bearer_token_sending_method.rb' + autoload :BackendProtocol, '2018-01-01/generated/azure_mgmt_api_management/models/backend_protocol.rb' + autoload :HostnameType, '2018-01-01/generated/azure_mgmt_api_management/models/hostname_type.rb' + autoload :SkuType, '2018-01-01/generated/azure_mgmt_api_management/models/sku_type.rb' + autoload :VirtualNetworkType, '2018-01-01/generated/azure_mgmt_api_management/models/virtual_network_type.rb' + autoload :NameAvailabilityReason, '2018-01-01/generated/azure_mgmt_api_management/models/name_availability_reason.rb' + autoload :GroupType, '2018-01-01/generated/azure_mgmt_api_management/models/group_type.rb' + autoload :Confirmation, '2018-01-01/generated/azure_mgmt_api_management/models/confirmation.rb' + autoload :UserState, '2018-01-01/generated/azure_mgmt_api_management/models/user_state.rb' + autoload :IdentityProviderType, '2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_type.rb' + autoload :ConnectivityStatusType, '2018-01-01/generated/azure_mgmt_api_management/models/connectivity_status_type.rb' + autoload :SubscriptionState, '2018-01-01/generated/azure_mgmt_api_management/models/subscription_state.rb' + autoload :AsyncOperationStatus, '2018-01-01/generated/azure_mgmt_api_management/models/async_operation_status.rb' + autoload :KeyType, '2018-01-01/generated/azure_mgmt_api_management/models/key_type.rb' + autoload :VersioningScheme, '2018-01-01/generated/azure_mgmt_api_management/models/versioning_scheme.rb' + autoload :TemplateName, '2018-01-01/generated/azure_mgmt_api_management/models/template_name.rb' + autoload :NotificationName, '2018-01-01/generated/azure_mgmt_api_management/models/notification_name.rb' + autoload :PolicyScopeContract, '2018-01-01/generated/azure_mgmt_api_management/models/policy_scope_contract.rb' + autoload :ExportFormat, '2018-01-01/generated/azure_mgmt_api_management/models/export_format.rb' + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api.rb new file mode 100644 index 0000000000..be18ebe8bf --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api.rb @@ -0,0 +1,1099 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class Api + include MsRestAzure + + # + # Creates and initializes a new instance of the Api class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists all APIs of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | serviceUrl | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | path | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param expand_api_version_set [Boolean] Include full ApiVersionSet resource + # in response + # @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_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, expand_api_version_set = false, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, expand_api_version_set, custom_headers) + first_page.get_all_items + end + + # + # Lists all APIs of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | serviceUrl | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | path | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param expand_api_version_set [Boolean] Include full ApiVersionSet resource + # in response + # @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_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, expand_api_version_set = false, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, expand_api_version_set, custom_headers).value! + end + + # + # Lists all APIs of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | serviceUrl | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | path | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param expand_api_version_set [Boolean] Include full ApiVersionSet resource + # in response + # @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_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, expand_api_version_set = false, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'api-version' => @client.api_version,'expandApiVersionSet' => expand_api_version_set}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiCollection.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 entity state (Etag) version of the API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, api_id, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, api_id, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @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_entity_tag_with_http_info(resource_group_name, service_name, api_id, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, api_id, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @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_entity_tag_async(resource_group_name, service_name, api_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the details of the API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiContract] operation results. + # + def get(resource_group_name, service_name, api_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, api_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of the API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @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, service_name, api_id, custom_headers = nil) + get_async(resource_group_name, service_name, api_id, custom_headers).value! + end + + # + # Gets the details of the API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @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, service_name, api_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiContract.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 new or updates existing specified API of the API Management service + # instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param parameters [ApiCreateOrUpdateParameter] Create or update parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiContract] operation results. + # + def create_or_update(resource_group_name, service_name, api_id, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates new or updates existing specified API of the API Management service + # instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param parameters [ApiCreateOrUpdateParameter] Create or update parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, api_id, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers).value! + end + + # + # Creates new or updates existing specified API of the API Management service + # instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param parameters [ApiCreateOrUpdateParameter] Create or update parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, api_id, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiCreateOrUpdateParameter.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.ApiManagement/service/{serviceName}/apis/{apiId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Updates the specified API of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param parameters [ApiUpdateContract] API Update Contract parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, api_id, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers).value! + nil + end + + # + # Updates the specified API of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param parameters [ApiUpdateContract] API Update Contract parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, api_id, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers).value! + end + + # + # Updates the specified API of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param parameters [ApiUpdateContract] API Update Contract parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, api_id, parameters, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiUpdateContract.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.ApiManagement/service/{serviceName}/apis/{apiId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_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(: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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Deletes the specified API of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param delete_revisions [Boolean] Delete all revisions of the Api. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, api_id, if_match, delete_revisions = nil, custom_headers = nil) + response = delete_async(resource_group_name, service_name, api_id, if_match, delete_revisions, custom_headers).value! + nil + end + + # + # Deletes the specified API of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param delete_revisions [Boolean] Delete all revisions of the Api. + # @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, service_name, api_id, if_match, delete_revisions = nil, custom_headers = nil) + delete_async(resource_group_name, service_name, api_id, if_match, delete_revisions, custom_headers).value! + end + + # + # Deletes the specified API of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param delete_revisions [Boolean] Delete all revisions of the Api. + # @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, service_name, api_id, if_match, delete_revisions = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'subscriptionId' => @client.subscription_id}, + query_params: {'deleteRevisions' => delete_revisions,'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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists a collection of apis associated with tags. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | isCurrent | eq | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_tags(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_tags_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists a collection of apis associated with tags. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | isCurrent | eq | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_tags_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_tags_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + end + + # + # Lists a collection of apis associated with tags. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | isCurrent | eq | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_tags_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagResourceCollection.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 APIs of the API Management service instance. + # + # @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 [ApiCollection] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all APIs of the API Management service instance. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all APIs of the API Management service instance. + # + # @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_service_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiCollection.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 collection of apis associated with tags. + # + # @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 [TagResourceCollection] operation results. + # + def list_by_tags_next(next_page_link, custom_headers = nil) + response = list_by_tags_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists a collection of apis associated with tags. + # + # @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_tags_next_with_http_info(next_page_link, custom_headers = nil) + list_by_tags_next_async(next_page_link, custom_headers).value! + end + + # + # Lists a collection of apis associated with tags. + # + # @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_tags_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagResourceCollection.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 APIs of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | serviceUrl | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | path | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param expand_api_version_set [Boolean] Include full ApiVersionSet resource + # in response + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiCollection] which provide lazy access to pages of the response. + # + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, expand_api_version_set = false, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, expand_api_version_set, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Lists a collection of apis associated with tags. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | isCurrent | eq | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TagResourceCollection] which provide lazy access to pages of the + # response. + # + def list_by_tags_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_tags_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_tags_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_diagnostic.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_diagnostic.rb new file mode 100644 index 0000000000..16e77d7d7c --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_diagnostic.rb @@ -0,0 +1,818 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class ApiDiagnostic + include MsRestAzure + + # + # Creates and initializes a new instance of the ApiDiagnostic class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists all diagnostics of an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, api_id, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists all diagnostics of an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_service_with_http_info(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! + end + + # + # Lists all diagnostics of an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service_async(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top,'$skip' => skip}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::DiagnosticCollection.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 entity state (Etag) version of the Diagnostic for an API specified + # by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, api_id, diagnostic_id, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, api_id, diagnostic_id, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the Diagnostic for an API specified + # by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service 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_entity_tag_with_http_info(resource_group_name, service_name, api_id, diagnostic_id, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, api_id, diagnostic_id, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the Diagnostic for an API specified + # by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service 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_entity_tag_async(resource_group_name, service_name, api_id, diagnostic_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'diagnostic_id is nil' if diagnostic_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'diagnosticId' => diagnostic_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the details of the Diagnostic for an API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DiagnosticContract] operation results. + # + def get(resource_group_name, service_name, api_id, diagnostic_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, api_id, diagnostic_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of the Diagnostic for an API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service 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, service_name, api_id, diagnostic_id, custom_headers = nil) + get_async(resource_group_name, service_name, api_id, diagnostic_id, custom_headers).value! + end + + # + # Gets the details of the Diagnostic for an API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service 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, service_name, api_id, diagnostic_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'diagnostic_id is nil' if diagnostic_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'diagnosticId' => diagnostic_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::DiagnosticContract.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 Diagnostic for an API or updates an existing one. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param parameters [DiagnosticContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DiagnosticContract] operation results. + # + def create_or_update(resource_group_name, service_name, api_id, diagnostic_id, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, api_id, diagnostic_id, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a new Diagnostic for an API or updates an existing one. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param parameters [DiagnosticContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, api_id, diagnostic_id, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, api_id, diagnostic_id, parameters, if_match, custom_headers).value! + end + + # + # Creates a new Diagnostic for an API or updates an existing one. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param parameters [DiagnosticContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, api_id, diagnostic_id, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'diagnostic_id is nil' if diagnostic_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::DiagnosticContract.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.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'diagnosticId' => diagnostic_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::DiagnosticContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::DiagnosticContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Updates the details of the Diagnostic for an API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param parameters [DiagnosticContract] Diagnostic Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, api_id, diagnostic_id, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, api_id, diagnostic_id, parameters, if_match, custom_headers).value! + nil + end + + # + # Updates the details of the Diagnostic for an API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param parameters [DiagnosticContract] Diagnostic Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, api_id, diagnostic_id, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, api_id, diagnostic_id, parameters, if_match, custom_headers).value! + end + + # + # Updates the details of the Diagnostic for an API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param parameters [DiagnosticContract] Diagnostic Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, api_id, diagnostic_id, parameters, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'diagnostic_id is nil' if diagnostic_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::DiagnosticContract.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.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'diagnosticId' => diagnostic_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(: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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Deletes the specified Diagnostic from an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, api_id, diagnostic_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, api_id, diagnostic_id, if_match, custom_headers).value! + nil + end + + # + # Deletes the specified Diagnostic from an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, api_id, diagnostic_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, api_id, diagnostic_id, if_match, custom_headers).value! + end + + # + # Deletes the specified Diagnostic from an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, api_id, diagnostic_id, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'diagnostic_id is nil' if diagnostic_id.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'diagnosticId' => diagnostic_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists all diagnostics of an API. + # + # @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 [DiagnosticCollection] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all diagnostics of an API. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all diagnostics of an API. + # + # @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_service_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::DiagnosticCollection.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 diagnostics of an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DiagnosticCollection] which provide lazy access to pages of the + # response. + # + def list_by_service_as_lazy(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_diagnostic_logger.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_diagnostic_logger.rb new file mode 100644 index 0000000000..edc4bd094b --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_diagnostic_logger.rb @@ -0,0 +1,600 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class ApiDiagnosticLogger + include MsRestAzure + + # + # Creates and initializes a new instance of the ApiDiagnosticLogger class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists all loggers assosiated with the specified Diagnostic of an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | type | eq | | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service(resource_group_name, service_name, api_id, diagnostic_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, api_id, diagnostic_id, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists all loggers assosiated with the specified Diagnostic of an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | type | eq | | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_service_with_http_info(resource_group_name, service_name, api_id, diagnostic_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, api_id, diagnostic_id, filter, top, skip, custom_headers).value! + end + + # + # Lists all loggers assosiated with the specified Diagnostic of an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | type | eq | | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service_async(resource_group_name, service_name, api_id, diagnostic_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.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, 'diagnostic_id is nil' if diagnostic_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}/loggers' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'subscriptionId' => @client.subscription_id,'diagnosticId' => diagnostic_id}, + query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top,'$skip' => skip}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::LoggerCollection.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 + + # + # Checks that logger entity specified by identifier is associated with the + # diagnostics entity. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Boolean] operation results. + # + def check_entity_exists(resource_group_name, service_name, api_id, diagnostic_id, loggerid, custom_headers = nil) + response = check_entity_exists_async(resource_group_name, service_name, api_id, diagnostic_id, loggerid, custom_headers).value! + response.body unless response.nil? + end + + # + # Checks that logger entity specified by identifier is associated with the + # diagnostics entity. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service 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 check_entity_exists_with_http_info(resource_group_name, service_name, api_id, diagnostic_id, loggerid, custom_headers = nil) + check_entity_exists_async(resource_group_name, service_name, api_id, diagnostic_id, loggerid, custom_headers).value! + end + + # + # Checks that logger entity specified by identifier is associated with the + # diagnostics entity. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service 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 check_entity_exists_async(resource_group_name, service_name, api_id, diagnostic_id, loggerid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'diagnostic_id is nil' if diagnostic_id.nil? + fail ArgumentError, 'loggerid is nil' if loggerid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}/loggers/{loggerid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'diagnosticId' => diagnostic_id,'loggerid' => loggerid,'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(:head, 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 == 204 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.body = (status_code == 204) + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Attaches a logger to a dignostic for an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoggerContract] operation results. + # + def create_or_update(resource_group_name, service_name, api_id, diagnostic_id, loggerid, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, api_id, diagnostic_id, loggerid, custom_headers).value! + response.body unless response.nil? + end + + # + # Attaches a logger to a dignostic for an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service 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 create_or_update_with_http_info(resource_group_name, service_name, api_id, diagnostic_id, loggerid, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, api_id, diagnostic_id, loggerid, custom_headers).value! + end + + # + # Attaches a logger to a dignostic for an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service 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 create_or_update_async(resource_group_name, service_name, api_id, diagnostic_id, loggerid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'diagnostic_id is nil' if diagnostic_id.nil? + fail ArgumentError, 'loggerid is nil' if loggerid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}/loggers/{loggerid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'diagnosticId' => diagnostic_id,'loggerid' => loggerid,'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 == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::LoggerContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::LoggerContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes the specified Logger from Diagnostic for an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service 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, service_name, api_id, diagnostic_id, loggerid, custom_headers = nil) + response = delete_async(resource_group_name, service_name, api_id, diagnostic_id, loggerid, custom_headers).value! + nil + end + + # + # Deletes the specified Logger from Diagnostic for an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service 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 delete_with_http_info(resource_group_name, service_name, api_id, diagnostic_id, loggerid, custom_headers = nil) + delete_async(resource_group_name, service_name, api_id, diagnostic_id, loggerid, custom_headers).value! + end + + # + # Deletes the specified Logger from Diagnostic for an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service 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 delete_async(resource_group_name, service_name, api_id, diagnostic_id, loggerid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'diagnostic_id is nil' if diagnostic_id.nil? + fail ArgumentError, 'loggerid is nil' if loggerid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}/loggers/{loggerid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'diagnosticId' => diagnostic_id,'loggerid' => loggerid,'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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists all loggers assosiated with the specified Diagnostic of an API. + # + # @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 [LoggerCollection] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all loggers assosiated with the specified Diagnostic of an API. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all loggers assosiated with the specified Diagnostic of an API. + # + # @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_service_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::LoggerCollection.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 loggers assosiated with the specified Diagnostic of an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | type | eq | | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoggerCollection] which provide lazy access to pages of the + # response. + # + def list_by_service_as_lazy(resource_group_name, service_name, api_id, diagnostic_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, api_id, diagnostic_id, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_export.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_export.rb new file mode 100644 index 0000000000..17ea970102 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_export.rb @@ -0,0 +1,140 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class ApiExport + include MsRestAzure + + # + # Creates and initializes a new instance of the ApiExport class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Gets the details of the API specified by its identifier in the format + # specified to the Storage Blob with SAS Key valid for 5 minutes. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param format [ExportFormat] Format in which to export the Api Details to the + # Storage Blob with Sas Key valid for 5 minutes. Possible values include: + # 'Swagger', 'Wsdl', 'Wadl' + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiExportResult] operation results. + # + def get(resource_group_name, service_name, api_id, format, custom_headers = nil) + response = get_async(resource_group_name, service_name, api_id, format, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of the API specified by its identifier in the format + # specified to the Storage Blob with SAS Key valid for 5 minutes. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param format [ExportFormat] Format in which to export the Api Details to the + # Storage Blob with Sas Key valid for 5 minutes. Possible values include: + # 'Swagger', 'Wsdl', 'Wadl' + # @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, service_name, api_id, format, custom_headers = nil) + get_async(resource_group_name, service_name, api_id, format, custom_headers).value! + end + + # + # Gets the details of the API specified by its identifier in the format + # specified to the Storage Blob with SAS Key valid for 5 minutes. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param format [ExportFormat] Format in which to export the Api Details to the + # Storage Blob with Sas Key valid for 5 minutes. Possible values include: + # 'Swagger', 'Wsdl', 'Wadl' + # @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, service_name, api_id, format, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'format is nil' if format.nil? + export = 'true' + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'subscriptionId' => @client.subscription_id}, + query_params: {'format' => format,'export' => export,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiExportResult.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_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_issue.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_issue.rb new file mode 100644 index 0000000000..30f81cc43e --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_issue.rb @@ -0,0 +1,852 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class ApiIssue + include MsRestAzure + + # + # Creates and initializes a new instance of the ApiIssue class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists all issues assosiated with the specified API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | state | eq | | + # | userId | ge, le, eq, ne, gt, lt | substringof, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, api_id, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists all issues assosiated with the specified API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | state | eq | | + # | userId | ge, le, eq, ne, gt, lt | substringof, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_service_with_http_info(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! + end + + # + # Lists all issues assosiated with the specified API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | state | eq | | + # | userId | ge, le, eq, ne, gt, lt | substringof, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service_async(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top,'$skip' => skip}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueCollection.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 entity state (Etag) version of the Issue for an API specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, api_id, issue_id, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, api_id, issue_id, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the Issue for an API specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service 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_entity_tag_with_http_info(resource_group_name, service_name, api_id, issue_id, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, api_id, issue_id, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the Issue for an API specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service 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_entity_tag_async(resource_group_name, service_name, api_id, issue_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'issue_id is nil' if issue_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'issueId' => issue_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the details of the Issue for an API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [IssueContract] operation results. + # + def get(resource_group_name, service_name, api_id, issue_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, api_id, issue_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of the Issue for an API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service 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, service_name, api_id, issue_id, custom_headers = nil) + get_async(resource_group_name, service_name, api_id, issue_id, custom_headers).value! + end + + # + # Gets the details of the Issue for an API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service 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, service_name, api_id, issue_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'issue_id is nil' if issue_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'issueId' => issue_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueContract.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 Issue for an API or updates an existing one. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param parameters [IssueContract] Create parameters. + # @param if_match [String] ETag of the Issue Entity. ETag should match the + # current entity state from the header response of the GET request or it should + # be * for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [IssueContract] operation results. + # + def create_or_update(resource_group_name, service_name, api_id, issue_id, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, api_id, issue_id, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a new Issue for an API or updates an existing one. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param parameters [IssueContract] Create parameters. + # @param if_match [String] ETag of the Issue Entity. ETag should match the + # current entity state from the header response of the GET request or it should + # be * for unconditional update. + # @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, service_name, api_id, issue_id, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, api_id, issue_id, parameters, if_match, custom_headers).value! + end + + # + # Creates a new Issue for an API or updates an existing one. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param parameters [IssueContract] Create parameters. + # @param if_match [String] ETag of the Issue Entity. ETag should match the + # current entity state from the header response of the GET request or it should + # be * for unconditional update. + # @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, service_name, api_id, issue_id, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'issue_id is nil' if issue_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueContract.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.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'issueId' => issue_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueContract.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 an existing issue for an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param parameters [IssueContract] Update parameters. + # @param if_match [String] ETag of the Issue Entity. ETag should match the + # current entity state from the header response of the GET request or it should + # be * for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [IssueContract] operation results. + # + def update(resource_group_name, service_name, api_id, issue_id, parameters, if_match = nil, custom_headers = nil) + response = update_async(resource_group_name, service_name, api_id, issue_id, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates an existing issue for an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param parameters [IssueContract] Update parameters. + # @param if_match [String] ETag of the Issue Entity. ETag should match the + # current entity state from the header response of the GET request or it should + # be * for unconditional update. + # @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, service_name, api_id, issue_id, parameters, if_match = nil, custom_headers = nil) + update_async(resource_group_name, service_name, api_id, issue_id, parameters, if_match, custom_headers).value! + end + + # + # Updates an existing issue for an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param parameters [IssueContract] Update parameters. + # @param if_match [String] ETag of the Issue Entity. ETag should match the + # current entity state from the header response of the GET request or it should + # be * for unconditional update. + # @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, service_name, api_id, issue_id, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'issue_id is nil' if issue_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueContract.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.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'issueId' => issue_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(: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 == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes the specified Issue from an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Issue Entity. ETag should match the + # current entity state from the header response of the GET request or it should + # be * for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, api_id, issue_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, api_id, issue_id, if_match, custom_headers).value! + nil + end + + # + # Deletes the specified Issue from an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Issue Entity. ETag should match the + # current entity state from the header response of the GET request or it should + # be * for unconditional update. + # @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, service_name, api_id, issue_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, api_id, issue_id, if_match, custom_headers).value! + end + + # + # Deletes the specified Issue from an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Issue Entity. ETag should match the + # current entity state from the header response of the GET request or it should + # be * for unconditional update. + # @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, service_name, api_id, issue_id, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'issue_id is nil' if issue_id.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'issueId' => issue_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists all issues assosiated with the specified API. + # + # @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 [IssueCollection] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all issues assosiated with the specified API. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all issues assosiated with the specified API. + # + # @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_service_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueCollection.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 issues assosiated with the specified API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | state | eq | | + # | userId | ge, le, eq, ne, gt, lt | substringof, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [IssueCollection] which provide lazy access to pages of the response. + # + def list_by_service_as_lazy(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_issue_attachment.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_issue_attachment.rb new file mode 100644 index 0000000000..4fdcf56969 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_issue_attachment.rb @@ -0,0 +1,751 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class ApiIssueAttachment + include MsRestAzure + + # + # Creates and initializes a new instance of the ApiIssueAttachment class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists all comments for the Issue assosiated with the specified API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | userId | ge, le, eq, ne, gt, lt | substringof, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service(resource_group_name, service_name, api_id, issue_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, api_id, issue_id, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists all comments for the Issue assosiated with the specified API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | userId | ge, le, eq, ne, gt, lt | substringof, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_service_with_http_info(resource_group_name, service_name, api_id, issue_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, api_id, issue_id, filter, top, skip, custom_headers).value! + end + + # + # Lists all comments for the Issue assosiated with the specified API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | userId | ge, le, eq, ne, gt, lt | substringof, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service_async(resource_group_name, service_name, api_id, issue_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, 'issue_id is nil' if issue_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'issueId' => issue_id,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top,'$skip' => skip}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueAttachmentCollection.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 entity state (Etag) version of the issue Attachment for an API + # specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param attachment_id [String] Attachment identifier within an Issue. Must be + # unique in the current Issue. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, api_id, issue_id, attachment_id, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, api_id, issue_id, attachment_id, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the issue Attachment for an API + # specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param attachment_id [String] Attachment identifier within an Issue. Must be + # unique in the current Issue. + # @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_entity_tag_with_http_info(resource_group_name, service_name, api_id, issue_id, attachment_id, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, api_id, issue_id, attachment_id, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the issue Attachment for an API + # specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param attachment_id [String] Attachment identifier within an Issue. Must be + # unique in the current Issue. + # @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_entity_tag_async(resource_group_name, service_name, api_id, issue_id, attachment_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'issue_id is nil' if issue_id.nil? + fail ArgumentError, 'attachment_id is nil' if attachment_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'issueId' => issue_id,'attachmentId' => attachment_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the details of the issue Attachment for an API specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param attachment_id [String] Attachment identifier within an Issue. Must be + # unique in the current Issue. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [IssueAttachmentContract] operation results. + # + def get(resource_group_name, service_name, api_id, issue_id, attachment_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, api_id, issue_id, attachment_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of the issue Attachment for an API specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param attachment_id [String] Attachment identifier within an Issue. Must be + # unique in the current Issue. + # @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, service_name, api_id, issue_id, attachment_id, custom_headers = nil) + get_async(resource_group_name, service_name, api_id, issue_id, attachment_id, custom_headers).value! + end + + # + # Gets the details of the issue Attachment for an API specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param attachment_id [String] Attachment identifier within an Issue. Must be + # unique in the current Issue. + # @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, service_name, api_id, issue_id, attachment_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'issue_id is nil' if issue_id.nil? + fail ArgumentError, 'attachment_id is nil' if attachment_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'issueId' => issue_id,'attachmentId' => attachment_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueAttachmentContract.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 Attachment for the Issue in an API or updates an existing one. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param attachment_id [String] Attachment identifier within an Issue. Must be + # unique in the current Issue. + # @param parameters [IssueAttachmentContract] Create parameters. + # @param if_match [String] ETag of the Issue Entity. ETag should match the + # current entity state from the header response of the GET request or it should + # be * for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [IssueAttachmentContract] operation results. + # + def create_or_update(resource_group_name, service_name, api_id, issue_id, attachment_id, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, api_id, issue_id, attachment_id, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a new Attachment for the Issue in an API or updates an existing one. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param attachment_id [String] Attachment identifier within an Issue. Must be + # unique in the current Issue. + # @param parameters [IssueAttachmentContract] Create parameters. + # @param if_match [String] ETag of the Issue Entity. ETag should match the + # current entity state from the header response of the GET request or it should + # be * for unconditional update. + # @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, service_name, api_id, issue_id, attachment_id, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, api_id, issue_id, attachment_id, parameters, if_match, custom_headers).value! + end + + # + # Creates a new Attachment for the Issue in an API or updates an existing one. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param attachment_id [String] Attachment identifier within an Issue. Must be + # unique in the current Issue. + # @param parameters [IssueAttachmentContract] Create parameters. + # @param if_match [String] ETag of the Issue Entity. ETag should match the + # current entity state from the header response of the GET request or it should + # be * for unconditional update. + # @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, service_name, api_id, issue_id, attachment_id, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'issue_id is nil' if issue_id.nil? + fail ArgumentError, 'attachment_id is nil' if attachment_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueAttachmentContract.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.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'issueId' => issue_id,'attachmentId' => attachment_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueAttachmentContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueAttachmentContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes the specified comment from an Issue. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param attachment_id [String] Attachment identifier within an Issue. Must be + # unique in the current Issue. + # @param if_match [String] ETag of the Issue Entity. ETag should match the + # current entity state from the header response of the GET request or it should + # be * for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, api_id, issue_id, attachment_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, api_id, issue_id, attachment_id, if_match, custom_headers).value! + nil + end + + # + # Deletes the specified comment from an Issue. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param attachment_id [String] Attachment identifier within an Issue. Must be + # unique in the current Issue. + # @param if_match [String] ETag of the Issue Entity. ETag should match the + # current entity state from the header response of the GET request or it should + # be * for unconditional update. + # @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, service_name, api_id, issue_id, attachment_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, api_id, issue_id, attachment_id, if_match, custom_headers).value! + end + + # + # Deletes the specified comment from an Issue. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param attachment_id [String] Attachment identifier within an Issue. Must be + # unique in the current Issue. + # @param if_match [String] ETag of the Issue Entity. ETag should match the + # current entity state from the header response of the GET request or it should + # be * for unconditional update. + # @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, service_name, api_id, issue_id, attachment_id, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'issue_id is nil' if issue_id.nil? + fail ArgumentError, 'attachment_id is nil' if attachment_id.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'issueId' => issue_id,'attachmentId' => attachment_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists all comments for the Issue assosiated with the specified API. + # + # @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 [IssueAttachmentCollection] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all comments for the Issue assosiated with the specified API. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all comments for the Issue assosiated with the specified API. + # + # @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_service_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueAttachmentCollection.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 comments for the Issue assosiated with the specified API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | userId | ge, le, eq, ne, gt, lt | substringof, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [IssueAttachmentCollection] which provide lazy access to pages of the + # response. + # + def list_by_service_as_lazy(resource_group_name, service_name, api_id, issue_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, api_id, issue_id, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_issue_comment.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_issue_comment.rb new file mode 100644 index 0000000000..aee3b4cbc7 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_issue_comment.rb @@ -0,0 +1,748 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class ApiIssueComment + include MsRestAzure + + # + # Creates and initializes a new instance of the ApiIssueComment class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists all comments for the Issue assosiated with the specified API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | userId | ge, le, eq, ne, gt, lt | substringof, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service(resource_group_name, service_name, api_id, issue_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, api_id, issue_id, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists all comments for the Issue assosiated with the specified API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | userId | ge, le, eq, ne, gt, lt | substringof, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_service_with_http_info(resource_group_name, service_name, api_id, issue_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, api_id, issue_id, filter, top, skip, custom_headers).value! + end + + # + # Lists all comments for the Issue assosiated with the specified API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | userId | ge, le, eq, ne, gt, lt | substringof, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service_async(resource_group_name, service_name, api_id, issue_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, 'issue_id is nil' if issue_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'issueId' => issue_id,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top,'$skip' => skip}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueCommentCollection.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 entity state (Etag) version of the issue Comment for an API + # specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param comment_id [String] Comment identifier within an Issue. Must be unique + # in the current Issue. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, api_id, issue_id, comment_id, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, api_id, issue_id, comment_id, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the issue Comment for an API + # specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param comment_id [String] Comment identifier within an Issue. Must be unique + # in the current Issue. + # @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_entity_tag_with_http_info(resource_group_name, service_name, api_id, issue_id, comment_id, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, api_id, issue_id, comment_id, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the issue Comment for an API + # specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param comment_id [String] Comment identifier within an Issue. Must be unique + # in the current Issue. + # @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_entity_tag_async(resource_group_name, service_name, api_id, issue_id, comment_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'issue_id is nil' if issue_id.nil? + fail ArgumentError, 'comment_id is nil' if comment_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'issueId' => issue_id,'commentId' => comment_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the details of the issue Comment for an API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param comment_id [String] Comment identifier within an Issue. Must be unique + # in the current Issue. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [IssueCommentContract] operation results. + # + def get(resource_group_name, service_name, api_id, issue_id, comment_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, api_id, issue_id, comment_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of the issue Comment for an API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param comment_id [String] Comment identifier within an Issue. Must be unique + # in the current Issue. + # @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, service_name, api_id, issue_id, comment_id, custom_headers = nil) + get_async(resource_group_name, service_name, api_id, issue_id, comment_id, custom_headers).value! + end + + # + # Gets the details of the issue Comment for an API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param comment_id [String] Comment identifier within an Issue. Must be unique + # in the current Issue. + # @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, service_name, api_id, issue_id, comment_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'issue_id is nil' if issue_id.nil? + fail ArgumentError, 'comment_id is nil' if comment_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'issueId' => issue_id,'commentId' => comment_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueCommentContract.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 Comment for the Issue in an API or updates an existing one. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param comment_id [String] Comment identifier within an Issue. Must be unique + # in the current Issue. + # @param parameters [IssueCommentContract] Create parameters. + # @param if_match [String] ETag of the Issue Entity. ETag should match the + # current entity state from the header response of the GET request or it should + # be * for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [IssueCommentContract] operation results. + # + def create_or_update(resource_group_name, service_name, api_id, issue_id, comment_id, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, api_id, issue_id, comment_id, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a new Comment for the Issue in an API or updates an existing one. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param comment_id [String] Comment identifier within an Issue. Must be unique + # in the current Issue. + # @param parameters [IssueCommentContract] Create parameters. + # @param if_match [String] ETag of the Issue Entity. ETag should match the + # current entity state from the header response of the GET request or it should + # be * for unconditional update. + # @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, service_name, api_id, issue_id, comment_id, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, api_id, issue_id, comment_id, parameters, if_match, custom_headers).value! + end + + # + # Creates a new Comment for the Issue in an API or updates an existing one. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param comment_id [String] Comment identifier within an Issue. Must be unique + # in the current Issue. + # @param parameters [IssueCommentContract] Create parameters. + # @param if_match [String] ETag of the Issue Entity. ETag should match the + # current entity state from the header response of the GET request or it should + # be * for unconditional update. + # @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, service_name, api_id, issue_id, comment_id, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'issue_id is nil' if issue_id.nil? + fail ArgumentError, 'comment_id is nil' if comment_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueCommentContract.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.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'issueId' => issue_id,'commentId' => comment_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueCommentContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueCommentContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes the specified comment from an Issue. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param comment_id [String] Comment identifier within an Issue. Must be unique + # in the current Issue. + # @param if_match [String] ETag of the Issue Entity. ETag should match the + # current entity state from the header response of the GET request or it should + # be * for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, api_id, issue_id, comment_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, api_id, issue_id, comment_id, if_match, custom_headers).value! + nil + end + + # + # Deletes the specified comment from an Issue. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param comment_id [String] Comment identifier within an Issue. Must be unique + # in the current Issue. + # @param if_match [String] ETag of the Issue Entity. ETag should match the + # current entity state from the header response of the GET request or it should + # be * for unconditional update. + # @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, service_name, api_id, issue_id, comment_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, api_id, issue_id, comment_id, if_match, custom_headers).value! + end + + # + # Deletes the specified comment from an Issue. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param comment_id [String] Comment identifier within an Issue. Must be unique + # in the current Issue. + # @param if_match [String] ETag of the Issue Entity. ETag should match the + # current entity state from the header response of the GET request or it should + # be * for unconditional update. + # @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, service_name, api_id, issue_id, comment_id, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'issue_id is nil' if issue_id.nil? + fail ArgumentError, 'comment_id is nil' if comment_id.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'issueId' => issue_id,'commentId' => comment_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists all comments for the Issue assosiated with the specified API. + # + # @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 [IssueCommentCollection] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all comments for the Issue assosiated with the specified API. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all comments for the Issue assosiated with the specified API. + # + # @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_service_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueCommentCollection.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 comments for the Issue assosiated with the specified API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param issue_id [String] Issue identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | userId | ge, le, eq, ne, gt, lt | substringof, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [IssueCommentCollection] which provide lazy access to pages of the + # response. + # + def list_by_service_as_lazy(resource_group_name, service_name, api_id, issue_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, api_id, issue_id, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_management_client.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_management_client.rb new file mode 100644 index 0000000000..ccbfb6204d --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_management_client.rb @@ -0,0 +1,363 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # A service client - single point of access to the REST API. + # + class ApiManagementClient < MsRestAzure::AzureServiceClient + include MsRestAzure + include MsRestAzure::Serialization + + # @return [String] the base URI of the service. + attr_accessor :base_url + + # @return Credentials needed for the client to connect to Azure. + attr_reader :credentials + + # @return [String] Version of the API to be used with the client request. + attr_reader :api_version + + # @return [String] Subscription credentials which uniquely identify + # Microsoft Azure subscription. The subscription ID forms part of the URI + # for every service call. + attr_accessor :subscription_id + + # @return [String] Gets or sets the preferred language for the response. + attr_accessor :accept_language + + # @return [Integer] Gets or sets the retry timeout in seconds for Long + # Running Operations. Default value is 30. + attr_accessor :long_running_operation_retry_timeout + + # @return [Boolean] When set to true a unique x-ms-client-request-id value + # is generated and included in each request. Default is true. + attr_accessor :generate_client_request_id + + # @return [Policy] policy + attr_reader :policy + + # @return [PolicySnippets] policy_snippets + attr_reader :policy_snippets + + # @return [Regions] regions + attr_reader :regions + + # @return [Api] api + attr_reader :api + + # @return [ApiRevisions] api_revisions + attr_reader :api_revisions + + # @return [ApiRelease] api_release + attr_reader :api_release + + # @return [ApiOperation] api_operation + attr_reader :api_operation + + # @return [ApiOperationPolicy] api_operation_policy + attr_reader :api_operation_policy + + # @return [ApiProduct] api_product + attr_reader :api_product + + # @return [ApiPolicy] api_policy + attr_reader :api_policy + + # @return [ApiSchema] api_schema + attr_reader :api_schema + + # @return [ApiDiagnostic] api_diagnostic + attr_reader :api_diagnostic + + # @return [ApiDiagnosticLogger] api_diagnostic_logger + attr_reader :api_diagnostic_logger + + # @return [ApiIssue] api_issue + attr_reader :api_issue + + # @return [ApiIssueComment] api_issue_comment + attr_reader :api_issue_comment + + # @return [ApiIssueAttachment] api_issue_attachment + attr_reader :api_issue_attachment + + # @return [AuthorizationServer] authorization_server + attr_reader :authorization_server + + # @return [Backend] backend + attr_reader :backend + + # @return [Certificate] certificate + attr_reader :certificate + + # @return [ApiManagementOperations] api_management_operations + attr_reader :api_management_operations + + # @return [ApiManagementService] api_management_service + attr_reader :api_management_service + + # @return [Diagnostic] diagnostic + attr_reader :diagnostic + + # @return [DiagnosticLogger] diagnostic_logger + attr_reader :diagnostic_logger + + # @return [EmailTemplate] email_template + attr_reader :email_template + + # @return [Group] group + attr_reader :group + + # @return [GroupUser] group_user + attr_reader :group_user + + # @return [IdentityProvider] identity_provider + attr_reader :identity_provider + + # @return [Logger] logger + attr_reader :logger + + # @return [Notification] notification + attr_reader :notification + + # @return [NotificationRecipientUser] notification_recipient_user + attr_reader :notification_recipient_user + + # @return [NotificationRecipientEmail] notification_recipient_email + attr_reader :notification_recipient_email + + # @return [NetworkStatus] network_status + attr_reader :network_status + + # @return [OpenIdConnectProvider] open_id_connect_provider + attr_reader :open_id_connect_provider + + # @return [SignInSettings] sign_in_settings + attr_reader :sign_in_settings + + # @return [SignUpSettings] sign_up_settings + attr_reader :sign_up_settings + + # @return [DelegationSettings] delegation_settings + attr_reader :delegation_settings + + # @return [Product] product + attr_reader :product + + # @return [ProductApi] product_api + attr_reader :product_api + + # @return [ProductGroup] product_group + attr_reader :product_group + + # @return [ProductSubscriptions] product_subscriptions + attr_reader :product_subscriptions + + # @return [ProductPolicy] product_policy + attr_reader :product_policy + + # @return [Property] property + attr_reader :property + + # @return [QuotaByCounterKeys] quota_by_counter_keys + attr_reader :quota_by_counter_keys + + # @return [QuotaByPeriodKeys] quota_by_period_keys + attr_reader :quota_by_period_keys + + # @return [Reports] reports + attr_reader :reports + + # @return [Subscription] subscription + attr_reader :subscription + + # @return [TagResource] tag_resource + attr_reader :tag_resource + + # @return [Tag] tag + attr_reader :tag + + # @return [TagDescription] tag_description + attr_reader :tag_description + + # @return [OperationOperations] operation_operations + attr_reader :operation_operations + + # @return [TenantAccess] tenant_access + attr_reader :tenant_access + + # @return [TenantAccessGit] tenant_access_git + attr_reader :tenant_access_git + + # @return [TenantConfiguration] tenant_configuration + attr_reader :tenant_configuration + + # @return [User] user + attr_reader :user + + # @return [UserGroup] user_group + attr_reader :user_group + + # @return [UserSubscription] user_subscription + attr_reader :user_subscription + + # @return [UserIdentities] user_identities + attr_reader :user_identities + + # @return [ApiVersionSet] api_version_set + attr_reader :api_version_set + + # @return [ApiExport] api_export + attr_reader :api_export + + # + # Creates initializes a new instance of the ApiManagementClient class. + # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client. + # @param base_url [String] the base URI of the service. + # @param options [Array] filters to be applied to the HTTP requests. + # + def initialize(credentials = nil, base_url = nil, options = nil) + super(credentials, options) + @base_url = base_url || 'https://management.azure.com' + + fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil? + @credentials = credentials + + @policy = Policy.new(self) + @policy_snippets = PolicySnippets.new(self) + @regions = Regions.new(self) + @api = Api.new(self) + @api_revisions = ApiRevisions.new(self) + @api_release = ApiRelease.new(self) + @api_operation = ApiOperation.new(self) + @api_operation_policy = ApiOperationPolicy.new(self) + @api_product = ApiProduct.new(self) + @api_policy = ApiPolicy.new(self) + @api_schema = ApiSchema.new(self) + @api_diagnostic = ApiDiagnostic.new(self) + @api_diagnostic_logger = ApiDiagnosticLogger.new(self) + @api_issue = ApiIssue.new(self) + @api_issue_comment = ApiIssueComment.new(self) + @api_issue_attachment = ApiIssueAttachment.new(self) + @authorization_server = AuthorizationServer.new(self) + @backend = Backend.new(self) + @certificate = Certificate.new(self) + @api_management_operations = ApiManagementOperations.new(self) + @api_management_service = ApiManagementService.new(self) + @diagnostic = Diagnostic.new(self) + @diagnostic_logger = DiagnosticLogger.new(self) + @email_template = EmailTemplate.new(self) + @group = Group.new(self) + @group_user = GroupUser.new(self) + @identity_provider = IdentityProvider.new(self) + @logger = Logger.new(self) + @notification = Notification.new(self) + @notification_recipient_user = NotificationRecipientUser.new(self) + @notification_recipient_email = NotificationRecipientEmail.new(self) + @network_status = NetworkStatus.new(self) + @open_id_connect_provider = OpenIdConnectProvider.new(self) + @sign_in_settings = SignInSettings.new(self) + @sign_up_settings = SignUpSettings.new(self) + @delegation_settings = DelegationSettings.new(self) + @product = Product.new(self) + @product_api = ProductApi.new(self) + @product_group = ProductGroup.new(self) + @product_subscriptions = ProductSubscriptions.new(self) + @product_policy = ProductPolicy.new(self) + @property = Property.new(self) + @quota_by_counter_keys = QuotaByCounterKeys.new(self) + @quota_by_period_keys = QuotaByPeriodKeys.new(self) + @reports = Reports.new(self) + @subscription = Subscription.new(self) + @tag_resource = TagResource.new(self) + @tag = Tag.new(self) + @tag_description = TagDescription.new(self) + @operation_operations = OperationOperations.new(self) + @tenant_access = TenantAccess.new(self) + @tenant_access_git = TenantAccessGit.new(self) + @tenant_configuration = TenantConfiguration.new(self) + @user = User.new(self) + @user_group = UserGroup.new(self) + @user_subscription = UserSubscription.new(self) + @user_identities = UserIdentities.new(self) + @api_version_set = ApiVersionSet.new(self) + @api_export = ApiExport.new(self) + @api_version = '2018-01-01' + @accept_language = 'en-US' + @long_running_operation_retry_timeout = 30 + @generate_client_request_id = true + add_telemetry + end + + # + # Makes a request and returns the body of the response. + # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete. + # @param path [String] the path, relative to {base_url}. + # @param options [Hash{String=>String}] specifying any request options like :body. + # @return [Hash{String=>String}] containing the body of the response. + # Example: + # + # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}" + # path = "/path" + # options = { + # body: request_content, + # query_params: {'api-version' => '2016-02-01'} + # } + # result = @client.make_request(:put, path, options) + # + def make_request(method, path, options = {}) + result = make_request_with_http_info(method, path, options) + result.body unless result.nil? + end + + # + # Makes a request and returns the operation response. + # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete. + # @param path [String] the path, relative to {base_url}. + # @param options [Hash{String=>String}] specifying any request options like :body. + # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status. + # + def make_request_with_http_info(method, path, options = {}) + result = make_request_async(method, path, options).value! + result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body) + result + end + + # + # Makes a request asynchronously. + # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete. + # @param path [String] the path, relative to {base_url}. + # @param options [Hash{String=>String}] specifying any request options like :body. + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def make_request_async(method, path, options = {}) + fail ArgumentError, 'method is nil' if method.nil? + fail ArgumentError, 'path is nil' if path.nil? + + request_url = options[:base_url] || @base_url + + request_headers = @request_headers + request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil? + options.merge!({headers: request_headers.merge(options[:headers] || {})}) + options.merge!({credentials: @credentials}) unless @credentials.nil? + + super(request_url, method, path, options) + end + + + private + # + # Adds telemetry information. + # + def add_telemetry + sdk_information = 'azure_mgmt_api_management' + if defined? Azure::ApiManagement::Mgmt::V2018_01_01_preview::VERSION + sdk_information = "#{sdk_information}/#{Azure::ApiManagement::Mgmt::V2018_01_01_preview::VERSION}" + end + add_user_agent_information(sdk_information) + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_management_operations.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_management_operations.rb new file mode 100644 index 0000000000..e16bba260c --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_management_operations.rb @@ -0,0 +1,220 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class ApiManagementOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the ApiManagementOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists all of the available REST API operations of the Microsoft.ApiManagement + # provider. + # + # @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 + + # + # Lists all of the available REST API operations of the Microsoft.ApiManagement + # provider. + # + # @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 + + # + # Lists all of the available REST API operations of the Microsoft.ApiManagement + # provider. + # + # @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.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 = 'providers/Microsoft.ApiManagement/operations' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::OperationListResult.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 of the available REST API operations of the Microsoft.ApiManagement + # provider. + # + # @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 [OperationListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all of the available REST API operations of the Microsoft.ApiManagement + # provider. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all of the available REST API operations of the Microsoft.ApiManagement + # provider. + # + # @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::ApiManagement::Mgmt::V2018_01_01_preview::Models::OperationListResult.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 of the available REST API operations of the Microsoft.ApiManagement + # provider. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [OperationListResult] 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 + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_management_service.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_management_service.rb new file mode 100644 index 0000000000..550cd83fbe --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_management_service.rb @@ -0,0 +1,1885 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class ApiManagementService + include MsRestAzure + + # + # Creates and initializes a new instance of the ApiManagementService class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Restores a backup of an API Management service created using the + # ApiManagementService_Backup operation on the current service. This is a long + # running operation and could take several minutes to complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceBackupRestoreParameters] Parameters + # supplied to the Restore API Management service from backup operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiManagementServiceResource] operation results. + # + def restore(resource_group_name, service_name, parameters, custom_headers = nil) + response = restore_async(resource_group_name, service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceBackupRestoreParameters] Parameters + # supplied to the Restore API Management service from backup operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def restore_async(resource_group_name, service_name, parameters, custom_headers = nil) + # Send request + promise = begin_restore_async(resource_group_name, service_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceResource.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 a backup of the API Management service to the given Azure Storage + # Account. This is long running operation and could take several minutes to + # complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceBackupRestoreParameters] Parameters + # supplied to the ApiManagementService_Backup operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiManagementServiceResource] operation results. + # + def backup(resource_group_name, service_name, parameters, custom_headers = nil) + response = backup_async(resource_group_name, service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceBackupRestoreParameters] Parameters + # supplied to the ApiManagementService_Backup operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def backup_async(resource_group_name, service_name, parameters, custom_headers = nil) + # Send request + promise = begin_backup_async(resource_group_name, service_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceResource.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 API Management service. This is long running operation + # and could take several minutes to complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceResource] Parameters supplied to the + # CreateOrUpdate API Management service operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiManagementServiceResource] operation results. + # + def create_or_update(resource_group_name, service_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceResource] Parameters supplied to the + # CreateOrUpdate API Management service operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(resource_group_name, service_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, service_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceResource.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Updates an existing API Management service. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceUpdateParameters] Parameters supplied + # to the CreateOrUpdate API Management service operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiManagementServiceResource] operation results. + # + def update(resource_group_name, service_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceUpdateParameters] Parameters supplied + # to the CreateOrUpdate API Management service operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def update_async(resource_group_name, service_name, parameters, custom_headers = nil) + # Send request + promise = begin_update_async(resource_group_name, service_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceResource.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 an API Management service resource description. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiManagementServiceResource] operation results. + # + def get(resource_group_name, service_name, custom_headers = nil) + response = get_async(resource_group_name, service_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets an API Management service resource description. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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, service_name, custom_headers = nil) + get_async(resource_group_name, service_name, custom_headers).value! + end + + # + # Gets an API Management service resource description. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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, service_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceResource.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes an existing API Management service. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, custom_headers = nil) + response = delete_async(resource_group_name, service_name, custom_headers).value! + nil + end + + # + # Deletes an existing API Management service. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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, service_name, custom_headers = nil) + delete_async(resource_group_name, service_name, custom_headers).value! + end + + # + # Deletes an existing API Management service. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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, service_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_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 + + # + # List all API Management services within a resource group. + # + # @param resource_group_name [String] The name of the resource group. + # @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 + + # + # List all API Management services within a resource group. + # + # @param resource_group_name [String] The name of the resource 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 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 + + # + # List all API Management services within a resource group. + # + # @param resource_group_name [String] The name of the resource 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 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.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service' + + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceListResult.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 API Management services within an Azure 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 + + # + # Lists all API Management services within an Azure 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 + + # + # Lists all API Management services within an Azure 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.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/service' + + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceListResult.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 Single-Sign-On token for the API Management Service which is valid + # for 5 Minutes. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiManagementServiceGetSsoTokenResult] operation results. + # + def get_sso_token(resource_group_name, service_name, custom_headers = nil) + response = get_sso_token_async(resource_group_name, service_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the Single-Sign-On token for the API Management Service which is valid + # for 5 Minutes. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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_sso_token_with_http_info(resource_group_name, service_name, custom_headers = nil) + get_sso_token_async(resource_group_name, service_name, custom_headers).value! + end + + # + # Gets the Single-Sign-On token for the API Management Service which is valid + # for 5 Minutes. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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_sso_token_async(resource_group_name, service_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/getssotoken' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceGetSsoTokenResult.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 + + # + # Checks availability and correctness of a name for an API Management service. + # + # @param parameters [ApiManagementServiceCheckNameAvailabilityParameters] + # Parameters supplied to the CheckNameAvailability operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiManagementServiceNameAvailabilityResult] operation results. + # + def check_name_availability(parameters, custom_headers = nil) + response = check_name_availability_async(parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Checks availability and correctness of a name for an API Management service. + # + # @param parameters [ApiManagementServiceCheckNameAvailabilityParameters] + # Parameters supplied to the CheckNameAvailability 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 check_name_availability_with_http_info(parameters, custom_headers = nil) + check_name_availability_async(parameters, custom_headers).value! + end + + # + # Checks availability and correctness of a name for an API Management service. + # + # @param parameters [ApiManagementServiceCheckNameAvailabilityParameters] + # Parameters supplied to the CheckNameAvailability 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 check_name_availability_async(parameters, custom_headers = nil) + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceCheckNameAvailabilityParameters.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.ApiManagement/checkNameAvailability' + + 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}, + 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 + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceNameAvailabilityResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Updates the Microsoft.ApiManagement resource running in the Virtual network + # to pick the updated network settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceApplyNetworkConfigurationParameters] + # Parameters supplied to the Apply Network Configuration operation. If the + # parameters are empty, all the regions in which the Api Management service is + # deployed will be updated sequentially without incurring downtime in the + # region. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiManagementServiceResource] operation results. + # + def apply_network_configuration_updates(resource_group_name, service_name, parameters = nil, custom_headers = nil) + response = apply_network_configuration_updates_async(resource_group_name, service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceApplyNetworkConfigurationParameters] + # Parameters supplied to the Apply Network Configuration operation. If the + # parameters are empty, all the regions in which the Api Management service is + # deployed will be updated sequentially without incurring downtime in the + # region. + # @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 apply_network_configuration_updates_async(resource_group_name, service_name, parameters = nil, custom_headers = nil) + # Send request + promise = begin_apply_network_configuration_updates_async(resource_group_name, service_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceResource.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 + + # + # Upload Custom Domain SSL certificate for an API Management service. This + # operation will be deprecated in future releases. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceUploadCertificateParameters] + # Parameters supplied to the Upload SSL certificate for an API Management + # service operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CertificateInformation] operation results. + # + def upload_certificate(resource_group_name, service_name, parameters, custom_headers = nil) + response = upload_certificate_async(resource_group_name, service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Upload Custom Domain SSL certificate for an API Management service. This + # operation will be deprecated in future releases. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceUploadCertificateParameters] + # Parameters supplied to the Upload SSL certificate for an API Management + # service 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 upload_certificate_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + upload_certificate_async(resource_group_name, service_name, parameters, custom_headers).value! + end + + # + # Upload Custom Domain SSL certificate for an API Management service. This + # operation will be deprecated in future releases. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceUploadCertificateParameters] + # Parameters supplied to the Upload SSL certificate for an API Management + # service 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 upload_certificate_async(resource_group_name, service_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceUploadCertificateParameters.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.ApiManagement/service/{serviceName}/updatecertificate' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_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 + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::CertificateInformation.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, updates, or deletes the custom hostnames for an API Management + # service. The custom hostname can be applied to the Proxy and Portal endpoint. + # This is a long running operation and could take several minutes to complete. + # This operation will be deprecated in the next version update. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceUpdateHostnameParameters] Parameters + # supplied to the UpdateHostname operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiManagementServiceResource] operation results. + # + def update_hostname(resource_group_name, service_name, parameters, custom_headers = nil) + response = update_hostname_async(resource_group_name, service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceUpdateHostnameParameters] Parameters + # supplied to the UpdateHostname operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def update_hostname_async(resource_group_name, service_name, parameters, custom_headers = nil) + # Send request + promise = begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceResource.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 + + # + # Restores a backup of an API Management service created using the + # ApiManagementService_Backup operation on the current service. This is a long + # running operation and could take several minutes to complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceBackupRestoreParameters] Parameters + # supplied to the Restore API Management service from backup operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiManagementServiceResource] operation results. + # + def begin_restore(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_restore_async(resource_group_name, service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Restores a backup of an API Management service created using the + # ApiManagementService_Backup operation on the current service. This is a long + # running operation and could take several minutes to complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceBackupRestoreParameters] Parameters + # supplied to the Restore API Management service from backup operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_restore_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_restore_async(resource_group_name, service_name, parameters, custom_headers).value! + end + + # + # Restores a backup of an API Management service created using the + # ApiManagementService_Backup operation on the current service. This is a long + # running operation and could take several minutes to complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceBackupRestoreParameters] Parameters + # supplied to the Restore API Management service from backup 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 begin_restore_async(resource_group_name, service_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceBackupRestoreParameters.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.ApiManagement/service/{serviceName}/restore' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_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 + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceResource.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 backup of the API Management service to the given Azure Storage + # Account. This is long running operation and could take several minutes to + # complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceBackupRestoreParameters] Parameters + # supplied to the ApiManagementService_Backup operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiManagementServiceResource] operation results. + # + def begin_backup(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_backup_async(resource_group_name, service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a backup of the API Management service to the given Azure Storage + # Account. This is long running operation and could take several minutes to + # complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceBackupRestoreParameters] Parameters + # supplied to the ApiManagementService_Backup operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_backup_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_backup_async(resource_group_name, service_name, parameters, custom_headers).value! + end + + # + # Creates a backup of the API Management service to the given Azure Storage + # Account. This is long running operation and could take several minutes to + # complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceBackupRestoreParameters] Parameters + # supplied to the ApiManagementService_Backup 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 begin_backup_async(resource_group_name, service_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceBackupRestoreParameters.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.ApiManagement/service/{serviceName}/backup' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_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 + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceResource.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 API Management service. This is long running operation + # and could take several minutes to complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceResource] Parameters supplied to the + # CreateOrUpdate API Management service operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiManagementServiceResource] operation results. + # + def begin_create_or_update(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates an API Management service. This is long running operation + # and could take several minutes to complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceResource] Parameters supplied to the + # CreateOrUpdate API Management service operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, service_name, parameters, custom_headers).value! + end + + # + # Creates or updates an API Management service. This is long running operation + # and could take several minutes to complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceResource] Parameters supplied to the + # CreateOrUpdate API Management service 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 begin_create_or_update_async(resource_group_name, service_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceResource.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.ApiManagement/service/{serviceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_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 || 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceResource.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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceResource.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 == 202 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceResource.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 an existing API Management service. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceUpdateParameters] Parameters supplied + # to the CreateOrUpdate API Management service operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiManagementServiceResource] operation results. + # + def begin_update(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_update_async(resource_group_name, service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates an existing API Management service. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceUpdateParameters] Parameters supplied + # to the CreateOrUpdate API Management service operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_update_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_update_async(resource_group_name, service_name, parameters, custom_headers).value! + end + + # + # Updates an existing API Management service. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceUpdateParameters] Parameters supplied + # to the CreateOrUpdate API Management service 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 begin_update_async(resource_group_name, service_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceUpdateParameters.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.ApiManagement/service/{serviceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceResource.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Updates the Microsoft.ApiManagement resource running in the Virtual network + # to pick the updated network settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceApplyNetworkConfigurationParameters] + # Parameters supplied to the Apply Network Configuration operation. If the + # parameters are empty, all the regions in which the Api Management service is + # deployed will be updated sequentially without incurring downtime in the + # region. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiManagementServiceResource] operation results. + # + def begin_apply_network_configuration_updates(resource_group_name, service_name, parameters = nil, custom_headers = nil) + response = begin_apply_network_configuration_updates_async(resource_group_name, service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates the Microsoft.ApiManagement resource running in the Virtual network + # to pick the updated network settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceApplyNetworkConfigurationParameters] + # Parameters supplied to the Apply Network Configuration operation. If the + # parameters are empty, all the regions in which the Api Management service is + # deployed will be updated sequentially without incurring downtime in the + # region. + # @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_apply_network_configuration_updates_with_http_info(resource_group_name, service_name, parameters = nil, custom_headers = nil) + begin_apply_network_configuration_updates_async(resource_group_name, service_name, parameters, custom_headers).value! + end + + # + # Updates the Microsoft.ApiManagement resource running in the Virtual network + # to pick the updated network settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceApplyNetworkConfigurationParameters] + # Parameters supplied to the Apply Network Configuration operation. If the + # parameters are empty, all the regions in which the Api Management service is + # deployed will be updated sequentially without incurring downtime in the + # region. + # @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_apply_network_configuration_updates_async(resource_group_name, service_name, parameters = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceApplyNetworkConfigurationParameters.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.ApiManagement/service/{serviceName}/applynetworkconfigurationupdates' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_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 == 202 || 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceResource.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, updates, or deletes the custom hostnames for an API Management + # service. The custom hostname can be applied to the Proxy and Portal endpoint. + # This is a long running operation and could take several minutes to complete. + # This operation will be deprecated in the next version update. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceUpdateHostnameParameters] Parameters + # supplied to the UpdateHostname operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiManagementServiceResource] operation results. + # + def begin_update_hostname(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates, updates, or deletes the custom hostnames for an API Management + # service. The custom hostname can be applied to the Proxy and Portal endpoint. + # This is a long running operation and could take several minutes to complete. + # This operation will be deprecated in the next version update. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceUpdateHostnameParameters] Parameters + # supplied to the UpdateHostname operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_update_hostname_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers).value! + end + + # + # Creates, updates, or deletes the custom hostnames for an API Management + # service. The custom hostname can be applied to the Proxy and Portal endpoint. + # This is a long running operation and could take several minutes to complete. + # This operation will be deprecated in the next version update. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [ApiManagementServiceUpdateHostnameParameters] Parameters + # supplied to the UpdateHostname 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 begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceUpdateHostnameParameters.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.ApiManagement/service/{serviceName}/updatehostname' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_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 + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceResource.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 == 202 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceResource.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 + + # + # List all API Management services within 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 [ApiManagementServiceListResult] 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 + + # + # List all API Management services within 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 + + # + # List all API Management services within 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceListResult.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 API Management services within an Azure 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 [ApiManagementServiceListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all API Management services within an Azure 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 + + # + # Lists all API Management services within an Azure 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiManagementServiceListResult.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 + + # + # List all API Management services within a resource group. + # + # @param resource_group_name [String] The name of the resource group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiManagementServiceListResult] 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 + + # + # Lists all API Management services within an Azure subscription. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiManagementServiceListResult] 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 + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_operation.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_operation.rb new file mode 100644 index 0000000000..74e3042aa2 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_operation.rb @@ -0,0 +1,849 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class ApiOperation + include MsRestAzure + + # + # Creates and initializes a new instance of the ApiOperation class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists a collection of the operations for the specified API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | name | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | method | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | urlTemplate | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_api(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_api_as_lazy(resource_group_name, service_name, api_id, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists a collection of the operations for the specified API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | name | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | method | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | urlTemplate | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_api_with_http_info(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_api_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! + end + + # + # Lists a collection of the operations for the specified API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | name | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | method | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | urlTemplate | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_api_async(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::OperationCollection.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 entity state (Etag) version of the API operation specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, api_id, operation_id, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, api_id, operation_id, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the API operation specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service 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_entity_tag_with_http_info(resource_group_name, service_name, api_id, operation_id, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, api_id, operation_id, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the API operation specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service 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_entity_tag_async(resource_group_name, service_name, api_id, operation_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'operation_id is nil' if operation_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'operationId' => operation_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the details of the API Operation specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [OperationContract] operation results. + # + def get(resource_group_name, service_name, api_id, operation_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, api_id, operation_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of the API Operation specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service 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, service_name, api_id, operation_id, custom_headers = nil) + get_async(resource_group_name, service_name, api_id, operation_id, custom_headers).value! + end + + # + # Gets the details of the API Operation specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service 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, service_name, api_id, operation_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'operation_id is nil' if operation_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'operationId' => operation_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::OperationContract.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 operation in the API or updates an existing one. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param parameters [OperationContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [OperationContract] operation results. + # + def create_or_update(resource_group_name, service_name, api_id, operation_id, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a new operation in the API or updates an existing one. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param parameters [OperationContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, api_id, operation_id, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers).value! + end + + # + # Creates a new operation in the API or updates an existing one. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param parameters [OperationContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, api_id, operation_id, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'operation_id is nil' if operation_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::OperationContract.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.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::OperationContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::OperationContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Updates the details of the operation in the API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param parameters [OperationUpdateContract] API Operation Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers).value! + nil + end + + # + # Updates the details of the operation in the API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param parameters [OperationUpdateContract] API Operation Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, api_id, operation_id, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers).value! + end + + # + # Updates the details of the operation in the API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param parameters [OperationUpdateContract] API Operation Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, api_id, operation_id, parameters, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'operation_id is nil' if operation_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::OperationUpdateContract.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.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'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(: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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Deletes the specified operation in the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers).value! + nil + end + + # + # Deletes the specified operation in the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, api_id, operation_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers).value! + end + + # + # Deletes the specified operation in the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, api_id, operation_id, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'operation_id is nil' if operation_id.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'operationId' => operation_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists a collection of the operations for the specified API. + # + # @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 [OperationCollection] operation results. + # + def list_by_api_next(next_page_link, custom_headers = nil) + response = list_by_api_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists a collection of the operations for the specified API. + # + # @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_api_next_with_http_info(next_page_link, custom_headers = nil) + list_by_api_next_async(next_page_link, custom_headers).value! + end + + # + # Lists a collection of the operations for the specified API. + # + # @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_api_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::OperationCollection.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 collection of the operations for the specified API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | name | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | method | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | urlTemplate | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [OperationCollection] which provide lazy access to pages of the + # response. + # + def list_by_api_as_lazy(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_api_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_api_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_operation_policy.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_operation_policy.rb new file mode 100644 index 0000000000..436a071a5e --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_operation_policy.rb @@ -0,0 +1,591 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class ApiOperationPolicy + include MsRestAzure + + # + # Creates and initializes a new instance of the ApiOperationPolicy class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Get the list of policy configuration at the API Operation level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicyCollection] operation results. + # + def list_by_operation(resource_group_name, service_name, api_id, operation_id, custom_headers = nil) + response = list_by_operation_async(resource_group_name, service_name, api_id, operation_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the list of policy configuration at the API Operation level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service 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_operation_with_http_info(resource_group_name, service_name, api_id, operation_id, custom_headers = nil) + list_by_operation_async(resource_group_name, service_name, api_id, operation_id, custom_headers).value! + end + + # + # Get the list of policy configuration at the API Operation level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service 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_operation_async(resource_group_name, service_name, api_id, operation_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'operation_id is nil' if operation_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'operationId' => operation_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PolicyCollection.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 entity state (Etag) version of the API operation policy specified by + # its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, api_id, operation_id, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, api_id, operation_id, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the API operation policy specified by + # its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service 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_entity_tag_with_http_info(resource_group_name, service_name, api_id, operation_id, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, api_id, operation_id, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the API operation policy specified by + # its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service 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_entity_tag_async(resource_group_name, service_name, api_id, operation_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'operation_id is nil' if operation_id.nil? + policy_id = 'policy' + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'operationId' => operation_id,'policyId' => policy_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Get the policy configuration at the API Operation level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicyContract] operation results. + # + def get(resource_group_name, service_name, api_id, operation_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, api_id, operation_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the policy configuration at the API Operation level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service 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, service_name, api_id, operation_id, custom_headers = nil) + get_async(resource_group_name, service_name, api_id, operation_id, custom_headers).value! + end + + # + # Get the policy configuration at the API Operation level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service 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, service_name, api_id, operation_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'operation_id is nil' if operation_id.nil? + policy_id = 'policy' + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'operationId' => operation_id,'policyId' => policy_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PolicyContract.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 policy configuration for the API Operation level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param parameters [PolicyContract] The policy contents to apply. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicyContract] operation results. + # + def create_or_update(resource_group_name, service_name, api_id, operation_id, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates policy configuration for the API Operation level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param parameters [PolicyContract] The policy contents to apply. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, api_id, operation_id, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers).value! + end + + # + # Creates or updates policy configuration for the API Operation level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param parameters [PolicyContract] The policy contents to apply. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, api_id, operation_id, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'operation_id is nil' if operation_id.nil? + policy_id = 'policy' + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::PolicyContract.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.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'operationId' => operation_id,'policyId' => policy_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PolicyContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PolicyContract.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 policy configuration at the Api Operation. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers).value! + nil + end + + # + # Deletes the policy configuration at the Api Operation. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, api_id, operation_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, api_id, operation_id, if_match, custom_headers).value! + end + + # + # Deletes the policy configuration at the Api Operation. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, api_id, operation_id, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'operation_id is nil' if operation_id.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + policy_id = 'policy' + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'operationId' => operation_id,'policyId' => policy_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_policy.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_policy.rb new file mode 100644 index 0000000000..d9981104e8 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_policy.rb @@ -0,0 +1,556 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class ApiPolicy + include MsRestAzure + + # + # Creates and initializes a new instance of the ApiPolicy class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Get the policy configuration at the API level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicyCollection] operation results. + # + def list_by_api(resource_group_name, service_name, api_id, custom_headers = nil) + response = list_by_api_async(resource_group_name, service_name, api_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the policy configuration at the API level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @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_api_with_http_info(resource_group_name, service_name, api_id, custom_headers = nil) + list_by_api_async(resource_group_name, service_name, api_id, custom_headers).value! + end + + # + # Get the policy configuration at the API level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @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_api_async(resource_group_name, service_name, api_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PolicyCollection.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 entity state (Etag) version of the API policy specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, api_id, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, api_id, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the API policy specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @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_entity_tag_with_http_info(resource_group_name, service_name, api_id, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, api_id, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the API policy specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @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_entity_tag_async(resource_group_name, service_name, api_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + policy_id = 'policy' + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'policyId' => policy_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Get the policy configuration at the API level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicyContract] operation results. + # + def get(resource_group_name, service_name, api_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, api_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the policy configuration at the API level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @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, service_name, api_id, custom_headers = nil) + get_async(resource_group_name, service_name, api_id, custom_headers).value! + end + + # + # Get the policy configuration at the API level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @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, service_name, api_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + policy_id = 'policy' + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'policyId' => policy_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PolicyContract.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 policy configuration for the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param parameters [PolicyContract] The policy contents to apply. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicyContract] operation results. + # + def create_or_update(resource_group_name, service_name, api_id, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates policy configuration for the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param parameters [PolicyContract] The policy contents to apply. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, api_id, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, api_id, parameters, if_match, custom_headers).value! + end + + # + # Creates or updates policy configuration for the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param parameters [PolicyContract] The policy contents to apply. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, api_id, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + policy_id = 'policy' + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::PolicyContract.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.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'policyId' => policy_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PolicyContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PolicyContract.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 policy configuration at the Api. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, api_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, api_id, if_match, custom_headers).value! + nil + end + + # + # Deletes the policy configuration at the Api. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, api_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, api_id, if_match, custom_headers).value! + end + + # + # Deletes the policy configuration at the Api. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, api_id, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + policy_id = 'policy' + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'policyId' => policy_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_product.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_product.rb new file mode 100644 index 0000000000..6c419032d0 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_product.rb @@ -0,0 +1,262 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class ApiProduct + include MsRestAzure + + # + # Creates and initializes a new instance of the ApiProduct class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists all Products, which the API is part of. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_apis(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_apis_as_lazy(resource_group_name, service_name, api_id, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists all Products, which the API is part of. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_apis_with_http_info(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_apis_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! + end + + # + # Lists all Products, which the API is part of. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_apis_async(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ProductCollection.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 Products, which the API is part of. + # + # @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 [ProductCollection] operation results. + # + def list_by_apis_next(next_page_link, custom_headers = nil) + response = list_by_apis_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all Products, which the API is part of. + # + # @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_apis_next_with_http_info(next_page_link, custom_headers = nil) + list_by_apis_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all Products, which the API is part of. + # + # @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_apis_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ProductCollection.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 Products, which the API is part of. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProductCollection] which provide lazy access to pages of the + # response. + # + def list_by_apis_as_lazy(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_apis_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_apis_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_release.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_release.rb new file mode 100644 index 0000000000..dc392377c9 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_release.rb @@ -0,0 +1,837 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class ApiRelease + include MsRestAzure + + # + # Creates and initializes a new instance of the ApiRelease class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists all releases of an API. An API release is created when making an API + # Revision current. Releases are also used to rollback to previous revisions. + # Results will be paged and can be constrained by the $top and $skip + # parameters. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # |notes|ge le eq ne gt lt|substringof contains startswith endswith| + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, service_name, api_id, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists all releases of an API. An API release is created when making an API + # Revision current. Releases are also used to rollback to previous revisions. + # Results will be paged and can be constrained by the $top and $skip + # parameters. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # |notes|ge le eq ne gt lt|substringof contains startswith endswith| + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! + end + + # + # Lists all releases of an API. An API release is created when making an API + # Revision current. Releases are also used to rollback to previous revisions. + # Results will be paged and can be constrained by the $top and $skip + # parameters. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # |notes|ge le eq ne gt lt|substringof contains startswith endswith| + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top,'$skip' => skip}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiReleaseCollection.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 + + # + # Returns the etag of an API release. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param release_id [String] Release identifier within an API. Must be unique + # in the current API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, api_id, release_id, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, api_id, release_id, custom_headers).value! + nil + end + + # + # Returns the etag of an API release. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param release_id [String] Release identifier within an API. Must be unique + # in the current API Management service 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_entity_tag_with_http_info(resource_group_name, service_name, api_id, release_id, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, api_id, release_id, custom_headers).value! + end + + # + # Returns the etag of an API release. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param release_id [String] Release identifier within an API. Must be unique + # in the current API Management service 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_entity_tag_async(resource_group_name, service_name, api_id, release_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'release_id is nil' if release_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'apiId' => api_id,'releaseId' => release_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Returns the details of an API release. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param release_id [String] Release identifier within an API. Must be unique + # in the current API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiReleaseContract] operation results. + # + def get(resource_group_name, service_name, api_id, release_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, api_id, release_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns the details of an API release. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param release_id [String] Release identifier within an API. Must be unique + # in the current API Management service 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, service_name, api_id, release_id, custom_headers = nil) + get_async(resource_group_name, service_name, api_id, release_id, custom_headers).value! + end + + # + # Returns the details of an API release. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param release_id [String] Release identifier within an API. Must be unique + # in the current API Management service 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, service_name, api_id, release_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'release_id is nil' if release_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'apiId' => api_id,'releaseId' => release_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiReleaseContract.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 Release for the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param release_id [String] Release identifier within an API. Must be unique + # in the current API Management service instance. + # @param parameters [ApiReleaseContract] Create parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiReleaseContract] operation results. + # + def create(resource_group_name, service_name, api_id, release_id, parameters, custom_headers = nil) + response = create_async(resource_group_name, service_name, api_id, release_id, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a new Release for the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param release_id [String] Release identifier within an API. Must be unique + # in the current API Management service instance. + # @param parameters [ApiReleaseContract] Create parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def create_with_http_info(resource_group_name, service_name, api_id, release_id, parameters, custom_headers = nil) + create_async(resource_group_name, service_name, api_id, release_id, parameters, custom_headers).value! + end + + # + # Creates a new Release for the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param release_id [String] Release identifier within an API. Must be unique + # in the current API Management service instance. + # @param parameters [ApiReleaseContract] Create parameters. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_async(resource_group_name, service_name, api_id, release_id, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'release_id is nil' if release_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiReleaseContract.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.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'apiId' => api_id,'releaseId' => release_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiReleaseContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiReleaseContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Updates the details of the release of the API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param release_id [String] Release identifier within an API. Must be unique + # in the current API Management service instance. + # @param parameters [ApiReleaseContract] API Release Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, api_id, release_id, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, api_id, release_id, parameters, if_match, custom_headers).value! + nil + end + + # + # Updates the details of the release of the API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param release_id [String] Release identifier within an API. Must be unique + # in the current API Management service instance. + # @param parameters [ApiReleaseContract] API Release Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, api_id, release_id, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, api_id, release_id, parameters, if_match, custom_headers).value! + end + + # + # Updates the details of the release of the API specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param release_id [String] Release identifier within an API. Must be unique + # in the current API Management service instance. + # @param parameters [ApiReleaseContract] API Release Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, api_id, release_id, parameters, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'release_id is nil' if release_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiReleaseContract.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.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'apiId' => api_id,'releaseId' => release_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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Deletes the specified release in the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param release_id [String] Release identifier within an API. Must be unique + # in the current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, api_id, release_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, api_id, release_id, if_match, custom_headers).value! + nil + end + + # + # Deletes the specified release in the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param release_id [String] Release identifier within an API. Must be unique + # in the current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, api_id, release_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, api_id, release_id, if_match, custom_headers).value! + end + + # + # Deletes the specified release in the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param release_id [String] Release identifier within an API. Must be unique + # in the current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, api_id, release_id, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'release_id is nil' if release_id.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'apiId' => api_id,'releaseId' => release_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists all releases of an API. An API release is created when making an API + # Revision current. Releases are also used to rollback to previous revisions. + # Results will be paged and can be constrained by the $top and $skip + # parameters. + # + # @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 [ApiReleaseCollection] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all releases of an API. An API release is created when making an API + # Revision current. Releases are also used to rollback to previous revisions. + # Results will be paged and can be constrained by the $top and $skip + # parameters. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all releases of an API. An API release is created when making an API + # Revision current. Releases are also used to rollback to previous revisions. + # Results will be paged and can be constrained by the $top and $skip + # parameters. + # + # @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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiReleaseCollection.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 releases of an API. An API release is created when making an API + # Revision current. Releases are also used to rollback to previous revisions. + # Results will be paged and can be constrained by the $top and $skip + # parameters. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # |notes|ge le eq ne gt lt|substringof contains startswith endswith| + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiReleaseCollection] which provide lazy access to pages of the + # response. + # + def list_as_lazy(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_revisions.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_revisions.rb new file mode 100644 index 0000000000..9c8ca64c9c --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_revisions.rb @@ -0,0 +1,270 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class ApiRevisions + include MsRestAzure + + # + # Creates and initializes a new instance of the ApiRevisions class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists all revisions of an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # + # |apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith| + # + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, service_name, api_id, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists all revisions of an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # + # |apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith| + # + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! + end + + # + # Lists all revisions of an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # + # |apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith| + # + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'apiId' => api_id}, + query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top,'$skip' => skip}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiRevisionCollection.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 revisions of an API. + # + # @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 [ApiRevisionCollection] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all revisions of an API. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all revisions of an API. + # + # @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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiRevisionCollection.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 revisions of an API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # + # |apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith| + # + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiRevisionCollection] which provide lazy access to pages of the + # response. + # + def list_as_lazy(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_schema.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_schema.rb new file mode 100644 index 0000000000..6001b3737b --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_schema.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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class ApiSchema + include MsRestAzure + + # + # Creates and initializes a new instance of the ApiSchema class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Get the schema configuration at the API level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @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_api(resource_group_name, service_name, api_id, custom_headers = nil) + first_page = list_by_api_as_lazy(resource_group_name, service_name, api_id, custom_headers) + first_page.get_all_items + end + + # + # Get the schema configuration at the API level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @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_api_with_http_info(resource_group_name, service_name, api_id, custom_headers = nil) + list_by_api_async(resource_group_name, service_name, api_id, custom_headers).value! + end + + # + # Get the schema configuration at the API level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @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_api_async(resource_group_name, service_name, api_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::SchemaCollection.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 entity state (Etag) version of the schema specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param schema_id [String] Schema identifier within an API. Must be unique in + # the current API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, api_id, schema_id, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, api_id, schema_id, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the schema specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param schema_id [String] Schema identifier within an API. Must be unique in + # the current API Management service 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_entity_tag_with_http_info(resource_group_name, service_name, api_id, schema_id, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, api_id, schema_id, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the schema specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param schema_id [String] Schema identifier within an API. Must be unique in + # the current API Management service 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_entity_tag_async(resource_group_name, service_name, api_id, schema_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'schema_id is nil' if schema_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'schemaId' => schema_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Get the schema configuration at the API level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param schema_id [String] Schema identifier within an API. Must be unique in + # the current API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SchemaContract] operation results. + # + def get(resource_group_name, service_name, api_id, schema_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, api_id, schema_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the schema configuration at the API level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param schema_id [String] Schema identifier within an API. Must be unique in + # the current API Management service 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, service_name, api_id, schema_id, custom_headers = nil) + get_async(resource_group_name, service_name, api_id, schema_id, custom_headers).value! + end + + # + # Get the schema configuration at the API level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param schema_id [String] Schema identifier within an API. Must be unique in + # the current API Management service 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, service_name, api_id, schema_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'schema_id is nil' if schema_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'schemaId' => schema_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::SchemaContract.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 schema configuration for the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param schema_id [String] Schema identifier within an API. Must be unique in + # the current API Management service instance. + # @param parameters [SchemaContract] The schema contents to apply. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SchemaContract] operation results. + # + def create_or_update(resource_group_name, service_name, api_id, schema_id, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, api_id, schema_id, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates schema configuration for the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param schema_id [String] Schema identifier within an API. Must be unique in + # the current API Management service instance. + # @param parameters [SchemaContract] The schema contents to apply. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, api_id, schema_id, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, api_id, schema_id, parameters, if_match, custom_headers).value! + end + + # + # Creates or updates schema configuration for the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param schema_id [String] Schema identifier within an API. Must be unique in + # the current API Management service instance. + # @param parameters [SchemaContract] The schema contents to apply. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, api_id, schema_id, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'schema_id is nil' if schema_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::SchemaContract.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.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'schemaId' => schema_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::SchemaContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::SchemaContract.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 schema configuration at the Api. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param schema_id [String] Schema identifier within an API. Must be unique in + # the current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, api_id, schema_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, api_id, schema_id, if_match, custom_headers).value! + nil + end + + # + # Deletes the schema configuration at the Api. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param schema_id [String] Schema identifier within an API. Must be unique in + # the current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, api_id, schema_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, api_id, schema_id, if_match, custom_headers).value! + end + + # + # Deletes the schema configuration at the Api. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param schema_id [String] Schema identifier within an API. Must be unique in + # the current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, api_id, schema_id, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'schema_id is nil' if schema_id.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'schemaId' => schema_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Get the schema configuration at the API level. + # + # @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 [SchemaCollection] operation results. + # + def list_by_api_next(next_page_link, custom_headers = nil) + response = list_by_api_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the schema configuration at the API level. + # + # @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_api_next_with_http_info(next_page_link, custom_headers = nil) + list_by_api_next_async(next_page_link, custom_headers).value! + end + + # + # Get the schema configuration at the API level. + # + # @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_api_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::SchemaCollection.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 + + # + # Get the schema configuration at the API level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SchemaCollection] which provide lazy access to pages of the + # response. + # + def list_by_api_as_lazy(resource_group_name, service_name, api_id, custom_headers = nil) + response = list_by_api_async(resource_group_name, service_name, api_id, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_api_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_version_set.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_version_set.rb new file mode 100644 index 0000000000..1bc514a2c9 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_version_set.rb @@ -0,0 +1,826 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class ApiVersionSet + include MsRestAzure + + # + # Creates and initializes a new instance of the ApiVersionSet class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists a collection of API Version Sets in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | + # Supported functions | + # |------------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | firstName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | lastName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | email | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | state | eq | N/A + # | + # | registrationDate | ge, le, eq, ne, gt, lt | N/A + # | + # | note | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists a collection of API Version Sets in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | + # Supported functions | + # |------------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | firstName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | lastName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | email | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | state | eq | N/A + # | + # | registrationDate | ge, le, eq, ne, gt, lt | N/A + # | + # | note | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + end + + # + # Lists a collection of API Version Sets in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | + # Supported functions | + # |------------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | firstName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | lastName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | email | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | state | eq | N/A + # | + # | registrationDate | ge, le, eq, ne, gt, lt | N/A + # | + # | note | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/api-version-sets' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top,'$skip' => skip}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiVersionSetCollection.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 entity state (Etag) version of the Api Version Set specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param version_set_id [String] Api Version Set identifier. Must be unique in + # the current API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, version_set_id, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, version_set_id, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the Api Version Set specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param version_set_id [String] Api Version Set identifier. Must be unique in + # the current API Management service 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_entity_tag_with_http_info(resource_group_name, service_name, version_set_id, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, version_set_id, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the Api Version Set specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param version_set_id [String] Api Version Set identifier. Must be unique in + # the current API Management service 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_entity_tag_async(resource_group_name, service_name, version_set_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'version_set_id is nil' if version_set_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/api-version-sets/{versionSetId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'versionSetId' => version_set_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the details of the Api Version Set specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param version_set_id [String] Api Version Set identifier. Must be unique in + # the current API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiVersionSetContract] operation results. + # + def get(resource_group_name, service_name, version_set_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, version_set_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of the Api Version Set specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param version_set_id [String] Api Version Set identifier. Must be unique in + # the current API Management service 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, service_name, version_set_id, custom_headers = nil) + get_async(resource_group_name, service_name, version_set_id, custom_headers).value! + end + + # + # Gets the details of the Api Version Set specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param version_set_id [String] Api Version Set identifier. Must be unique in + # the current API Management service 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, service_name, version_set_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'version_set_id is nil' if version_set_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/api-version-sets/{versionSetId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'versionSetId' => version_set_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiVersionSetContract.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 Api Version Set. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param version_set_id [String] Api Version Set identifier. Must be unique in + # the current API Management service instance. + # @param parameters [ApiVersionSetContract] Create or update parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiVersionSetContract] operation results. + # + def create_or_update(resource_group_name, service_name, version_set_id, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, version_set_id, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or Updates a Api Version Set. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param version_set_id [String] Api Version Set identifier. Must be unique in + # the current API Management service instance. + # @param parameters [ApiVersionSetContract] Create or update parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, version_set_id, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, version_set_id, parameters, if_match, custom_headers).value! + end + + # + # Creates or Updates a Api Version Set. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param version_set_id [String] Api Version Set identifier. Must be unique in + # the current API Management service instance. + # @param parameters [ApiVersionSetContract] Create or update parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, version_set_id, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'version_set_id is nil' if version_set_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiVersionSetContract.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.ApiManagement/service/{serviceName}/api-version-sets/{versionSetId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'versionSetId' => version_set_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiVersionSetContract.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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiVersionSetContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Updates the details of the Api VersionSet specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param version_set_id [String] Api Version Set identifier. Must be unique in + # the current API Management service instance. + # @param parameters [ApiVersionSetUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, version_set_id, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, version_set_id, parameters, if_match, custom_headers).value! + nil + end + + # + # Updates the details of the Api VersionSet specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param version_set_id [String] Api Version Set identifier. Must be unique in + # the current API Management service instance. + # @param parameters [ApiVersionSetUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, version_set_id, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, version_set_id, parameters, if_match, custom_headers).value! + end + + # + # Updates the details of the Api VersionSet specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param version_set_id [String] Api Version Set identifier. Must be unique in + # the current API Management service instance. + # @param parameters [ApiVersionSetUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, version_set_id, parameters, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'version_set_id is nil' if version_set_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiVersionSetUpdateParameters.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.ApiManagement/service/{serviceName}/api-version-sets/{versionSetId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'versionSetId' => version_set_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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Deletes specific Api Version Set. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param version_set_id [String] Api Version Set identifier. Must be unique in + # the current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, version_set_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, version_set_id, if_match, custom_headers).value! + nil + end + + # + # Deletes specific Api Version Set. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param version_set_id [String] Api Version Set identifier. Must be unique in + # the current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, version_set_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, version_set_id, if_match, custom_headers).value! + end + + # + # Deletes specific Api Version Set. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param version_set_id [String] Api Version Set identifier. Must be unique in + # the current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, version_set_id, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'version_set_id is nil' if version_set_id.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/api-version-sets/{versionSetId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'versionSetId' => version_set_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists a collection of API Version Sets in the specified service instance. + # + # @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 [ApiVersionSetCollection] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists a collection of API Version Sets in the specified service instance. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists a collection of API Version Sets in the specified service instance. + # + # @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_service_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiVersionSetCollection.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 collection of API Version Sets in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | + # Supported functions | + # |------------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | firstName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | lastName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | email | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | state | eq | N/A + # | + # | registrationDate | ge, le, eq, ne, gt, lt | N/A + # | + # | note | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiVersionSetCollection] which provide lazy access to pages of the + # response. + # + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/authorization_server.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/authorization_server.rb new file mode 100644 index 0000000000..26e7654e88 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/authorization_server.rb @@ -0,0 +1,781 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class AuthorizationServer + include MsRestAzure + + # + # Creates and initializes a new instance of the AuthorizationServer class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists a collection of authorization servers defined within a service + # instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists a collection of authorization servers defined within a service + # instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + end + + # + # Lists a collection of authorization servers defined within a service + # instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01_preview::Models::AuthorizationServerCollection.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 entity state (Etag) version of the authorizationServer specified by + # its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param authsid [String] Identifier of the authorization server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, authsid, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, authsid, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the authorizationServer specified by + # its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param authsid [String] Identifier of the authorization 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_entity_tag_with_http_info(resource_group_name, service_name, authsid, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, authsid, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the authorizationServer specified by + # its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param authsid [String] Identifier of the authorization 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_entity_tag_async(resource_group_name, service_name, authsid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'authsid is nil' if authsid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'authsid' => authsid,'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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the details of the authorization server specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param authsid [String] Identifier of the authorization server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AuthorizationServerContract] operation results. + # + def get(resource_group_name, service_name, authsid, custom_headers = nil) + response = get_async(resource_group_name, service_name, authsid, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of the authorization server specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param authsid [String] Identifier of the authorization 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, service_name, authsid, custom_headers = nil) + get_async(resource_group_name, service_name, authsid, custom_headers).value! + end + + # + # Gets the details of the authorization server specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param authsid [String] Identifier of the authorization 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, service_name, authsid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'authsid is nil' if authsid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'authsid' => authsid,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::AuthorizationServerContract.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 new authorization server or updates an existing authorization server. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param authsid [String] Identifier of the authorization server. + # @param parameters [AuthorizationServerContract] Create or update parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AuthorizationServerContract] operation results. + # + def create_or_update(resource_group_name, service_name, authsid, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, authsid, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates new authorization server or updates an existing authorization server. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param authsid [String] Identifier of the authorization server. + # @param parameters [AuthorizationServerContract] Create or update parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, authsid, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, authsid, parameters, if_match, custom_headers).value! + end + + # + # Creates new authorization server or updates an existing authorization server. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param authsid [String] Identifier of the authorization server. + # @param parameters [AuthorizationServerContract] Create or update parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, authsid, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'authsid is nil' if authsid.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::AuthorizationServerContract.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.ApiManagement/service/{serviceName}/authorizationServers/{authsid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'authsid' => authsid,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::AuthorizationServerContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::AuthorizationServerContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Updates the details of the authorization server specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param authsid [String] Identifier of the authorization server. + # @param parameters [AuthorizationServerUpdateContract] OAuth2 Server settings + # Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, authsid, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, authsid, parameters, if_match, custom_headers).value! + nil + end + + # + # Updates the details of the authorization server specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param authsid [String] Identifier of the authorization server. + # @param parameters [AuthorizationServerUpdateContract] OAuth2 Server settings + # Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, authsid, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, authsid, parameters, if_match, custom_headers).value! + end + + # + # Updates the details of the authorization server specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param authsid [String] Identifier of the authorization server. + # @param parameters [AuthorizationServerUpdateContract] OAuth2 Server settings + # Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, authsid, parameters, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'authsid is nil' if authsid.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::AuthorizationServerUpdateContract.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.ApiManagement/service/{serviceName}/authorizationServers/{authsid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'authsid' => authsid,'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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Deletes specific authorization server instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param authsid [String] Identifier of the authorization server. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, authsid, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, authsid, if_match, custom_headers).value! + nil + end + + # + # Deletes specific authorization server instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param authsid [String] Identifier of the authorization server. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, authsid, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, authsid, if_match, custom_headers).value! + end + + # + # Deletes specific authorization server instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param authsid [String] Identifier of the authorization server. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, authsid, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'authsid is nil' if authsid.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'authsid' => authsid,'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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists a collection of authorization servers defined within a service + # instance. + # + # @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 [AuthorizationServerCollection] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists a collection of authorization servers defined within a service + # instance. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists a collection of authorization servers defined within a service + # instance. + # + # @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_service_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::AuthorizationServerCollection.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 collection of authorization servers defined within a service + # instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AuthorizationServerCollection] which provide lazy access to pages of + # the response. + # + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/backend.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/backend.rb new file mode 100644 index 0000000000..5356ae50bf --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/backend.rb @@ -0,0 +1,888 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class Backend + include MsRestAzure + + # + # Creates and initializes a new instance of the Backend class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists a collection of backends in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | host | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists a collection of backends in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | host | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + end + + # + # Lists a collection of backends in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | host | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::BackendCollection.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 entity state (Etag) version of the backend specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param backendid [String] Identifier of the Backend entity. Must be unique in + # the current API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, backendid, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, backendid, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the backend specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param backendid [String] Identifier of the Backend entity. Must be unique in + # the current API Management service 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_entity_tag_with_http_info(resource_group_name, service_name, backendid, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, backendid, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the backend specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param backendid [String] Identifier of the Backend entity. Must be unique in + # the current API Management service 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_entity_tag_async(resource_group_name, service_name, backendid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'backendid is nil' if backendid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'backendid' => backendid,'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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the details of the backend specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param backendid [String] Identifier of the Backend entity. Must be unique in + # the current API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackendContract] operation results. + # + def get(resource_group_name, service_name, backendid, custom_headers = nil) + response = get_async(resource_group_name, service_name, backendid, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of the backend specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param backendid [String] Identifier of the Backend entity. Must be unique in + # the current API Management service 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, service_name, backendid, custom_headers = nil) + get_async(resource_group_name, service_name, backendid, custom_headers).value! + end + + # + # Gets the details of the backend specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param backendid [String] Identifier of the Backend entity. Must be unique in + # the current API Management service 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, service_name, backendid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'backendid is nil' if backendid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'backendid' => backendid,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::BackendContract.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 backend. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param backendid [String] Identifier of the Backend entity. Must be unique in + # the current API Management service instance. + # @param parameters [BackendContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackendContract] operation results. + # + def create_or_update(resource_group_name, service_name, backendid, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, backendid, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or Updates a backend. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param backendid [String] Identifier of the Backend entity. Must be unique in + # the current API Management service instance. + # @param parameters [BackendContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, backendid, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, backendid, parameters, if_match, custom_headers).value! + end + + # + # Creates or Updates a backend. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param backendid [String] Identifier of the Backend entity. Must be unique in + # the current API Management service instance. + # @param parameters [BackendContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, backendid, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'backendid is nil' if backendid.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::BackendContract.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.ApiManagement/service/{serviceName}/backends/{backendid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'backendid' => backendid,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::BackendContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::BackendContract.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 an existing backend. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param backendid [String] Identifier of the Backend entity. Must be unique in + # the current API Management service instance. + # @param parameters [BackendUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, backendid, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, backendid, parameters, if_match, custom_headers).value! + nil + end + + # + # Updates an existing backend. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param backendid [String] Identifier of the Backend entity. Must be unique in + # the current API Management service instance. + # @param parameters [BackendUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, backendid, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, backendid, parameters, if_match, custom_headers).value! + end + + # + # Updates an existing backend. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param backendid [String] Identifier of the Backend entity. Must be unique in + # the current API Management service instance. + # @param parameters [BackendUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, backendid, parameters, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'backendid is nil' if backendid.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::BackendUpdateParameters.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.ApiManagement/service/{serviceName}/backends/{backendid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'backendid' => backendid,'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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Deletes the specified backend. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param backendid [String] Identifier of the Backend entity. Must be unique in + # the current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, backendid, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, backendid, if_match, custom_headers).value! + nil + end + + # + # Deletes the specified backend. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param backendid [String] Identifier of the Backend entity. Must be unique in + # the current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, backendid, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, backendid, if_match, custom_headers).value! + end + + # + # Deletes the specified backend. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param backendid [String] Identifier of the Backend entity. Must be unique in + # the current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, backendid, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'backendid is nil' if backendid.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'backendid' => backendid,'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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Notifies the APIM proxy to create a new connection to the backend after the + # specified timeout. If no timeout was specified, timeout of 2 minutes is used. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param backendid [String] Identifier of the Backend entity. Must be unique in + # the current API Management service instance. + # @param parameters [BackendReconnectContract] Reconnect request parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def reconnect(resource_group_name, service_name, backendid, parameters = nil, custom_headers = nil) + response = reconnect_async(resource_group_name, service_name, backendid, parameters, custom_headers).value! + nil + end + + # + # Notifies the APIM proxy to create a new connection to the backend after the + # specified timeout. If no timeout was specified, timeout of 2 minutes is used. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param backendid [String] Identifier of the Backend entity. Must be unique in + # the current API Management service instance. + # @param parameters [BackendReconnectContract] Reconnect request parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def reconnect_with_http_info(resource_group_name, service_name, backendid, parameters = nil, custom_headers = nil) + reconnect_async(resource_group_name, service_name, backendid, parameters, custom_headers).value! + end + + # + # Notifies the APIM proxy to create a new connection to the backend after the + # specified timeout. If no timeout was specified, timeout of 2 minutes is used. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param backendid [String] Identifier of the Backend entity. Must be unique in + # the current API Management service instance. + # @param parameters [BackendReconnectContract] Reconnect request parameters. + # @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 reconnect_async(resource_group_name, service_name, backendid, parameters = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'backendid is nil' if backendid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::BackendReconnectContract.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.ApiManagement/service/{serviceName}/backends/{backendid}/reconnect' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'backendid' => backendid,'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 == 202 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists a collection of backends in the specified service instance. + # + # @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 [BackendCollection] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists a collection of backends in the specified service instance. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists a collection of backends in the specified service instance. + # + # @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_service_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::BackendCollection.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 collection of backends in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | host | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackendCollection] which provide lazy access to pages of the + # response. + # + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/certificate.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/certificate.rb new file mode 100644 index 0000000000..531d830697 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/certificate.rb @@ -0,0 +1,697 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class Certificate + include MsRestAzure + + # + # Creates and initializes a new instance of the Certificate class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists a collection of all certificates in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |----------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | subject | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | thumbprint | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | expirationDate | ge, le, eq, ne, gt, lt | N/A + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists a collection of all certificates in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |----------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | subject | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | thumbprint | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | expirationDate | ge, le, eq, ne, gt, lt | N/A + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + end + + # + # Lists a collection of all certificates in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |----------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | subject | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | thumbprint | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | expirationDate | ge, le, eq, ne, gt, lt | N/A + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::CertificateCollection.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 entity state (Etag) version of the certificate specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param certificate_id [String] Identifier of the certificate entity. Must be + # unique in the current API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, certificate_id, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, certificate_id, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the certificate specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param certificate_id [String] Identifier of the certificate entity. Must be + # unique in the current API Management service 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_entity_tag_with_http_info(resource_group_name, service_name, certificate_id, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, certificate_id, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the certificate specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param certificate_id [String] Identifier of the certificate entity. Must be + # unique in the current API Management service 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_entity_tag_async(resource_group_name, service_name, certificate_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'certificate_id is nil' if certificate_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'certificateId' => certificate_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the details of the certificate specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param certificate_id [String] Identifier of the certificate entity. Must be + # unique in the current API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CertificateContract] operation results. + # + def get(resource_group_name, service_name, certificate_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, certificate_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of the certificate specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param certificate_id [String] Identifier of the certificate entity. Must be + # unique in the current API Management service 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, service_name, certificate_id, custom_headers = nil) + get_async(resource_group_name, service_name, certificate_id, custom_headers).value! + end + + # + # Gets the details of the certificate specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param certificate_id [String] Identifier of the certificate entity. Must be + # unique in the current API Management service 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, service_name, certificate_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'certificate_id is nil' if certificate_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'certificateId' => certificate_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::CertificateContract.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 certificate being used for authentication with the + # backend. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param certificate_id [String] Identifier of the certificate entity. Must be + # unique in the current API Management service instance. + # @param parameters [CertificateCreateOrUpdateParameters] Create or Update + # parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CertificateContract] operation results. + # + def create_or_update(resource_group_name, service_name, certificate_id, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, certificate_id, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates the certificate being used for authentication with the + # backend. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param certificate_id [String] Identifier of the certificate entity. Must be + # unique in the current API Management service instance. + # @param parameters [CertificateCreateOrUpdateParameters] Create or Update + # parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, certificate_id, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, certificate_id, parameters, if_match, custom_headers).value! + end + + # + # Creates or updates the certificate being used for authentication with the + # backend. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param certificate_id [String] Identifier of the certificate entity. Must be + # unique in the current API Management service instance. + # @param parameters [CertificateCreateOrUpdateParameters] Create or Update + # parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, certificate_id, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'certificate_id is nil' if certificate_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::CertificateCreateOrUpdateParameters.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.ApiManagement/service/{serviceName}/certificates/{certificateId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'certificateId' => certificate_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::CertificateContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::CertificateContract.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 specific certificate. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param certificate_id [String] Identifier of the certificate entity. Must be + # unique in the current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, certificate_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, certificate_id, if_match, custom_headers).value! + nil + end + + # + # Deletes specific certificate. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param certificate_id [String] Identifier of the certificate entity. Must be + # unique in the current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, certificate_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, certificate_id, if_match, custom_headers).value! + end + + # + # Deletes specific certificate. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param certificate_id [String] Identifier of the certificate entity. Must be + # unique in the current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, certificate_id, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'certificate_id is nil' if certificate_id.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'certificateId' => certificate_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists a collection of all certificates in the specified service instance. + # + # @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 [CertificateCollection] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists a collection of all certificates in the specified service instance. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists a collection of all certificates in the specified service instance. + # + # @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_service_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::CertificateCollection.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 collection of all certificates in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |----------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | subject | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | thumbprint | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | expirationDate | ge, le, eq, ne, gt, lt | N/A + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CertificateCollection] which provide lazy access to pages of the + # response. + # + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/delegation_settings.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/delegation_settings.rb new file mode 100644 index 0000000000..f52ecaa252 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/delegation_settings.rb @@ -0,0 +1,404 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class DelegationSettings + include MsRestAzure + + # + # Creates and initializes a new instance of the DelegationSettings class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Gets the entity state (Etag) version of the DelegationSettings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the DelegationSettings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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_entity_tag_with_http_info(resource_group_name, service_name, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the DelegationSettings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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_entity_tag_async(resource_group_name, service_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Get Delegation settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PortalDelegationSettings] operation results. + # + def get(resource_group_name, service_name, custom_headers = nil) + response = get_async(resource_group_name, service_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get Delegation settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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, service_name, custom_headers = nil) + get_async(resource_group_name, service_name, custom_headers).value! + end + + # + # Get Delegation settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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, service_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::PortalDelegationSettings.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 Delegation settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [PortalDelegationSettings] Update Delegation settings. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, parameters, if_match, custom_headers).value! + nil + end + + # + # Update Delegation settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [PortalDelegationSettings] Update Delegation settings. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, parameters, if_match, custom_headers).value! + end + + # + # Update Delegation settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [PortalDelegationSettings] Update Delegation settings. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, parameters, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::PortalDelegationSettings.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.ApiManagement/service/{serviceName}/portalsettings/delegation' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Create or Update Delegation settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [PortalDelegationSettings] Create or update parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PortalDelegationSettings] operation results. + # + def create_or_update(resource_group_name, service_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create or Update Delegation settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [PortalDelegationSettings] Create or update parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def create_or_update_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, parameters, custom_headers).value! + end + + # + # Create or Update Delegation settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [PortalDelegationSettings] Create or update parameters. + # @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, service_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PortalDelegationSettings.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.ApiManagement/service/{serviceName}/portalsettings/delegation' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PortalDelegationSettings.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_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/diagnostic.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/diagnostic.rb new file mode 100644 index 0000000000..a3a15f16c7 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/diagnostic.rb @@ -0,0 +1,774 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class Diagnostic + include MsRestAzure + + # + # Creates and initializes a new instance of the Diagnostic class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists all diagnostics of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists all diagnostics of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + end + + # + # Lists all diagnostics of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top,'$skip' => skip}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::DiagnosticCollection.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 entity state (Etag) version of the Diagnostic specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, diagnostic_id, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, diagnostic_id, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the Diagnostic specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service 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_entity_tag_with_http_info(resource_group_name, service_name, diagnostic_id, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, diagnostic_id, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the Diagnostic specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service 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_entity_tag_async(resource_group_name, service_name, diagnostic_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'diagnostic_id is nil' if diagnostic_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'diagnosticId' => diagnostic_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the details of the Diagnostic specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DiagnosticContract] operation results. + # + def get(resource_group_name, service_name, diagnostic_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, diagnostic_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of the Diagnostic specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service 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, service_name, diagnostic_id, custom_headers = nil) + get_async(resource_group_name, service_name, diagnostic_id, custom_headers).value! + end + + # + # Gets the details of the Diagnostic specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service 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, service_name, diagnostic_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'diagnostic_id is nil' if diagnostic_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'diagnosticId' => diagnostic_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::DiagnosticContract.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 Diagnostic or updates an existing one. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param parameters [DiagnosticContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DiagnosticContract] operation results. + # + def create_or_update(resource_group_name, service_name, diagnostic_id, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, diagnostic_id, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a new Diagnostic or updates an existing one. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param parameters [DiagnosticContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, diagnostic_id, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, diagnostic_id, parameters, if_match, custom_headers).value! + end + + # + # Creates a new Diagnostic or updates an existing one. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param parameters [DiagnosticContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, diagnostic_id, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'diagnostic_id is nil' if diagnostic_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::DiagnosticContract.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.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'diagnosticId' => diagnostic_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::DiagnosticContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::DiagnosticContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Updates the details of the Diagnostic specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param parameters [DiagnosticContract] Diagnostic Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, diagnostic_id, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, diagnostic_id, parameters, if_match, custom_headers).value! + nil + end + + # + # Updates the details of the Diagnostic specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param parameters [DiagnosticContract] Diagnostic Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, diagnostic_id, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, diagnostic_id, parameters, if_match, custom_headers).value! + end + + # + # Updates the details of the Diagnostic specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param parameters [DiagnosticContract] Diagnostic Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, diagnostic_id, parameters, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'diagnostic_id is nil' if diagnostic_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::DiagnosticContract.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.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'diagnosticId' => diagnostic_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(: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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Deletes the specified Diagnostic. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, diagnostic_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, diagnostic_id, if_match, custom_headers).value! + nil + end + + # + # Deletes the specified Diagnostic. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, diagnostic_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, diagnostic_id, if_match, custom_headers).value! + end + + # + # Deletes the specified Diagnostic. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, diagnostic_id, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'diagnostic_id is nil' if diagnostic_id.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'diagnosticId' => diagnostic_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists all diagnostics of the API Management service instance. + # + # @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 [DiagnosticCollection] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all diagnostics of the API Management service instance. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all diagnostics of the API Management service instance. + # + # @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_service_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::DiagnosticCollection.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 diagnostics of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DiagnosticCollection] which provide lazy access to pages of the + # response. + # + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/diagnostic_logger.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/diagnostic_logger.rb new file mode 100644 index 0000000000..1c24a1cec8 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/diagnostic_logger.rb @@ -0,0 +1,577 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class DiagnosticLogger + include MsRestAzure + + # + # Creates and initializes a new instance of the DiagnosticLogger class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists all loggers assosiated with the specified Diagnostic of the API + # Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | type | eq | | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service(resource_group_name, service_name, diagnostic_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, diagnostic_id, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists all loggers assosiated with the specified Diagnostic of the API + # Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | type | eq | | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_service_with_http_info(resource_group_name, service_name, diagnostic_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, diagnostic_id, filter, top, skip, custom_headers).value! + end + + # + # Lists all loggers assosiated with the specified Diagnostic of the API + # Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | type | eq | | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service_async(resource_group_name, service_name, diagnostic_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'diagnostic_id is nil' if diagnostic_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}/loggers' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'diagnosticId' => diagnostic_id}, + query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top,'$skip' => skip}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::LoggerCollection.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 + + # + # Checks that logger entity specified by identifier is associated with the + # diagnostics entity. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Boolean] operation results. + # + def check_entity_exists(resource_group_name, service_name, diagnostic_id, loggerid, custom_headers = nil) + response = check_entity_exists_async(resource_group_name, service_name, diagnostic_id, loggerid, custom_headers).value! + response.body unless response.nil? + end + + # + # Checks that logger entity specified by identifier is associated with the + # diagnostics entity. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service 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 check_entity_exists_with_http_info(resource_group_name, service_name, diagnostic_id, loggerid, custom_headers = nil) + check_entity_exists_async(resource_group_name, service_name, diagnostic_id, loggerid, custom_headers).value! + end + + # + # Checks that logger entity specified by identifier is associated with the + # diagnostics entity. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service 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 check_entity_exists_async(resource_group_name, service_name, diagnostic_id, loggerid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'diagnostic_id is nil' if diagnostic_id.nil? + fail ArgumentError, 'loggerid is nil' if loggerid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}/loggers/{loggerid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'diagnosticId' => diagnostic_id,'loggerid' => loggerid,'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(:head, 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 == 204 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.body = (status_code == 204) + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Attaches a logger to a dignostic. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoggerContract] operation results. + # + def create_or_update(resource_group_name, service_name, diagnostic_id, loggerid, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, diagnostic_id, loggerid, custom_headers).value! + response.body unless response.nil? + end + + # + # Attaches a logger to a dignostic. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service 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 create_or_update_with_http_info(resource_group_name, service_name, diagnostic_id, loggerid, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, diagnostic_id, loggerid, custom_headers).value! + end + + # + # Attaches a logger to a dignostic. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service 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 create_or_update_async(resource_group_name, service_name, diagnostic_id, loggerid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'diagnostic_id is nil' if diagnostic_id.nil? + fail ArgumentError, 'loggerid is nil' if loggerid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}/loggers/{loggerid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'diagnosticId' => diagnostic_id,'loggerid' => loggerid,'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 == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::LoggerContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::LoggerContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes the specified Logger from Diagnostic. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service 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, service_name, diagnostic_id, loggerid, custom_headers = nil) + response = delete_async(resource_group_name, service_name, diagnostic_id, loggerid, custom_headers).value! + nil + end + + # + # Deletes the specified Logger from Diagnostic. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service 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 delete_with_http_info(resource_group_name, service_name, diagnostic_id, loggerid, custom_headers = nil) + delete_async(resource_group_name, service_name, diagnostic_id, loggerid, custom_headers).value! + end + + # + # Deletes the specified Logger from Diagnostic. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service 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 delete_async(resource_group_name, service_name, diagnostic_id, loggerid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'diagnostic_id is nil' if diagnostic_id.nil? + fail ArgumentError, 'loggerid is nil' if loggerid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}/loggers/{loggerid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'diagnosticId' => diagnostic_id,'loggerid' => loggerid,'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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists all loggers assosiated with the specified Diagnostic of the API + # Management service instance. + # + # @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 [LoggerCollection] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all loggers assosiated with the specified Diagnostic of the API + # Management service instance. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all loggers assosiated with the specified Diagnostic of the API + # Management service instance. + # + # @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_service_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::LoggerCollection.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 loggers assosiated with the specified Diagnostic of the API + # Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param diagnostic_id [String] Diagnostic identifier. Must be unique in the + # current API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | + # | type | eq | | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoggerCollection] which provide lazy access to pages of the + # response. + # + def list_by_service_as_lazy(resource_group_name, service_name, diagnostic_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, diagnostic_id, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/email_template.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/email_template.rb new file mode 100644 index 0000000000..16deb6aec6 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/email_template.rb @@ -0,0 +1,873 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class EmailTemplate + include MsRestAzure + + # + # Creates and initializes a new instance of the EmailTemplate class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists a collection of properties defined within a service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service(resource_group_name, service_name, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists a collection of properties defined within a service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_service_with_http_info(resource_group_name, service_name, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, top, skip, custom_headers).value! + end + + # + # Lists a collection of properties defined within a service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service_async(resource_group_name, service_name, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01_preview::Models::EmailTemplateCollection.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 entity state (Etag) version of the email template specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param template_name [TemplateName] Email Template Name Identifier. Possible + # values include: 'applicationApprovedNotificationMessage', + # 'accountClosedDeveloper', + # 'quotaLimitApproachingDeveloperNotificationMessage', + # 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + # 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + # 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + # 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + # 'passwordResetByAdminNotificationMessage', + # 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, template_name, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, template_name, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the email template specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param template_name [TemplateName] Email Template Name Identifier. Possible + # values include: 'applicationApprovedNotificationMessage', + # 'accountClosedDeveloper', + # 'quotaLimitApproachingDeveloperNotificationMessage', + # 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + # 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + # 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + # 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + # 'passwordResetByAdminNotificationMessage', + # 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + # @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_entity_tag_with_http_info(resource_group_name, service_name, template_name, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, template_name, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the email template specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param template_name [TemplateName] Email Template Name Identifier. Possible + # values include: 'applicationApprovedNotificationMessage', + # 'accountClosedDeveloper', + # 'quotaLimitApproachingDeveloperNotificationMessage', + # 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + # 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + # 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + # 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + # 'passwordResetByAdminNotificationMessage', + # 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + # @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_entity_tag_async(resource_group_name, service_name, template_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'template_name is nil' if template_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'templateName' => template_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the details of the email template specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param template_name [TemplateName] Email Template Name Identifier. Possible + # values include: 'applicationApprovedNotificationMessage', + # 'accountClosedDeveloper', + # 'quotaLimitApproachingDeveloperNotificationMessage', + # 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + # 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + # 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + # 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + # 'passwordResetByAdminNotificationMessage', + # 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EmailTemplateContract] operation results. + # + def get(resource_group_name, service_name, template_name, custom_headers = nil) + response = get_async(resource_group_name, service_name, template_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of the email template specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param template_name [TemplateName] Email Template Name Identifier. Possible + # values include: 'applicationApprovedNotificationMessage', + # 'accountClosedDeveloper', + # 'quotaLimitApproachingDeveloperNotificationMessage', + # 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + # 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + # 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + # 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + # 'passwordResetByAdminNotificationMessage', + # 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + # @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, service_name, template_name, custom_headers = nil) + get_async(resource_group_name, service_name, template_name, custom_headers).value! + end + + # + # Gets the details of the email template specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param template_name [TemplateName] Email Template Name Identifier. Possible + # values include: 'applicationApprovedNotificationMessage', + # 'accountClosedDeveloper', + # 'quotaLimitApproachingDeveloperNotificationMessage', + # 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + # 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + # 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + # 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + # 'passwordResetByAdminNotificationMessage', + # 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + # @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, service_name, template_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'template_name is nil' if template_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'templateName' => template_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::EmailTemplateContract.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 an Email Template. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param template_name [TemplateName] Email Template Name Identifier. Possible + # values include: 'applicationApprovedNotificationMessage', + # 'accountClosedDeveloper', + # 'quotaLimitApproachingDeveloperNotificationMessage', + # 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + # 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + # 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + # 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + # 'passwordResetByAdminNotificationMessage', + # 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + # @param parameters [EmailTemplateUpdateParameters] Email Template update + # parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EmailTemplateContract] operation results. + # + def create_or_update(resource_group_name, service_name, template_name, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, template_name, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates an Email Template. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param template_name [TemplateName] Email Template Name Identifier. Possible + # values include: 'applicationApprovedNotificationMessage', + # 'accountClosedDeveloper', + # 'quotaLimitApproachingDeveloperNotificationMessage', + # 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + # 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + # 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + # 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + # 'passwordResetByAdminNotificationMessage', + # 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + # @param parameters [EmailTemplateUpdateParameters] Email Template update + # parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, template_name, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, template_name, parameters, if_match, custom_headers).value! + end + + # + # Updates an Email Template. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param template_name [TemplateName] Email Template Name Identifier. Possible + # values include: 'applicationApprovedNotificationMessage', + # 'accountClosedDeveloper', + # 'quotaLimitApproachingDeveloperNotificationMessage', + # 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + # 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + # 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + # 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + # 'passwordResetByAdminNotificationMessage', + # 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + # @param parameters [EmailTemplateUpdateParameters] Email Template update + # parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, template_name, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'template_name is nil' if template_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::EmailTemplateUpdateParameters.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.ApiManagement/service/{serviceName}/templates/{templateName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'templateName' => template_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::EmailTemplateContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::EmailTemplateContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Updates the specific Email Template. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param template_name [TemplateName] Email Template Name Identifier. Possible + # values include: 'applicationApprovedNotificationMessage', + # 'accountClosedDeveloper', + # 'quotaLimitApproachingDeveloperNotificationMessage', + # 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + # 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + # 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + # 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + # 'passwordResetByAdminNotificationMessage', + # 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + # @param parameters [EmailTemplateUpdateParameters] Update parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, template_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, service_name, template_name, parameters, custom_headers).value! + nil + end + + # + # Updates the specific Email Template. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param template_name [TemplateName] Email Template Name Identifier. Possible + # values include: 'applicationApprovedNotificationMessage', + # 'accountClosedDeveloper', + # 'quotaLimitApproachingDeveloperNotificationMessage', + # 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + # 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + # 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + # 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + # 'passwordResetByAdminNotificationMessage', + # 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + # @param parameters [EmailTemplateUpdateParameters] Update parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def update_with_http_info(resource_group_name, service_name, template_name, parameters, custom_headers = nil) + update_async(resource_group_name, service_name, template_name, parameters, custom_headers).value! + end + + # + # Updates the specific Email Template. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param template_name [TemplateName] Email Template Name Identifier. Possible + # values include: 'applicationApprovedNotificationMessage', + # 'accountClosedDeveloper', + # 'quotaLimitApproachingDeveloperNotificationMessage', + # 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + # 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + # 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + # 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + # 'passwordResetByAdminNotificationMessage', + # 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + # @param parameters [EmailTemplateUpdateParameters] Update parameters. + # @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, service_name, template_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'template_name is nil' if template_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::EmailTemplateUpdateParameters.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.ApiManagement/service/{serviceName}/templates/{templateName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'templateName' => template_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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Reset the Email Template to default template provided by the API Management + # service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param template_name [TemplateName] Email Template Name Identifier. Possible + # values include: 'applicationApprovedNotificationMessage', + # 'accountClosedDeveloper', + # 'quotaLimitApproachingDeveloperNotificationMessage', + # 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + # 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + # 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + # 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + # 'passwordResetByAdminNotificationMessage', + # 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, template_name, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, template_name, if_match, custom_headers).value! + nil + end + + # + # Reset the Email Template to default template provided by the API Management + # service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param template_name [TemplateName] Email Template Name Identifier. Possible + # values include: 'applicationApprovedNotificationMessage', + # 'accountClosedDeveloper', + # 'quotaLimitApproachingDeveloperNotificationMessage', + # 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + # 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + # 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + # 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + # 'passwordResetByAdminNotificationMessage', + # 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, template_name, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, template_name, if_match, custom_headers).value! + end + + # + # Reset the Email Template to default template provided by the API Management + # service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param template_name [TemplateName] Email Template Name Identifier. Possible + # values include: 'applicationApprovedNotificationMessage', + # 'accountClosedDeveloper', + # 'quotaLimitApproachingDeveloperNotificationMessage', + # 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + # 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + # 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + # 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + # 'passwordResetByAdminNotificationMessage', + # 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, template_name, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'template_name is nil' if template_name.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'templateName' => template_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists a collection of properties defined within a service instance. + # + # @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 [EmailTemplateCollection] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists a collection of properties defined within a service instance. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists a collection of properties defined within a service instance. + # + # @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_service_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::EmailTemplateCollection.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 collection of properties defined within a service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EmailTemplateCollection] which provide lazy access to pages of the + # response. + # + def list_by_service_as_lazy(resource_group_name, service_name, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/group.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/group.rb new file mode 100644 index 0000000000..4806ece962 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/group.rb @@ -0,0 +1,801 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class Group + include MsRestAzure + + # + # Creates and initializes a new instance of the Group class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists a collection of groups defined within a service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | type | eq, ne | N/A + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists a collection of groups defined within a service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | type | eq, ne | N/A + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + end + + # + # Lists a collection of groups defined within a service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | type | eq, ne | N/A + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01_preview::Models::GroupCollection.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 entity state (Etag) version of the group specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, group_id, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, group_id, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the group specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service 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_entity_tag_with_http_info(resource_group_name, service_name, group_id, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, group_id, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the group specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service 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_entity_tag_async(resource_group_name, service_name, group_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'group_id is nil' if group_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'groupId' => group_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the details of the group specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [GroupContract] operation results. + # + def get(resource_group_name, service_name, group_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, group_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of the group specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service 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, service_name, group_id, custom_headers = nil) + get_async(resource_group_name, service_name, group_id, custom_headers).value! + end + + # + # Gets the details of the group specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service 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, service_name, group_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'group_id is nil' if group_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'groupId' => group_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::GroupContract.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 group. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param parameters [GroupCreateParameters] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [GroupContract] operation results. + # + def create_or_update(resource_group_name, service_name, group_id, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, group_id, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or Updates a group. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param parameters [GroupCreateParameters] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, group_id, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, group_id, parameters, if_match, custom_headers).value! + end + + # + # Creates or Updates a group. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param parameters [GroupCreateParameters] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, group_id, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'group_id is nil' if group_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::GroupCreateParameters.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.ApiManagement/service/{serviceName}/groups/{groupId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'groupId' => group_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::GroupContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::GroupContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Updates the details of the group specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param parameters [GroupUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, group_id, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, group_id, parameters, if_match, custom_headers).value! + nil + end + + # + # Updates the details of the group specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param parameters [GroupUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, group_id, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, group_id, parameters, if_match, custom_headers).value! + end + + # + # Updates the details of the group specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param parameters [GroupUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, group_id, parameters, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'group_id is nil' if group_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::GroupUpdateParameters.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.ApiManagement/service/{serviceName}/groups/{groupId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'groupId' => group_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(: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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Deletes specific group of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, group_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, group_id, if_match, custom_headers).value! + nil + end + + # + # Deletes specific group of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, group_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, group_id, if_match, custom_headers).value! + end + + # + # Deletes specific group of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, group_id, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'group_id is nil' if group_id.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'groupId' => group_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists a collection of groups defined within a service instance. + # + # @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 [GroupCollection] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists a collection of groups defined within a service instance. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists a collection of groups defined within a service instance. + # + # @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_service_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::GroupCollection.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 collection of groups defined within a service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | type | eq, ne | N/A + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [GroupCollection] which provide lazy access to pages of the response. + # + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/group_user.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/group_user.rb new file mode 100644 index 0000000000..a5f8870e4a --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/group_user.rb @@ -0,0 +1,617 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class GroupUser + include MsRestAzure + + # + # Creates and initializes a new instance of the GroupUser class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists a collection of the members of the group, specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | + # Supported functions | + # |------------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | firstName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | lastName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | email | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | state | eq | N/A + # | + # | registrationDate | ge, le, eq, ne, gt, lt | N/A + # | + # | note | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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(resource_group_name, service_name, group_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, service_name, group_id, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists a collection of the members of the group, specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | + # Supported functions | + # |------------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | firstName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | lastName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | email | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | state | eq | N/A + # | + # | registrationDate | ge, le, eq, ne, gt, lt | N/A + # | + # | note | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, service_name, group_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_async(resource_group_name, service_name, group_id, filter, top, skip, custom_headers).value! + end + + # + # Lists a collection of the members of the group, specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | + # Supported functions | + # |------------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | firstName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | lastName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | email | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | state | eq | N/A + # | + # | registrationDate | ge, le, eq, ne, gt, lt | N/A + # | + # | note | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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(resource_group_name, service_name, group_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'group_id is nil' if group_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'groupId' => group_id,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::UserCollection.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 + + # + # Checks that user entity specified by identifier is associated with the group + # entity. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Boolean] operation results. + # + def check_entity_exists(resource_group_name, service_name, group_id, uid, custom_headers = nil) + response = check_entity_exists_async(resource_group_name, service_name, group_id, uid, custom_headers).value! + response.body unless response.nil? + end + + # + # Checks that user entity specified by identifier is associated with the group + # entity. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param uid [String] User identifier. Must be unique in the current API + # Management service 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 check_entity_exists_with_http_info(resource_group_name, service_name, group_id, uid, custom_headers = nil) + check_entity_exists_async(resource_group_name, service_name, group_id, uid, custom_headers).value! + end + + # + # Checks that user entity specified by identifier is associated with the group + # entity. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param uid [String] User identifier. Must be unique in the current API + # Management service 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 check_entity_exists_async(resource_group_name, service_name, group_id, uid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'group_id is nil' if group_id.nil? + fail ArgumentError, 'uid is nil' if uid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{uid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'groupId' => group_id,'uid' => uid,'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(:head, 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 == 204 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.body = (status_code == 204) + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Adds a user to the specified group. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [UserContract] operation results. + # + def create(resource_group_name, service_name, group_id, uid, custom_headers = nil) + response = create_async(resource_group_name, service_name, group_id, uid, custom_headers).value! + response.body unless response.nil? + end + + # + # Adds a user to the specified group. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param uid [String] User identifier. Must be unique in the current API + # Management service 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 create_with_http_info(resource_group_name, service_name, group_id, uid, custom_headers = nil) + create_async(resource_group_name, service_name, group_id, uid, custom_headers).value! + end + + # + # Adds a user to the specified group. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param uid [String] User identifier. Must be unique in the current API + # Management service 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 create_async(resource_group_name, service_name, group_id, uid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'group_id is nil' if group_id.nil? + fail ArgumentError, 'uid is nil' if uid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{uid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'groupId' => group_id,'uid' => uid,'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 == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::UserContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::UserContract.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 + + # + # Remove existing user from existing group. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param uid [String] User identifier. Must be unique in the current API + # Management service 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, service_name, group_id, uid, custom_headers = nil) + response = delete_async(resource_group_name, service_name, group_id, uid, custom_headers).value! + nil + end + + # + # Remove existing user from existing group. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param uid [String] User identifier. Must be unique in the current API + # Management service 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 delete_with_http_info(resource_group_name, service_name, group_id, uid, custom_headers = nil) + delete_async(resource_group_name, service_name, group_id, uid, custom_headers).value! + end + + # + # Remove existing user from existing group. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param uid [String] User identifier. Must be unique in the current API + # Management service 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 delete_async(resource_group_name, service_name, group_id, uid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'group_id is nil' if group_id.nil? + fail ArgumentError, 'uid is nil' if uid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{uid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'groupId' => group_id,'uid' => uid,'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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists a collection of the members of the group, specified by its identifier. + # + # @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 [UserCollection] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists a collection of the members of the group, specified by its identifier. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Lists a collection of the members of the group, specified by its identifier. + # + # @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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::UserCollection.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 collection of the members of the group, specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | + # Supported functions | + # |------------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | firstName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | lastName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | email | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | state | eq | N/A + # | + # | registrationDate | ge, le, eq, ne, gt, lt | N/A + # | + # | note | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [UserCollection] which provide lazy access to pages of the response. + # + def list_as_lazy(resource_group_name, service_name, group_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_async(resource_group_name, service_name, group_id, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/identity_provider.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/identity_provider.rb new file mode 100644 index 0000000000..506f1540d9 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/identity_provider.rb @@ -0,0 +1,775 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class IdentityProvider + include MsRestAzure + + # + # Creates and initializes a new instance of the IdentityProvider class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists a collection of Identity Provider configured in the specified service + # instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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_service(resource_group_name, service_name, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, custom_headers) + first_page.get_all_items + end + + # + # Lists a collection of Identity Provider configured in the specified service + # instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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_service_with_http_info(resource_group_name, service_name, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, custom_headers).value! + end + + # + # Lists a collection of Identity Provider configured in the specified service + # instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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_service_async(resource_group_name, service_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, 'service_name is nil' if service_name.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.ApiManagement/service/{serviceName}/identityProviders' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serviceName' => service_name}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IdentityProviderList.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 entity state (Etag) version of the identityProvider specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param identity_provider_name [IdentityProviderType] Identity Provider Type + # identifier. Possible values include: 'facebook', 'google', 'microsoft', + # 'twitter', 'aad', 'aadB2C' + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, identity_provider_name, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, identity_provider_name, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the identityProvider specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param identity_provider_name [IdentityProviderType] Identity Provider Type + # identifier. Possible values include: 'facebook', 'google', 'microsoft', + # 'twitter', 'aad', 'aadB2C' + # @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_entity_tag_with_http_info(resource_group_name, service_name, identity_provider_name, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, identity_provider_name, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the identityProvider specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param identity_provider_name [IdentityProviderType] Identity Provider Type + # identifier. Possible values include: 'facebook', 'google', 'microsoft', + # 'twitter', 'aad', 'aadB2C' + # @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_entity_tag_async(resource_group_name, service_name, identity_provider_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, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'identity_provider_name is nil' if identity_provider_name.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.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serviceName' => service_name,'identityProviderName' => identity_provider_name}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the configuration details of the identity Provider configured in + # specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param identity_provider_name [IdentityProviderType] Identity Provider Type + # identifier. Possible values include: 'facebook', 'google', 'microsoft', + # 'twitter', 'aad', 'aadB2C' + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [IdentityProviderContract] operation results. + # + def get(resource_group_name, service_name, identity_provider_name, custom_headers = nil) + response = get_async(resource_group_name, service_name, identity_provider_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the configuration details of the identity Provider configured in + # specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param identity_provider_name [IdentityProviderType] Identity Provider Type + # identifier. Possible values include: 'facebook', 'google', 'microsoft', + # 'twitter', 'aad', 'aadB2C' + # @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, service_name, identity_provider_name, custom_headers = nil) + get_async(resource_group_name, service_name, identity_provider_name, custom_headers).value! + end + + # + # Gets the configuration details of the identity Provider configured in + # specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param identity_provider_name [IdentityProviderType] Identity Provider Type + # identifier. Possible values include: 'facebook', 'google', 'microsoft', + # 'twitter', 'aad', 'aadB2C' + # @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, service_name, identity_provider_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, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'identity_provider_name is nil' if identity_provider_name.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.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serviceName' => service_name,'identityProviderName' => identity_provider_name}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IdentityProviderContract.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 IdentityProvider configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param identity_provider_name [IdentityProviderType] Identity Provider Type + # identifier. Possible values include: 'facebook', 'google', 'microsoft', + # 'twitter', 'aad', 'aadB2C' + # @param parameters [IdentityProviderContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [IdentityProviderContract] operation results. + # + def create_or_update(resource_group_name, service_name, identity_provider_name, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or Updates the IdentityProvider configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param identity_provider_name [IdentityProviderType] Identity Provider Type + # identifier. Possible values include: 'facebook', 'google', 'microsoft', + # 'twitter', 'aad', 'aadB2C' + # @param parameters [IdentityProviderContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, identity_provider_name, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers).value! + end + + # + # Creates or Updates the IdentityProvider configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param identity_provider_name [IdentityProviderType] Identity Provider Type + # identifier. Possible values include: 'facebook', 'google', 'microsoft', + # 'twitter', 'aad', 'aadB2C' + # @param parameters [IdentityProviderContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, identity_provider_name, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'identity_provider_name is nil' if identity_provider_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::IdentityProviderContract.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.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'identityProviderName' => identity_provider_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IdentityProviderContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IdentityProviderContract.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 an existing IdentityProvider configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param identity_provider_name [IdentityProviderType] Identity Provider Type + # identifier. Possible values include: 'facebook', 'google', 'microsoft', + # 'twitter', 'aad', 'aadB2C' + # @param parameters [IdentityProviderUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers).value! + nil + end + + # + # Updates an existing IdentityProvider configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param identity_provider_name [IdentityProviderType] Identity Provider Type + # identifier. Possible values include: 'facebook', 'google', 'microsoft', + # 'twitter', 'aad', 'aadB2C' + # @param parameters [IdentityProviderUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, identity_provider_name, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers).value! + end + + # + # Updates an existing IdentityProvider configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param identity_provider_name [IdentityProviderType] Identity Provider Type + # identifier. Possible values include: 'facebook', 'google', 'microsoft', + # 'twitter', 'aad', 'aadB2C' + # @param parameters [IdentityProviderUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, identity_provider_name, parameters, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'identity_provider_name is nil' if identity_provider_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::IdentityProviderUpdateParameters.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.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'identityProviderName' => identity_provider_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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Deletes the specified identity provider configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param identity_provider_name [IdentityProviderType] Identity Provider Type + # identifier. Possible values include: 'facebook', 'google', 'microsoft', + # 'twitter', 'aad', 'aadB2C' + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, identity_provider_name, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, identity_provider_name, if_match, custom_headers).value! + nil + end + + # + # Deletes the specified identity provider configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param identity_provider_name [IdentityProviderType] Identity Provider Type + # identifier. Possible values include: 'facebook', 'google', 'microsoft', + # 'twitter', 'aad', 'aadB2C' + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, identity_provider_name, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, identity_provider_name, if_match, custom_headers).value! + end + + # + # Deletes the specified identity provider configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param identity_provider_name [IdentityProviderType] Identity Provider Type + # identifier. Possible values include: 'facebook', 'google', 'microsoft', + # 'twitter', 'aad', 'aadB2C' + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, identity_provider_name, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'identity_provider_name is nil' if identity_provider_name.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'identityProviderName' => identity_provider_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists a collection of Identity Provider configured in the specified service + # instance. + # + # @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 [IdentityProviderList] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists a collection of Identity Provider configured in the specified service + # instance. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists a collection of Identity Provider configured in the specified service + # instance. + # + # @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_service_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IdentityProviderList.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 collection of Identity Provider configured in the specified service + # instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [IdentityProviderList] which provide lazy access to pages of the + # response. + # + def list_by_service_as_lazy(resource_group_name, service_name, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/logger.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/logger.rb new file mode 100644 index 0000000000..a7df35bec4 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/logger.rb @@ -0,0 +1,786 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class Logger + include MsRestAzure + + # + # Creates and initializes a new instance of the Logger class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists a collection of loggers in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | type | eq | + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists a collection of loggers in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | type | eq | + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + end + + # + # Lists a collection of loggers in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | type | eq | + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::LoggerCollection.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 entity state (Etag) version of the logger specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, loggerid, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, loggerid, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the logger specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service 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_entity_tag_with_http_info(resource_group_name, service_name, loggerid, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, loggerid, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the logger specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service 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_entity_tag_async(resource_group_name, service_name, loggerid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'loggerid is nil' if loggerid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'loggerid' => loggerid,'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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the details of the logger specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoggerContract] operation results. + # + def get(resource_group_name, service_name, loggerid, custom_headers = nil) + response = get_async(resource_group_name, service_name, loggerid, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of the logger specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service 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, service_name, loggerid, custom_headers = nil) + get_async(resource_group_name, service_name, loggerid, custom_headers).value! + end + + # + # Gets the details of the logger specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service 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, service_name, loggerid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'loggerid is nil' if loggerid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'loggerid' => loggerid,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::LoggerContract.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 logger. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service instance. + # @param parameters [LoggerContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoggerContract] operation results. + # + def create_or_update(resource_group_name, service_name, loggerid, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or Updates a logger. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service instance. + # @param parameters [LoggerContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, loggerid, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers).value! + end + + # + # Creates or Updates a logger. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service instance. + # @param parameters [LoggerContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, loggerid, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'loggerid is nil' if loggerid.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::LoggerContract.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.ApiManagement/service/{serviceName}/loggers/{loggerid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'loggerid' => loggerid,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::LoggerContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::LoggerContract.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 an existing logger. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service instance. + # @param parameters [LoggerUpdateContract] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers).value! + nil + end + + # + # Updates an existing logger. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service instance. + # @param parameters [LoggerUpdateContract] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, loggerid, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, loggerid, parameters, if_match, custom_headers).value! + end + + # + # Updates an existing logger. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service instance. + # @param parameters [LoggerUpdateContract] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, loggerid, parameters, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'loggerid is nil' if loggerid.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::LoggerUpdateContract.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.ApiManagement/service/{serviceName}/loggers/{loggerid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'loggerid' => loggerid,'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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Deletes the specified logger. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, loggerid, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, loggerid, if_match, custom_headers).value! + nil + end + + # + # Deletes the specified logger. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, loggerid, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, loggerid, if_match, custom_headers).value! + end + + # + # Deletes the specified logger. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param loggerid [String] Logger identifier. Must be unique in the API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, loggerid, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'loggerid is nil' if loggerid.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'loggerid' => loggerid,'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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists a collection of loggers in the specified service instance. + # + # @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 [LoggerCollection] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists a collection of loggers in the specified service instance. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists a collection of loggers in the specified service instance. + # + # @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_service_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::LoggerCollection.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 collection of loggers in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | type | eq | + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoggerCollection] which provide lazy access to pages of the + # response. + # + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/access_information_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/access_information_contract.rb new file mode 100644 index 0000000000..81b7b5a5a6 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/access_information_contract.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Tenant access information contract of the API Management service. + # + class AccessInformationContract + + include MsRestAzure + + # @return [String] Identifier. + attr_accessor :id + + # @return [String] Primary access key. + attr_accessor :primary_key + + # @return [String] Secondary access key. + attr_accessor :secondary_key + + # @return [Boolean] Tenant access information of the API Management + # service. + attr_accessor :enabled + + + # + # Mapper for AccessInformationContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AccessInformationContract', + type: { + name: 'Composite', + class_name: 'AccessInformationContract', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + primary_key: { + required: false, + serialized_name: 'primaryKey', + type: { + name: 'String' + } + }, + secondary_key: { + required: false, + serialized_name: 'secondaryKey', + type: { + name: 'String' + } + }, + enabled: { + required: false, + serialized_name: 'enabled', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/access_information_update_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/access_information_update_parameters.rb new file mode 100644 index 0000000000..67a27fd9f6 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/access_information_update_parameters.rb @@ -0,0 +1,46 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Tenant access information update parameters of the API Management + # service. + # + class AccessInformationUpdateParameters + + include MsRestAzure + + # @return [Boolean] Tenant access information of the API Management + # service. + attr_accessor :enabled + + + # + # Mapper for AccessInformationUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AccessInformationUpdateParameters', + type: { + name: 'Composite', + class_name: 'AccessInformationUpdateParameters', + model_properties: { + enabled: { + required: false, + serialized_name: 'enabled', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/additional_location.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/additional_location.rb new file mode 100644 index 0000000000..32877a0f84 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/additional_location.rb @@ -0,0 +1,122 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Description of an additional API Management resource location. + # + class AdditionalLocation + + include MsRestAzure + + # @return [String] The location name of the additional region among Azure + # Data center regions. + attr_accessor :location + + # @return [ApiManagementServiceSkuProperties] SKU properties of the API + # Management service. + attr_accessor :sku + + # @return [Array] Public Static Load Balanced IP addresses of the + # API Management service in the additional location. Available only for + # Basic, Standard and Premium SKU. + attr_accessor :public_ipaddresses + + # @return [Array] Private Static Load Balanced IP addresses of + # the API Management service which is deployed in an Internal Virtual + # Network in a particular additional location. Available only for Basic, + # Standard and Premium SKU. + attr_accessor :private_ipaddresses + + # @return [VirtualNetworkConfiguration] Virtual network configuration for + # the location. + attr_accessor :virtual_network_configuration + + # @return [String] Gateway URL of the API Management service in the + # Region. + attr_accessor :gateway_regional_url + + + # + # Mapper for AdditionalLocation class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AdditionalLocation', + type: { + name: 'Composite', + class_name: 'AdditionalLocation', + model_properties: { + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + sku: { + required: true, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'ApiManagementServiceSkuProperties' + } + }, + public_ipaddresses: { + required: false, + read_only: true, + serialized_name: 'publicIPAddresses', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + private_ipaddresses: { + required: false, + read_only: true, + serialized_name: 'privateIPAddresses', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + virtual_network_configuration: { + required: false, + serialized_name: 'virtualNetworkConfiguration', + type: { + name: 'Composite', + class_name: 'VirtualNetworkConfiguration' + } + }, + gateway_regional_url: { + required: false, + read_only: true, + serialized_name: 'gatewayRegionalUrl', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_collection.rb new file mode 100644 index 0000000000..39dab8210e --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_collection.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Api list representation. + # + class ApiCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Page values. + attr_accessor :value + + # @return [String] Next page link if any. + 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 [ApiCollection] 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 ApiCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiCollection', + type: { + name: 'Composite', + class_name: 'ApiCollection', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ApiContractElementType', + type: { + name: 'Composite', + class_name: 'ApiContract' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_contract.rb new file mode 100644 index 0000000000..4c4c143312 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_contract.rb @@ -0,0 +1,267 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # API details. + # + class ApiContract < Resource + + include MsRestAzure + + # @return [String] Description of the API. May include HTML formatting + # tags. + attr_accessor :description + + # @return [AuthenticationSettingsContract] Collection of authentication + # settings included into this API. + attr_accessor :authentication_settings + + # @return [SubscriptionKeyParameterNamesContract] Protocols over which + # API is made available. + attr_accessor :subscription_key_parameter_names + + # @return [ApiType] Type of API. Possible values include: 'http', 'soap' + attr_accessor :api_type + + # @return [String] Describes the Revision of the Api. If no value is + # provided, default revision 1 is created + attr_accessor :api_revision + + # @return [String] Indicates the Version identifier of the API if the API + # is versioned + attr_accessor :api_version + + # @return [Boolean] Indicates if API revision is current api revision. + attr_accessor :is_current + + # @return [Boolean] Indicates if API revision is accessible via the + # gateway. + attr_accessor :is_online + + # @return [String] Description of the Api Revision. + attr_accessor :api_revision_description + + # @return [String] Description of the Api Version. + attr_accessor :api_version_description + + # @return [String] A resource identifier for the related ApiVersionSet. + attr_accessor :api_version_set_id + + # @return [String] API name. + attr_accessor :display_name + + # @return [String] Absolute URL of the backend service implementing this + # API. + attr_accessor :service_url + + # @return [String] Relative URL uniquely identifying this API and all of + # its resource paths within the API Management service instance. It is + # appended to the API endpoint base URL specified during the service + # instance creation to form a public URL for this API. + attr_accessor :path + + # @return [Array] Describes on which protocols the operations + # in this API can be invoked. + attr_accessor :protocols + + # @return [ApiVersionSetContractDetails] + attr_accessor :api_version_set + + + # + # Mapper for ApiContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiContract', + type: { + name: 'Composite', + class_name: 'ApiContract', + 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', + type: { + name: 'String' + } + }, + authentication_settings: { + required: false, + serialized_name: 'properties.authenticationSettings', + type: { + name: 'Composite', + class_name: 'AuthenticationSettingsContract' + } + }, + subscription_key_parameter_names: { + required: false, + serialized_name: 'properties.subscriptionKeyParameterNames', + type: { + name: 'Composite', + class_name: 'SubscriptionKeyParameterNamesContract' + } + }, + api_type: { + required: false, + serialized_name: 'properties.type', + type: { + name: 'String' + } + }, + api_revision: { + required: false, + serialized_name: 'properties.apiRevision', + constraints: { + MaxLength: 100, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + api_version: { + required: false, + serialized_name: 'properties.apiVersion', + constraints: { + MaxLength: 100 + }, + type: { + name: 'String' + } + }, + is_current: { + required: false, + read_only: true, + serialized_name: 'properties.isCurrent', + type: { + name: 'Boolean' + } + }, + is_online: { + required: false, + read_only: true, + serialized_name: 'properties.isOnline', + type: { + name: 'Boolean' + } + }, + api_revision_description: { + required: false, + serialized_name: 'properties.apiRevisionDescription', + constraints: { + MaxLength: 256 + }, + type: { + name: 'String' + } + }, + api_version_description: { + required: false, + serialized_name: 'properties.apiVersionDescription', + constraints: { + MaxLength: 256 + }, + type: { + name: 'String' + } + }, + api_version_set_id: { + required: false, + serialized_name: 'properties.apiVersionSetId', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + constraints: { + MaxLength: 300, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + service_url: { + required: false, + serialized_name: 'properties.serviceUrl', + constraints: { + MaxLength: 2000, + MinLength: 0 + }, + type: { + name: 'String' + } + }, + path: { + required: true, + serialized_name: 'properties.path', + constraints: { + MaxLength: 400, + MinLength: 0 + }, + type: { + name: 'String' + } + }, + protocols: { + required: false, + serialized_name: 'properties.protocols', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ProtocolElementType', + type: { + name: 'Enum', + module: 'Protocol' + } + } + } + }, + api_version_set: { + required: false, + serialized_name: 'properties.apiVersionSet', + type: { + name: 'Composite', + class_name: 'ApiVersionSetContractDetails' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_contract_properties.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_contract_properties.rb new file mode 100644 index 0000000000..dc33fcaf15 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_contract_properties.rb @@ -0,0 +1,204 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Api Entity Properties + # + class ApiContractProperties < ApiEntityBaseContract + + include MsRestAzure + + # @return [String] API name. + attr_accessor :display_name + + # @return [String] Absolute URL of the backend service implementing this + # API. + attr_accessor :service_url + + # @return [String] Relative URL uniquely identifying this API and all of + # its resource paths within the API Management service instance. It is + # appended to the API endpoint base URL specified during the service + # instance creation to form a public URL for this API. + attr_accessor :path + + # @return [Array] Describes on which protocols the operations + # in this API can be invoked. + attr_accessor :protocols + + # @return [ApiVersionSetContractDetails] + attr_accessor :api_version_set + + + # + # Mapper for ApiContractProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiContractProperties', + type: { + name: 'Composite', + class_name: 'ApiContractProperties', + model_properties: { + description: { + required: false, + serialized_name: 'description', + type: { + name: 'String' + } + }, + authentication_settings: { + required: false, + serialized_name: 'authenticationSettings', + type: { + name: 'Composite', + class_name: 'AuthenticationSettingsContract' + } + }, + subscription_key_parameter_names: { + required: false, + serialized_name: 'subscriptionKeyParameterNames', + type: { + name: 'Composite', + class_name: 'SubscriptionKeyParameterNamesContract' + } + }, + api_type: { + required: false, + serialized_name: 'type', + type: { + name: 'String' + } + }, + api_revision: { + required: false, + serialized_name: 'apiRevision', + constraints: { + MaxLength: 100, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + api_version: { + required: false, + serialized_name: 'apiVersion', + constraints: { + MaxLength: 100 + }, + type: { + name: 'String' + } + }, + is_current: { + required: false, + read_only: true, + serialized_name: 'isCurrent', + type: { + name: 'Boolean' + } + }, + is_online: { + required: false, + read_only: true, + serialized_name: 'isOnline', + type: { + name: 'Boolean' + } + }, + api_revision_description: { + required: false, + serialized_name: 'apiRevisionDescription', + constraints: { + MaxLength: 256 + }, + type: { + name: 'String' + } + }, + api_version_description: { + required: false, + serialized_name: 'apiVersionDescription', + constraints: { + MaxLength: 256 + }, + type: { + name: 'String' + } + }, + api_version_set_id: { + required: false, + serialized_name: 'apiVersionSetId', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'displayName', + constraints: { + MaxLength: 300, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + service_url: { + required: false, + serialized_name: 'serviceUrl', + constraints: { + MaxLength: 2000, + MinLength: 0 + }, + type: { + name: 'String' + } + }, + path: { + required: true, + serialized_name: 'path', + constraints: { + MaxLength: 400, + MinLength: 0 + }, + type: { + name: 'String' + } + }, + protocols: { + required: false, + serialized_name: 'protocols', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ProtocolElementType', + type: { + name: 'Enum', + module: 'Protocol' + } + } + } + }, + api_version_set: { + required: false, + serialized_name: 'apiVersionSet', + type: { + name: 'Composite', + class_name: 'ApiVersionSetContractDetails' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_create_or_update_parameter.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_create_or_update_parameter.rb new file mode 100644 index 0000000000..ed6fde2ea5 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_create_or_update_parameter.rb @@ -0,0 +1,291 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # API Create or Update Parameters. + # + class ApiCreateOrUpdateParameter + + include MsRestAzure + + # @return [String] Description of the API. May include HTML formatting + # tags. + attr_accessor :description + + # @return [AuthenticationSettingsContract] Collection of authentication + # settings included into this API. + attr_accessor :authentication_settings + + # @return [SubscriptionKeyParameterNamesContract] Protocols over which + # API is made available. + attr_accessor :subscription_key_parameter_names + + # @return [ApiType] Type of API. Possible values include: 'http', 'soap' + attr_accessor :api_type + + # @return [String] Describes the Revision of the Api. If no value is + # provided, default revision 1 is created + attr_accessor :api_revision + + # @return [String] Indicates the Version identifier of the API if the API + # is versioned + attr_accessor :api_version + + # @return [Boolean] Indicates if API revision is current api revision. + attr_accessor :is_current + + # @return [Boolean] Indicates if API revision is accessible via the + # gateway. + attr_accessor :is_online + + # @return [String] Description of the Api Revision. + attr_accessor :api_revision_description + + # @return [String] Description of the Api Version. + attr_accessor :api_version_description + + # @return [String] A resource identifier for the related ApiVersionSet. + attr_accessor :api_version_set_id + + # @return [String] API name. + attr_accessor :display_name + + # @return [String] Absolute URL of the backend service implementing this + # API. + attr_accessor :service_url + + # @return [String] Relative URL uniquely identifying this API and all of + # its resource paths within the API Management service instance. It is + # appended to the API endpoint base URL specified during the service + # instance creation to form a public URL for this API. + attr_accessor :path + + # @return [Array] Describes on which protocols the operations + # in this API can be invoked. + attr_accessor :protocols + + # @return [ApiVersionSetContractDetails] + attr_accessor :api_version_set + + # @return [String] Content value when Importing an API. + attr_accessor :content_value + + # @return [ContentFormat] Format of the Content in which the API is + # getting imported. Possible values include: 'wadl-xml', + # 'wadl-link-json', 'swagger-json', 'swagger-link-json', 'wsdl', + # 'wsdl-link' + attr_accessor :content_format + + # @return [ApiCreateOrUpdatePropertiesWsdlSelector] Criteria to limit + # import of WSDL to a subset of the document. + attr_accessor :wsdl_selector + + # @return [SoapApiType] Type of Api to create. + # * `http` creates a SOAP to REST API + # * `soap` creates a SOAP pass-through API. Possible values include: + # 'SoapToRest', 'SoapPassThrough' + attr_accessor :soap_api_type + + + # + # Mapper for ApiCreateOrUpdateParameter class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiCreateOrUpdateParameter', + type: { + name: 'Composite', + class_name: 'ApiCreateOrUpdateParameter', + model_properties: { + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + authentication_settings: { + required: false, + serialized_name: 'properties.authenticationSettings', + type: { + name: 'Composite', + class_name: 'AuthenticationSettingsContract' + } + }, + subscription_key_parameter_names: { + required: false, + serialized_name: 'properties.subscriptionKeyParameterNames', + type: { + name: 'Composite', + class_name: 'SubscriptionKeyParameterNamesContract' + } + }, + api_type: { + required: false, + serialized_name: 'properties.type', + type: { + name: 'String' + } + }, + api_revision: { + required: false, + serialized_name: 'properties.apiRevision', + constraints: { + MaxLength: 100, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + api_version: { + required: false, + serialized_name: 'properties.apiVersion', + constraints: { + MaxLength: 100 + }, + type: { + name: 'String' + } + }, + is_current: { + required: false, + read_only: true, + serialized_name: 'properties.isCurrent', + type: { + name: 'Boolean' + } + }, + is_online: { + required: false, + read_only: true, + serialized_name: 'properties.isOnline', + type: { + name: 'Boolean' + } + }, + api_revision_description: { + required: false, + serialized_name: 'properties.apiRevisionDescription', + constraints: { + MaxLength: 256 + }, + type: { + name: 'String' + } + }, + api_version_description: { + required: false, + serialized_name: 'properties.apiVersionDescription', + constraints: { + MaxLength: 256 + }, + type: { + name: 'String' + } + }, + api_version_set_id: { + required: false, + serialized_name: 'properties.apiVersionSetId', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + constraints: { + MaxLength: 300, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + service_url: { + required: false, + serialized_name: 'properties.serviceUrl', + constraints: { + MaxLength: 2000, + MinLength: 0 + }, + type: { + name: 'String' + } + }, + path: { + required: true, + serialized_name: 'properties.path', + constraints: { + MaxLength: 400, + MinLength: 0 + }, + type: { + name: 'String' + } + }, + protocols: { + required: false, + serialized_name: 'properties.protocols', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ProtocolElementType', + type: { + name: 'Enum', + module: 'Protocol' + } + } + } + }, + api_version_set: { + required: false, + serialized_name: 'properties.apiVersionSet', + type: { + name: 'Composite', + class_name: 'ApiVersionSetContractDetails' + } + }, + content_value: { + required: false, + serialized_name: 'properties.contentValue', + type: { + name: 'String' + } + }, + content_format: { + required: false, + serialized_name: 'properties.contentFormat', + type: { + name: 'String' + } + }, + wsdl_selector: { + required: false, + serialized_name: 'properties.wsdlSelector', + type: { + name: 'Composite', + class_name: 'ApiCreateOrUpdatePropertiesWsdlSelector' + } + }, + soap_api_type: { + required: false, + serialized_name: 'properties.apiType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_create_or_update_properties_wsdl_selector.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_create_or_update_properties_wsdl_selector.rb new file mode 100644 index 0000000000..26321e7492 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_create_or_update_properties_wsdl_selector.rb @@ -0,0 +1,54 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Criteria to limit import of WSDL to a subset of the document. + # + class ApiCreateOrUpdatePropertiesWsdlSelector + + include MsRestAzure + + # @return [String] Name of service to import from WSDL + attr_accessor :wsdl_service_name + + # @return [String] Name of endpoint(port) to import from WSDL + attr_accessor :wsdl_endpoint_name + + + # + # Mapper for ApiCreateOrUpdatePropertiesWsdlSelector class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiCreateOrUpdateProperties_wsdlSelector', + type: { + name: 'Composite', + class_name: 'ApiCreateOrUpdatePropertiesWsdlSelector', + model_properties: { + wsdl_service_name: { + required: false, + serialized_name: 'wsdlServiceName', + type: { + name: 'String' + } + }, + wsdl_endpoint_name: { + required: false, + serialized_name: 'wsdlEndpointName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_entity_base_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_entity_base_contract.rb new file mode 100644 index 0000000000..baf04960ba --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_entity_base_contract.rb @@ -0,0 +1,167 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # API base contract details. + # + class ApiEntityBaseContract + + include MsRestAzure + + # @return [String] Description of the API. May include HTML formatting + # tags. + attr_accessor :description + + # @return [AuthenticationSettingsContract] Collection of authentication + # settings included into this API. + attr_accessor :authentication_settings + + # @return [SubscriptionKeyParameterNamesContract] Protocols over which + # API is made available. + attr_accessor :subscription_key_parameter_names + + # @return [ApiType] Type of API. Possible values include: 'http', 'soap' + attr_accessor :api_type + + # @return [String] Describes the Revision of the Api. If no value is + # provided, default revision 1 is created + attr_accessor :api_revision + + # @return [String] Indicates the Version identifier of the API if the API + # is versioned + attr_accessor :api_version + + # @return [Boolean] Indicates if API revision is current api revision. + attr_accessor :is_current + + # @return [Boolean] Indicates if API revision is accessible via the + # gateway. + attr_accessor :is_online + + # @return [String] Description of the Api Revision. + attr_accessor :api_revision_description + + # @return [String] Description of the Api Version. + attr_accessor :api_version_description + + # @return [String] A resource identifier for the related ApiVersionSet. + attr_accessor :api_version_set_id + + + # + # Mapper for ApiEntityBaseContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiEntityBaseContract', + type: { + name: 'Composite', + class_name: 'ApiEntityBaseContract', + model_properties: { + description: { + required: false, + serialized_name: 'description', + type: { + name: 'String' + } + }, + authentication_settings: { + required: false, + serialized_name: 'authenticationSettings', + type: { + name: 'Composite', + class_name: 'AuthenticationSettingsContract' + } + }, + subscription_key_parameter_names: { + required: false, + serialized_name: 'subscriptionKeyParameterNames', + type: { + name: 'Composite', + class_name: 'SubscriptionKeyParameterNamesContract' + } + }, + api_type: { + required: false, + serialized_name: 'type', + type: { + name: 'String' + } + }, + api_revision: { + required: false, + serialized_name: 'apiRevision', + constraints: { + MaxLength: 100, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + api_version: { + required: false, + serialized_name: 'apiVersion', + constraints: { + MaxLength: 100 + }, + type: { + name: 'String' + } + }, + is_current: { + required: false, + read_only: true, + serialized_name: 'isCurrent', + type: { + name: 'Boolean' + } + }, + is_online: { + required: false, + read_only: true, + serialized_name: 'isOnline', + type: { + name: 'Boolean' + } + }, + api_revision_description: { + required: false, + serialized_name: 'apiRevisionDescription', + constraints: { + MaxLength: 256 + }, + type: { + name: 'String' + } + }, + api_version_description: { + required: false, + serialized_name: 'apiVersionDescription', + constraints: { + MaxLength: 256 + }, + type: { + name: 'String' + } + }, + api_version_set_id: { + required: false, + serialized_name: 'apiVersionSetId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_export_result.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_export_result.rb new file mode 100644 index 0000000000..a4f772fb88 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_export_result.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # API Export result Blob Uri. + # + class ApiExportResult + + include MsRestAzure + + # @return [String] Link to the Storage Blob containing the result of the + # export operation. The Blob Uri is only valid for 5 minutes. + attr_accessor :link + + + # + # Mapper for ApiExportResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiExportResult', + type: { + name: 'Composite', + class_name: 'ApiExportResult', + model_properties: { + link: { + required: false, + serialized_name: 'link', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_apply_network_configuration_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_apply_network_configuration_parameters.rb new file mode 100644 index 0000000000..e8209c4bee --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_apply_network_configuration_parameters.rb @@ -0,0 +1,47 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Parameter supplied to the Apply Network configuration operation. + # + class ApiManagementServiceApplyNetworkConfigurationParameters + + include MsRestAzure + + # @return [String] Location of the Api Management service to update for a + # multi-region service. For a service deployed in a single region, this + # parameter is not required. + attr_accessor :location + + + # + # Mapper for ApiManagementServiceApplyNetworkConfigurationParameters + # class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiManagementServiceApplyNetworkConfigurationParameters', + type: { + name: 'Composite', + class_name: 'ApiManagementServiceApplyNetworkConfigurationParameters', + model_properties: { + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_backup_restore_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_backup_restore_parameters.rb new file mode 100644 index 0000000000..024f2fdf67 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_backup_restore_parameters.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Parameters supplied to the Backup/Restore of an API Management service + # operation. + # + class ApiManagementServiceBackupRestoreParameters + + include MsRestAzure + + # @return [String] Azure Cloud Storage account (used to place/retrieve + # the backup) name. + attr_accessor :storage_account + + # @return [String] Azure Cloud Storage account (used to place/retrieve + # the backup) access key. + attr_accessor :access_key + + # @return [String] Azure Cloud Storage blob container name used to + # place/retrieve the backup. + attr_accessor :container_name + + # @return [String] The name of the backup file to create. + attr_accessor :backup_name + + + # + # Mapper for ApiManagementServiceBackupRestoreParameters class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiManagementServiceBackupRestoreParameters', + type: { + name: 'Composite', + class_name: 'ApiManagementServiceBackupRestoreParameters', + model_properties: { + storage_account: { + required: true, + serialized_name: 'storageAccount', + type: { + name: 'String' + } + }, + access_key: { + required: true, + serialized_name: 'accessKey', + type: { + name: 'String' + } + }, + container_name: { + required: true, + serialized_name: 'containerName', + type: { + name: 'String' + } + }, + backup_name: { + required: true, + serialized_name: 'backupName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_base_properties.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_base_properties.rb new file mode 100644 index 0000000000..bbe0b6279c --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_base_properties.rb @@ -0,0 +1,298 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Base Properties of an API Management service resource description. + # + class ApiManagementServiceBaseProperties + + include MsRestAzure + + # @return [String] Email address from which the notification will be + # sent. + attr_accessor :notification_sender_email + + # @return [String] The current provisioning state of the API Management + # service which can be one of the following: + # Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + attr_accessor :provisioning_state + + # @return [String] The provisioning state of the API Management service, + # which is targeted by the long running operation started on the service. + attr_accessor :target_provisioning_state + + # @return [DateTime] Creation UTC date of the API Management service.The + # date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + # specified by the ISO 8601 standard. + attr_accessor :created_at_utc + + # @return [String] Gateway URL of the API Management service. + attr_accessor :gateway_url + + # @return [String] Gateway URL of the API Management service in the + # Default Region. + attr_accessor :gateway_regional_url + + # @return [String] Publisher portal endpoint Url of the API Management + # service. + attr_accessor :portal_url + + # @return [String] Management API endpoint URL of the API Management + # service. + attr_accessor :management_api_url + + # @return [String] SCM endpoint URL of the API Management service. + attr_accessor :scm_url + + # @return [Array] Custom hostname configuration of + # the API Management service. + attr_accessor :hostname_configurations + + # @return [Array] Public Static Load Balanced IP addresses of the + # API Management service in Primary region. Available only for Basic, + # Standard and Premium SKU. + attr_accessor :public_ipaddresses + + # @return [Array] Private Static Load Balanced IP addresses of + # the API Management service in Primary region which is deployed in an + # Internal Virtual Network. Available only for Basic, Standard and + # Premium SKU. + attr_accessor :private_ipaddresses + + # @return [VirtualNetworkConfiguration] Virtual network configuration of + # the API Management service. + attr_accessor :virtual_network_configuration + + # @return [Array] Additional datacenter locations of + # the API Management service. + attr_accessor :additional_locations + + # @return [Hash{String => String}] Custom properties of the API + # Management service. Setting + # `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` + # will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, + # 1.1 and 1.2). Setting + # `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` + # can be used to disable just TLS 1.1 and setting + # `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` + # can be used to disable TLS 1.0 on an API Management service. + attr_accessor :custom_properties + + # @return [Array] List of Certificates that + # need to be installed in the API Management service. Max supported + # certificates that can be installed is 10. + attr_accessor :certificates + + # @return [VirtualNetworkType] The type of VPN in which API Managemet + # service needs to be configured in. None (Default Value) means the API + # Management service is not part of any Virtual Network, External means + # the API Management deployment is set up inside a Virtual Network having + # an Internet Facing Endpoint, and Internal means that API Management + # deployment is setup inside a Virtual Network having an Intranet Facing + # Endpoint only. Possible values include: 'None', 'External', 'Internal'. + # Default value: 'None' . + attr_accessor :virtual_network_type + + + # + # Mapper for ApiManagementServiceBaseProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiManagementServiceBaseProperties', + type: { + name: 'Composite', + class_name: 'ApiManagementServiceBaseProperties', + model_properties: { + notification_sender_email: { + required: false, + serialized_name: 'notificationSenderEmail', + constraints: { + MaxLength: 100 + }, + type: { + name: 'String' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'provisioningState', + type: { + name: 'String' + } + }, + target_provisioning_state: { + required: false, + read_only: true, + serialized_name: 'targetProvisioningState', + type: { + name: 'String' + } + }, + created_at_utc: { + required: false, + read_only: true, + serialized_name: 'createdAtUtc', + type: { + name: 'DateTime' + } + }, + gateway_url: { + required: false, + read_only: true, + serialized_name: 'gatewayUrl', + type: { + name: 'String' + } + }, + gateway_regional_url: { + required: false, + read_only: true, + serialized_name: 'gatewayRegionalUrl', + type: { + name: 'String' + } + }, + portal_url: { + required: false, + read_only: true, + serialized_name: 'portalUrl', + type: { + name: 'String' + } + }, + management_api_url: { + required: false, + read_only: true, + serialized_name: 'managementApiUrl', + type: { + name: 'String' + } + }, + scm_url: { + required: false, + read_only: true, + serialized_name: 'scmUrl', + type: { + name: 'String' + } + }, + hostname_configurations: { + required: false, + serialized_name: 'hostnameConfigurations', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HostnameConfigurationElementType', + type: { + name: 'Composite', + class_name: 'HostnameConfiguration' + } + } + } + }, + public_ipaddresses: { + required: false, + read_only: true, + serialized_name: 'publicIPAddresses', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + private_ipaddresses: { + required: false, + read_only: true, + serialized_name: 'privateIPAddresses', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + virtual_network_configuration: { + required: false, + serialized_name: 'virtualNetworkConfiguration', + type: { + name: 'Composite', + class_name: 'VirtualNetworkConfiguration' + } + }, + additional_locations: { + required: false, + serialized_name: 'additionalLocations', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AdditionalLocationElementType', + type: { + name: 'Composite', + class_name: 'AdditionalLocation' + } + } + } + }, + custom_properties: { + required: false, + serialized_name: 'customProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + certificates: { + required: false, + serialized_name: 'certificates', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'CertificateConfigurationElementType', + type: { + name: 'Composite', + class_name: 'CertificateConfiguration' + } + } + } + }, + virtual_network_type: { + required: false, + serialized_name: 'virtualNetworkType', + default_value: 'None', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_check_name_availability_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_check_name_availability_parameters.rb new file mode 100644 index 0000000000..fbf31276b1 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_check_name_availability_parameters.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Parameters supplied to the CheckNameAvailability operation. + # + class ApiManagementServiceCheckNameAvailabilityParameters + + include MsRestAzure + + # @return [String] The name to check for availability. + attr_accessor :name + + + # + # Mapper for ApiManagementServiceCheckNameAvailabilityParameters class as + # Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiManagementServiceCheckNameAvailabilityParameters', + type: { + name: 'Composite', + class_name: 'ApiManagementServiceCheckNameAvailabilityParameters', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_get_sso_token_result.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_get_sso_token_result.rb new file mode 100644 index 0000000000..0b28f35f79 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_get_sso_token_result.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # The response of the GetSsoToken operation. + # + class ApiManagementServiceGetSsoTokenResult + + include MsRestAzure + + # @return [String] Redirect URL to the Publisher Portal containing the + # SSO token. + attr_accessor :redirect_uri + + + # + # Mapper for ApiManagementServiceGetSsoTokenResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiManagementServiceGetSsoTokenResult', + type: { + name: 'Composite', + class_name: 'ApiManagementServiceGetSsoTokenResult', + model_properties: { + redirect_uri: { + required: false, + serialized_name: 'redirectUri', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_identity.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_identity.rb new file mode 100644 index 0000000000..af24f4bb2b --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_identity.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Identity properties of the Api Management service resource. + # + class ApiManagementServiceIdentity + + include MsRestAzure + + # @return [String] The identity type. Currently the only supported type + # is 'SystemAssigned'. Default value: 'SystemAssigned' . + attr_accessor :type + + # @return The principal id of the identity. + attr_accessor :principal_id + + # @return The client tenant id of the identity. + attr_accessor :tenant_id + + + # + # Mapper for ApiManagementServiceIdentity class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiManagementServiceIdentity', + type: { + name: 'Composite', + class_name: 'ApiManagementServiceIdentity', + model_properties: { + type: { + required: true, + is_constant: true, + serialized_name: 'type', + default_value: 'SystemAssigned', + type: { + name: 'String' + } + }, + principal_id: { + required: false, + read_only: true, + serialized_name: 'principalId', + type: { + name: 'String' + } + }, + tenant_id: { + required: false, + read_only: true, + serialized_name: 'tenantId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_list_result.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_list_result.rb new file mode 100644 index 0000000000..5963a0b2be --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # The response of the List API Management services operation. + # + class ApiManagementServiceListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Result of the List API + # Management services operation. + attr_accessor :value + + # @return [String] Link to the next set of results. Not empty if Value + # contains incomplete list of API Management services. + 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 [ApiManagementServiceListResult] 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 ApiManagementServiceListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiManagementServiceListResult', + type: { + name: 'Composite', + class_name: 'ApiManagementServiceListResult', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ApiManagementServiceResourceElementType', + type: { + name: 'Composite', + class_name: 'ApiManagementServiceResource' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_name_availability_result.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_name_availability_result.rb new file mode 100644 index 0000000000..3d75a591a0 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_name_availability_result.rb @@ -0,0 +1,77 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Response of the CheckNameAvailability operation. + # + class ApiManagementServiceNameAvailabilityResult + + include MsRestAzure + + # @return [Boolean] True if the name is available and can be used to + # create a new API Management service; otherwise false. + attr_accessor :name_available + + # @return [String] If reason == invalid, provide the user with the reason + # why the given name is invalid, and provide the resource naming + # requirements so that the user can select a valid name. If reason == + # AlreadyExists, explain that is already in use, and + # direct them to select a different name. + attr_accessor :message + + # @return [NameAvailabilityReason] Invalid indicates the name provided + # does not match the resource provider’s naming requirements (incorrect + # length, unsupported characters, etc.) AlreadyExists indicates that the + # name is already in use and is therefore unavailable. Possible values + # include: 'Valid', 'Invalid', 'AlreadyExists' + attr_accessor :reason + + + # + # Mapper for ApiManagementServiceNameAvailabilityResult class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiManagementServiceNameAvailabilityResult', + type: { + name: 'Composite', + class_name: 'ApiManagementServiceNameAvailabilityResult', + model_properties: { + name_available: { + required: false, + read_only: true, + serialized_name: 'nameAvailable', + type: { + name: 'Boolean' + } + }, + message: { + required: false, + read_only: true, + serialized_name: 'message', + type: { + name: 'String' + } + }, + reason: { + required: false, + serialized_name: 'reason', + type: { + name: 'Enum', + module: 'NameAvailabilityReason' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_resource.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_resource.rb new file mode 100644 index 0000000000..9808e7fb3a --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_resource.rb @@ -0,0 +1,407 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # A single API Management service resource in List or Get response. + # + class ApiManagementServiceResource < ApimResource + + include MsRestAzure + + # @return [String] Email address from which the notification will be + # sent. + attr_accessor :notification_sender_email + + # @return [String] The current provisioning state of the API Management + # service which can be one of the following: + # Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + attr_accessor :provisioning_state + + # @return [String] The provisioning state of the API Management service, + # which is targeted by the long running operation started on the service. + attr_accessor :target_provisioning_state + + # @return [DateTime] Creation UTC date of the API Management service.The + # date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + # specified by the ISO 8601 standard. + attr_accessor :created_at_utc + + # @return [String] Gateway URL of the API Management service. + attr_accessor :gateway_url + + # @return [String] Gateway URL of the API Management service in the + # Default Region. + attr_accessor :gateway_regional_url + + # @return [String] Publisher portal endpoint Url of the API Management + # service. + attr_accessor :portal_url + + # @return [String] Management API endpoint URL of the API Management + # service. + attr_accessor :management_api_url + + # @return [String] SCM endpoint URL of the API Management service. + attr_accessor :scm_url + + # @return [Array] Custom hostname configuration of + # the API Management service. + attr_accessor :hostname_configurations + + # @return [Array] Public Static Load Balanced IP addresses of the + # API Management service in Primary region. Available only for Basic, + # Standard and Premium SKU. + attr_accessor :public_ipaddresses + + # @return [Array] Private Static Load Balanced IP addresses of + # the API Management service in Primary region which is deployed in an + # Internal Virtual Network. Available only for Basic, Standard and + # Premium SKU. + attr_accessor :private_ipaddresses + + # @return [VirtualNetworkConfiguration] Virtual network configuration of + # the API Management service. + attr_accessor :virtual_network_configuration + + # @return [Array] Additional datacenter locations of + # the API Management service. + attr_accessor :additional_locations + + # @return [Hash{String => String}] Custom properties of the API + # Management service. Setting + # `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` + # will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, + # 1.1 and 1.2). Setting + # `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` + # can be used to disable just TLS 1.1 and setting + # `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` + # can be used to disable TLS 1.0 on an API Management service. + attr_accessor :custom_properties + + # @return [Array] List of Certificates that + # need to be installed in the API Management service. Max supported + # certificates that can be installed is 10. + attr_accessor :certificates + + # @return [VirtualNetworkType] The type of VPN in which API Managemet + # service needs to be configured in. None (Default Value) means the API + # Management service is not part of any Virtual Network, External means + # the API Management deployment is set up inside a Virtual Network having + # an Internet Facing Endpoint, and Internal means that API Management + # deployment is setup inside a Virtual Network having an Intranet Facing + # Endpoint only. Possible values include: 'None', 'External', 'Internal'. + # Default value: 'None' . + attr_accessor :virtual_network_type + + # @return [String] Publisher email. + attr_accessor :publisher_email + + # @return [String] Publisher name. + attr_accessor :publisher_name + + # @return [ApiManagementServiceSkuProperties] SKU properties of the API + # Management service. + attr_accessor :sku + + # @return [ApiManagementServiceIdentity] Managed service identity of the + # Api Management service. + attr_accessor :identity + + # @return [String] Resource location. + attr_accessor :location + + # @return [String] ETag of the resource. + attr_accessor :etag + + + # + # Mapper for ApiManagementServiceResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiManagementServiceResource', + type: { + name: 'Composite', + class_name: 'ApiManagementServiceResource', + 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' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + notification_sender_email: { + required: false, + serialized_name: 'properties.notificationSenderEmail', + constraints: { + MaxLength: 100 + }, + type: { + name: 'String' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + target_provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.targetProvisioningState', + type: { + name: 'String' + } + }, + created_at_utc: { + required: false, + read_only: true, + serialized_name: 'properties.createdAtUtc', + type: { + name: 'DateTime' + } + }, + gateway_url: { + required: false, + read_only: true, + serialized_name: 'properties.gatewayUrl', + type: { + name: 'String' + } + }, + gateway_regional_url: { + required: false, + read_only: true, + serialized_name: 'properties.gatewayRegionalUrl', + type: { + name: 'String' + } + }, + portal_url: { + required: false, + read_only: true, + serialized_name: 'properties.portalUrl', + type: { + name: 'String' + } + }, + management_api_url: { + required: false, + read_only: true, + serialized_name: 'properties.managementApiUrl', + type: { + name: 'String' + } + }, + scm_url: { + required: false, + read_only: true, + serialized_name: 'properties.scmUrl', + type: { + name: 'String' + } + }, + hostname_configurations: { + required: false, + serialized_name: 'properties.hostnameConfigurations', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HostnameConfigurationElementType', + type: { + name: 'Composite', + class_name: 'HostnameConfiguration' + } + } + } + }, + public_ipaddresses: { + required: false, + read_only: true, + serialized_name: 'properties.publicIPAddresses', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + private_ipaddresses: { + required: false, + read_only: true, + serialized_name: 'properties.privateIPAddresses', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + virtual_network_configuration: { + required: false, + serialized_name: 'properties.virtualNetworkConfiguration', + type: { + name: 'Composite', + class_name: 'VirtualNetworkConfiguration' + } + }, + additional_locations: { + required: false, + serialized_name: 'properties.additionalLocations', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AdditionalLocationElementType', + type: { + name: 'Composite', + class_name: 'AdditionalLocation' + } + } + } + }, + custom_properties: { + required: false, + serialized_name: 'properties.customProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + certificates: { + required: false, + serialized_name: 'properties.certificates', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'CertificateConfigurationElementType', + type: { + name: 'Composite', + class_name: 'CertificateConfiguration' + } + } + } + }, + virtual_network_type: { + required: false, + serialized_name: 'properties.virtualNetworkType', + default_value: 'None', + type: { + name: 'String' + } + }, + publisher_email: { + required: true, + serialized_name: 'properties.publisherEmail', + constraints: { + MaxLength: 100 + }, + type: { + name: 'String' + } + }, + publisher_name: { + required: true, + serialized_name: 'properties.publisherName', + constraints: { + MaxLength: 100 + }, + type: { + name: 'String' + } + }, + sku: { + required: true, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'ApiManagementServiceSkuProperties' + } + }, + identity: { + required: false, + serialized_name: 'identity', + type: { + name: 'Composite', + class_name: 'ApiManagementServiceIdentity' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + etag: { + required: false, + read_only: true, + serialized_name: 'etag', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_sku_properties.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_sku_properties.rb new file mode 100644 index 0000000000..fbb0daa058 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_sku_properties.rb @@ -0,0 +1,57 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # API Management service resource SKU properties. + # + class ApiManagementServiceSkuProperties + + include MsRestAzure + + # @return [SkuType] Name of the Sku. Possible values include: + # 'Developer', 'Standard', 'Premium', 'Basic' + attr_accessor :name + + # @return [Integer] Capacity of the SKU (number of deployed units of the + # SKU). The default value is 1. Default value: 1 . + attr_accessor :capacity + + + # + # Mapper for ApiManagementServiceSkuProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiManagementServiceSkuProperties', + type: { + name: 'Composite', + class_name: 'ApiManagementServiceSkuProperties', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + capacity: { + required: false, + serialized_name: 'capacity', + default_value: 1, + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_update_hostname_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_update_hostname_parameters.rb new file mode 100644 index 0000000000..67dd045c94 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_update_hostname_parameters.rb @@ -0,0 +1,72 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Parameters supplied to the UpdateHostname operation. + # + class ApiManagementServiceUpdateHostnameParameters + + include MsRestAzure + + # @return [Array] Hostnames to create or + # update. + attr_accessor :update + + # @return [Array] Hostnames types to delete. + attr_accessor :delete + + + # + # Mapper for ApiManagementServiceUpdateHostnameParameters class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiManagementServiceUpdateHostnameParameters', + type: { + name: 'Composite', + class_name: 'ApiManagementServiceUpdateHostnameParameters', + model_properties: { + update: { + required: false, + serialized_name: 'update', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HostnameConfigurationOldElementType', + type: { + name: 'Composite', + class_name: 'HostnameConfigurationOld' + } + } + } + }, + delete: { + required: false, + serialized_name: 'delete', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HostnameTypeElementType', + type: { + name: 'Enum', + module: 'HostnameType' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_update_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_update_parameters.rb new file mode 100644 index 0000000000..1bd0565464 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_update_parameters.rb @@ -0,0 +1,397 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Parameter supplied to Update Api Management Service. + # + class ApiManagementServiceUpdateParameters < ApimResource + + include MsRestAzure + + # @return [String] Email address from which the notification will be + # sent. + attr_accessor :notification_sender_email + + # @return [String] The current provisioning state of the API Management + # service which can be one of the following: + # Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + attr_accessor :provisioning_state + + # @return [String] The provisioning state of the API Management service, + # which is targeted by the long running operation started on the service. + attr_accessor :target_provisioning_state + + # @return [DateTime] Creation UTC date of the API Management service.The + # date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + # specified by the ISO 8601 standard. + attr_accessor :created_at_utc + + # @return [String] Gateway URL of the API Management service. + attr_accessor :gateway_url + + # @return [String] Gateway URL of the API Management service in the + # Default Region. + attr_accessor :gateway_regional_url + + # @return [String] Publisher portal endpoint Url of the API Management + # service. + attr_accessor :portal_url + + # @return [String] Management API endpoint URL of the API Management + # service. + attr_accessor :management_api_url + + # @return [String] SCM endpoint URL of the API Management service. + attr_accessor :scm_url + + # @return [Array] Custom hostname configuration of + # the API Management service. + attr_accessor :hostname_configurations + + # @return [Array] Public Static Load Balanced IP addresses of the + # API Management service in Primary region. Available only for Basic, + # Standard and Premium SKU. + attr_accessor :public_ipaddresses + + # @return [Array] Private Static Load Balanced IP addresses of + # the API Management service in Primary region which is deployed in an + # Internal Virtual Network. Available only for Basic, Standard and + # Premium SKU. + attr_accessor :private_ipaddresses + + # @return [VirtualNetworkConfiguration] Virtual network configuration of + # the API Management service. + attr_accessor :virtual_network_configuration + + # @return [Array] Additional datacenter locations of + # the API Management service. + attr_accessor :additional_locations + + # @return [Hash{String => String}] Custom properties of the API + # Management service. Setting + # `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` + # will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, + # 1.1 and 1.2). Setting + # `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` + # can be used to disable just TLS 1.1 and setting + # `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` + # can be used to disable TLS 1.0 on an API Management service. + attr_accessor :custom_properties + + # @return [Array] List of Certificates that + # need to be installed in the API Management service. Max supported + # certificates that can be installed is 10. + attr_accessor :certificates + + # @return [VirtualNetworkType] The type of VPN in which API Managemet + # service needs to be configured in. None (Default Value) means the API + # Management service is not part of any Virtual Network, External means + # the API Management deployment is set up inside a Virtual Network having + # an Internet Facing Endpoint, and Internal means that API Management + # deployment is setup inside a Virtual Network having an Intranet Facing + # Endpoint only. Possible values include: 'None', 'External', 'Internal'. + # Default value: 'None' . + attr_accessor :virtual_network_type + + # @return [String] Publisher email. + attr_accessor :publisher_email + + # @return [String] Publisher name. + attr_accessor :publisher_name + + # @return [ApiManagementServiceSkuProperties] SKU properties of the API + # Management service. + attr_accessor :sku + + # @return [ApiManagementServiceIdentity] Managed service identity of the + # Api Management service. + attr_accessor :identity + + # @return [String] ETag of the resource. + attr_accessor :etag + + + # + # Mapper for ApiManagementServiceUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiManagementServiceUpdateParameters', + type: { + name: 'Composite', + class_name: 'ApiManagementServiceUpdateParameters', + 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' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + notification_sender_email: { + required: false, + serialized_name: 'properties.notificationSenderEmail', + constraints: { + MaxLength: 100 + }, + type: { + name: 'String' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + target_provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.targetProvisioningState', + type: { + name: 'String' + } + }, + created_at_utc: { + required: false, + read_only: true, + serialized_name: 'properties.createdAtUtc', + type: { + name: 'DateTime' + } + }, + gateway_url: { + required: false, + read_only: true, + serialized_name: 'properties.gatewayUrl', + type: { + name: 'String' + } + }, + gateway_regional_url: { + required: false, + read_only: true, + serialized_name: 'properties.gatewayRegionalUrl', + type: { + name: 'String' + } + }, + portal_url: { + required: false, + read_only: true, + serialized_name: 'properties.portalUrl', + type: { + name: 'String' + } + }, + management_api_url: { + required: false, + read_only: true, + serialized_name: 'properties.managementApiUrl', + type: { + name: 'String' + } + }, + scm_url: { + required: false, + read_only: true, + serialized_name: 'properties.scmUrl', + type: { + name: 'String' + } + }, + hostname_configurations: { + required: false, + serialized_name: 'properties.hostnameConfigurations', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HostnameConfigurationElementType', + type: { + name: 'Composite', + class_name: 'HostnameConfiguration' + } + } + } + }, + public_ipaddresses: { + required: false, + read_only: true, + serialized_name: 'properties.publicIPAddresses', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + private_ipaddresses: { + required: false, + read_only: true, + serialized_name: 'properties.privateIPAddresses', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + virtual_network_configuration: { + required: false, + serialized_name: 'properties.virtualNetworkConfiguration', + type: { + name: 'Composite', + class_name: 'VirtualNetworkConfiguration' + } + }, + additional_locations: { + required: false, + serialized_name: 'properties.additionalLocations', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AdditionalLocationElementType', + type: { + name: 'Composite', + class_name: 'AdditionalLocation' + } + } + } + }, + custom_properties: { + required: false, + serialized_name: 'properties.customProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + certificates: { + required: false, + serialized_name: 'properties.certificates', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'CertificateConfigurationElementType', + type: { + name: 'Composite', + class_name: 'CertificateConfiguration' + } + } + } + }, + virtual_network_type: { + required: false, + serialized_name: 'properties.virtualNetworkType', + default_value: 'None', + type: { + name: 'String' + } + }, + publisher_email: { + required: false, + serialized_name: 'properties.publisherEmail', + constraints: { + MaxLength: 100 + }, + type: { + name: 'String' + } + }, + publisher_name: { + required: false, + serialized_name: 'properties.publisherName', + constraints: { + MaxLength: 100 + }, + type: { + name: 'String' + } + }, + sku: { + required: false, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'ApiManagementServiceSkuProperties' + } + }, + identity: { + required: false, + serialized_name: 'identity', + type: { + name: 'Composite', + class_name: 'ApiManagementServiceIdentity' + } + }, + etag: { + required: false, + read_only: true, + serialized_name: 'etag', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_upload_certificate_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_upload_certificate_parameters.rb new file mode 100644 index 0000000000..85fdf22017 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_upload_certificate_parameters.rb @@ -0,0 +1,68 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Parameters supplied to the Upload SSL certificate for an API Management + # service operation. + # + class ApiManagementServiceUploadCertificateParameters + + include MsRestAzure + + # @return [HostnameType] Hostname type. Possible values include: 'Proxy', + # 'Portal', 'Management', 'Scm' + attr_accessor :type + + # @return [String] Base64 Encoded certificate. + attr_accessor :certificate + + # @return [String] Certificate password. + attr_accessor :certificate_password + + + # + # Mapper for ApiManagementServiceUploadCertificateParameters class as + # Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiManagementServiceUploadCertificateParameters', + type: { + name: 'Composite', + class_name: 'ApiManagementServiceUploadCertificateParameters', + model_properties: { + type: { + required: true, + serialized_name: 'type', + type: { + name: 'Enum', + module: 'HostnameType' + } + }, + certificate: { + required: true, + serialized_name: 'certificate', + type: { + name: 'String' + } + }, + certificate_password: { + required: true, + serialized_name: 'certificate_password', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_release_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_release_collection.rb new file mode 100644 index 0000000000..2e83dd4007 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_release_collection.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Api Revision list representation. + # + class ApiReleaseCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Page values. + attr_accessor :value + + # @return [String] Next page link if any. + 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 [ApiReleaseCollection] 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 ApiReleaseCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiReleaseCollection', + type: { + name: 'Composite', + class_name: 'ApiReleaseCollection', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ApiReleaseContractElementType', + type: { + name: 'Composite', + class_name: 'ApiReleaseContract' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_release_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_release_contract.rb new file mode 100644 index 0000000000..a9a810cc75 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_release_contract.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Api Release details. + # + class ApiReleaseContract < Resource + + include MsRestAzure + + # @return [String] Identifier of the API the release belongs to. + attr_accessor :api_id + + # @return [DateTime] The time the API was released. The date conforms to + # the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 + # standard. + attr_accessor :created_date_time + + # @return [DateTime] The time the API release was updated. + attr_accessor :updated_date_time + + # @return [String] Release Notes + attr_accessor :notes + + + # + # Mapper for ApiReleaseContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiReleaseContract', + type: { + name: 'Composite', + class_name: 'ApiReleaseContract', + 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' + } + }, + api_id: { + required: false, + serialized_name: 'properties.apiId', + type: { + name: 'String' + } + }, + created_date_time: { + required: false, + read_only: true, + serialized_name: 'properties.createdDateTime', + type: { + name: 'DateTime' + } + }, + updated_date_time: { + required: false, + read_only: true, + serialized_name: 'properties.updatedDateTime', + type: { + name: 'DateTime' + } + }, + notes: { + required: false, + serialized_name: 'properties.notes', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_revision_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_revision_collection.rb new file mode 100644 index 0000000000..617f4ac53d --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_revision_collection.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Api Revision list representation. + # + class ApiRevisionCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Page values. + attr_accessor :value + + # @return [String] Next page link if any. + 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 [ApiRevisionCollection] 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 ApiRevisionCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiRevisionCollection', + type: { + name: 'Composite', + class_name: 'ApiRevisionCollection', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ApiRevisionContractElementType', + type: { + name: 'Composite', + class_name: 'ApiRevisionContract' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_revision_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_revision_contract.rb new file mode 100644 index 0000000000..aa2f1b1671 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_revision_contract.rb @@ -0,0 +1,136 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Summary of revision metadata. + # + class ApiRevisionContract + + include MsRestAzure + + # @return [String] Identifier of the API Revision. + attr_accessor :api_id + + # @return [String] Revision number of API. + attr_accessor :api_revision + + # @return [DateTime] The time the API Revision was created. The date + # conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by + # the ISO 8601 standard. + attr_accessor :created_date_time + + # @return [DateTime] The time the API Revision were updated. The date + # conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by + # the ISO 8601 standard. + attr_accessor :updated_date_time + + # @return [String] Description of the API Revision. + attr_accessor :description + + # @return [String] Gateway URL for accessing the non-current API + # Revision. + attr_accessor :private_url + + # @return [Boolean] Indicates if API revision is the current api + # revision. + attr_accessor :is_online + + # @return [Boolean] Indicates if API revision is accessible via the + # gateway. + attr_accessor :is_current + + + # + # Mapper for ApiRevisionContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiRevisionContract', + type: { + name: 'Composite', + class_name: 'ApiRevisionContract', + model_properties: { + api_id: { + required: false, + read_only: true, + serialized_name: 'apiId', + type: { + name: 'String' + } + }, + api_revision: { + required: false, + read_only: true, + serialized_name: 'apiRevision', + constraints: { + MaxLength: 100, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + created_date_time: { + required: false, + read_only: true, + serialized_name: 'createdDateTime', + type: { + name: 'DateTime' + } + }, + updated_date_time: { + required: false, + read_only: true, + serialized_name: 'updatedDateTime', + type: { + name: 'DateTime' + } + }, + description: { + required: false, + read_only: true, + serialized_name: 'description', + constraints: { + MaxLength: 256 + }, + type: { + name: 'String' + } + }, + private_url: { + required: false, + read_only: true, + serialized_name: 'privateUrl', + type: { + name: 'String' + } + }, + is_online: { + required: false, + read_only: true, + serialized_name: 'isOnline', + type: { + name: 'Boolean' + } + }, + is_current: { + required: false, + read_only: true, + serialized_name: 'isCurrent', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_revision_info_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_revision_info_contract.rb new file mode 100644 index 0000000000..6065475ade --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_revision_info_contract.rb @@ -0,0 +1,83 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Object used to create an API Revision or Version based on an existing API + # Revision + # + class ApiRevisionInfoContract + + include MsRestAzure + + # @return [String] Resource identifier of API to be used to create the + # revision from. + attr_accessor :source_api_id + + # @return [String] Version identifier for the new API Version. + attr_accessor :api_version_name + + # @return [String] Description of new API Revision. + attr_accessor :api_revision_description + + # @return [ApiVersionSetContractDetails] Version set details + attr_accessor :api_version_set + + + # + # Mapper for ApiRevisionInfoContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiRevisionInfoContract', + type: { + name: 'Composite', + class_name: 'ApiRevisionInfoContract', + model_properties: { + source_api_id: { + required: false, + serialized_name: 'sourceApiId', + type: { + name: 'String' + } + }, + api_version_name: { + required: false, + serialized_name: 'apiVersionName', + constraints: { + MaxLength: 100 + }, + type: { + name: 'String' + } + }, + api_revision_description: { + required: false, + serialized_name: 'apiRevisionDescription', + constraints: { + MaxLength: 256 + }, + type: { + name: 'String' + } + }, + api_version_set: { + required: false, + serialized_name: 'apiVersionSet', + type: { + name: 'Composite', + class_name: 'ApiVersionSetContractDetails' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_tag_resource_contract_properties.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_tag_resource_contract_properties.rb new file mode 100644 index 0000000000..80ac44b324 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_tag_resource_contract_properties.rb @@ -0,0 +1,203 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # API contract properties for the Tag Resources. + # + class ApiTagResourceContractProperties < ApiEntityBaseContract + + include MsRestAzure + + # @return [String] API identifier in the form /apis/{apiId}. + attr_accessor :id + + # @return [String] API name. + attr_accessor :name + + # @return [String] Absolute URL of the backend service implementing this + # API. + attr_accessor :service_url + + # @return [String] Relative URL uniquely identifying this API and all of + # its resource paths within the API Management service instance. It is + # appended to the API endpoint base URL specified during the service + # instance creation to form a public URL for this API. + attr_accessor :path + + # @return [Array] Describes on which protocols the operations + # in this API can be invoked. + attr_accessor :protocols + + + # + # Mapper for ApiTagResourceContractProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiTagResourceContractProperties', + type: { + name: 'Composite', + class_name: 'ApiTagResourceContractProperties', + model_properties: { + description: { + required: false, + serialized_name: 'description', + type: { + name: 'String' + } + }, + authentication_settings: { + required: false, + serialized_name: 'authenticationSettings', + type: { + name: 'Composite', + class_name: 'AuthenticationSettingsContract' + } + }, + subscription_key_parameter_names: { + required: false, + serialized_name: 'subscriptionKeyParameterNames', + type: { + name: 'Composite', + class_name: 'SubscriptionKeyParameterNamesContract' + } + }, + api_type: { + required: false, + serialized_name: 'type', + type: { + name: 'String' + } + }, + api_revision: { + required: false, + serialized_name: 'apiRevision', + constraints: { + MaxLength: 100, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + api_version: { + required: false, + serialized_name: 'apiVersion', + constraints: { + MaxLength: 100 + }, + type: { + name: 'String' + } + }, + is_current: { + required: false, + read_only: true, + serialized_name: 'isCurrent', + type: { + name: 'Boolean' + } + }, + is_online: { + required: false, + read_only: true, + serialized_name: 'isOnline', + type: { + name: 'Boolean' + } + }, + api_revision_description: { + required: false, + serialized_name: 'apiRevisionDescription', + constraints: { + MaxLength: 256 + }, + type: { + name: 'String' + } + }, + api_version_description: { + required: false, + serialized_name: 'apiVersionDescription', + constraints: { + MaxLength: 256 + }, + type: { + name: 'String' + } + }, + api_version_set_id: { + required: false, + serialized_name: 'apiVersionSetId', + type: { + name: 'String' + } + }, + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + constraints: { + MaxLength: 300, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + service_url: { + required: false, + serialized_name: 'serviceUrl', + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + path: { + required: false, + serialized_name: 'path', + constraints: { + MaxLength: 400, + MinLength: 0 + }, + type: { + name: 'String' + } + }, + protocols: { + required: false, + serialized_name: 'protocols', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ProtocolElementType', + type: { + name: 'Enum', + module: 'Protocol' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_type.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_type.rb new file mode 100644 index 0000000000..a7cde64218 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for ApiType + # + module ApiType + Http = "http" + Soap = "soap" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_update_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_update_contract.rb new file mode 100644 index 0000000000..e7f8fe43ae --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_update_contract.rb @@ -0,0 +1,232 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # API update contract details. + # + class ApiUpdateContract + + include MsRestAzure + + # @return [String] Description of the API. May include HTML formatting + # tags. + attr_accessor :description + + # @return [AuthenticationSettingsContract] Collection of authentication + # settings included into this API. + attr_accessor :authentication_settings + + # @return [SubscriptionKeyParameterNamesContract] Protocols over which + # API is made available. + attr_accessor :subscription_key_parameter_names + + # @return [ApiType] Type of API. Possible values include: 'http', 'soap' + attr_accessor :api_type + + # @return [String] Describes the Revision of the Api. If no value is + # provided, default revision 1 is created + attr_accessor :api_revision + + # @return [String] Indicates the Version identifier of the API if the API + # is versioned + attr_accessor :api_version + + # @return [Boolean] Indicates if API revision is current api revision. + attr_accessor :is_current + + # @return [Boolean] Indicates if API revision is accessible via the + # gateway. + attr_accessor :is_online + + # @return [String] Description of the Api Revision. + attr_accessor :api_revision_description + + # @return [String] Description of the Api Version. + attr_accessor :api_version_description + + # @return [String] A resource identifier for the related ApiVersionSet. + attr_accessor :api_version_set_id + + # @return [String] API name. + attr_accessor :display_name + + # @return [String] Absolute URL of the backend service implementing this + # API. + attr_accessor :service_url + + # @return [String] Relative URL uniquely identifying this API and all of + # its resource paths within the API Management service instance. It is + # appended to the API endpoint base URL specified during the service + # instance creation to form a public URL for this API. + attr_accessor :path + + # @return [Array] Describes on which protocols the operations + # in this API can be invoked. + attr_accessor :protocols + + + # + # Mapper for ApiUpdateContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiUpdateContract', + type: { + name: 'Composite', + class_name: 'ApiUpdateContract', + model_properties: { + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + authentication_settings: { + required: false, + serialized_name: 'properties.authenticationSettings', + type: { + name: 'Composite', + class_name: 'AuthenticationSettingsContract' + } + }, + subscription_key_parameter_names: { + required: false, + serialized_name: 'properties.subscriptionKeyParameterNames', + type: { + name: 'Composite', + class_name: 'SubscriptionKeyParameterNamesContract' + } + }, + api_type: { + required: false, + serialized_name: 'properties.type', + type: { + name: 'String' + } + }, + api_revision: { + required: false, + serialized_name: 'properties.apiRevision', + constraints: { + MaxLength: 100, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + api_version: { + required: false, + serialized_name: 'properties.apiVersion', + constraints: { + MaxLength: 100 + }, + type: { + name: 'String' + } + }, + is_current: { + required: false, + read_only: true, + serialized_name: 'properties.isCurrent', + type: { + name: 'Boolean' + } + }, + is_online: { + required: false, + read_only: true, + serialized_name: 'properties.isOnline', + type: { + name: 'Boolean' + } + }, + api_revision_description: { + required: false, + serialized_name: 'properties.apiRevisionDescription', + constraints: { + MaxLength: 256 + }, + type: { + name: 'String' + } + }, + api_version_description: { + required: false, + serialized_name: 'properties.apiVersionDescription', + constraints: { + MaxLength: 256 + }, + type: { + name: 'String' + } + }, + api_version_set_id: { + required: false, + serialized_name: 'properties.apiVersionSetId', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + constraints: { + MaxLength: 300, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + service_url: { + required: false, + serialized_name: 'properties.serviceUrl', + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + path: { + required: false, + serialized_name: 'properties.path', + constraints: { + MaxLength: 400, + MinLength: 0 + }, + type: { + name: 'String' + } + }, + protocols: { + required: false, + serialized_name: 'properties.protocols', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ProtocolElementType', + type: { + name: 'Enum', + module: 'Protocol' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_collection.rb new file mode 100644 index 0000000000..33cf492797 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_collection.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Api Version Set list representation. + # + class ApiVersionSetCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Page values. + attr_accessor :value + + # @return [String] Next page link if any. + 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 [ApiVersionSetCollection] 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 ApiVersionSetCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiVersionSetCollection', + type: { + name: 'Composite', + class_name: 'ApiVersionSetCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ApiVersionSetContractElementType', + type: { + name: 'Composite', + class_name: 'ApiVersionSetContract' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_contract.rb new file mode 100644 index 0000000000..13def1d63c --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_contract.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Api Version Set Contract details. + # + class ApiVersionSetContract < Resource + + include MsRestAzure + + # @return [String] Description of API Version Set. + attr_accessor :description + + # @return [String] Name of query parameter that indicates the API Version + # if versioningScheme is set to `query`. + attr_accessor :version_query_name + + # @return [String] Name of HTTP header parameter that indicates the API + # Version if versioningScheme is set to `header`. + attr_accessor :version_header_name + + # @return [String] Name of API Version Set + attr_accessor :display_name + + # @return [VersioningScheme] An value that determines where the API + # Version identifer will be located in a HTTP request. Possible values + # include: 'Segment', 'Query', 'Header' + attr_accessor :versioning_scheme + + + # + # Mapper for ApiVersionSetContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiVersionSetContract', + type: { + name: 'Composite', + class_name: 'ApiVersionSetContract', + 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', + type: { + name: 'String' + } + }, + version_query_name: { + required: false, + serialized_name: 'properties.versionQueryName', + constraints: { + MaxLength: 100, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + version_header_name: { + required: false, + serialized_name: 'properties.versionHeaderName', + constraints: { + MaxLength: 100, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + display_name: { + required: true, + serialized_name: 'properties.displayName', + constraints: { + MaxLength: 100, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + versioning_scheme: { + required: true, + serialized_name: 'properties.versioningScheme', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_contract_details.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_contract_details.rb new file mode 100644 index 0000000000..0a8809ce2b --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_contract_details.rb @@ -0,0 +1,90 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # An API Version Set contains the common configuration for a set of API + # Versions relating + # + class ApiVersionSetContractDetails + + include MsRestAzure + + # @return [String] Identifier for existing API Version Set. Omit this + # value to create a new Version Set. + attr_accessor :id + + # @return [String] Description of API Version Set. + attr_accessor :description + + # @return [Enum] An value that determines where the API Version identifer + # will be located in a HTTP request. Possible values include: 'Segment', + # 'Query', 'Header' + attr_accessor :versioning_scheme + + # @return [String] Name of query parameter that indicates the API Version + # if versioningScheme is set to `query`. + attr_accessor :version_query_name + + # @return [String] Name of HTTP header parameter that indicates the API + # Version if versioningScheme is set to `header`. + attr_accessor :version_header_name + + + # + # Mapper for ApiVersionSetContractDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiVersionSetContractDetails', + type: { + name: 'Composite', + class_name: 'ApiVersionSetContractDetails', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'description', + type: { + name: 'String' + } + }, + versioning_scheme: { + required: false, + serialized_name: 'versioningScheme', + type: { + name: 'String' + } + }, + version_query_name: { + required: false, + serialized_name: 'versionQueryName', + type: { + name: 'String' + } + }, + version_header_name: { + required: false, + serialized_name: 'versionHeaderName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_entity_base.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_entity_base.rb new file mode 100644 index 0000000000..5fe5f8b4bb --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_entity_base.rb @@ -0,0 +1,74 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Api Version set base parameters + # + class ApiVersionSetEntityBase + + include MsRestAzure + + # @return [String] Description of API Version Set. + attr_accessor :description + + # @return [String] Name of query parameter that indicates the API Version + # if versioningScheme is set to `query`. + attr_accessor :version_query_name + + # @return [String] Name of HTTP header parameter that indicates the API + # Version if versioningScheme is set to `header`. + attr_accessor :version_header_name + + + # + # Mapper for ApiVersionSetEntityBase class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiVersionSetEntityBase', + type: { + name: 'Composite', + class_name: 'ApiVersionSetEntityBase', + model_properties: { + description: { + required: false, + serialized_name: 'description', + type: { + name: 'String' + } + }, + version_query_name: { + required: false, + serialized_name: 'versionQueryName', + constraints: { + MaxLength: 100, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + version_header_name: { + required: false, + serialized_name: 'versionHeaderName', + constraints: { + MaxLength: 100, + MinLength: 1 + }, + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_update_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_update_parameters.rb new file mode 100644 index 0000000000..3b3d1f98c3 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_update_parameters.rb @@ -0,0 +1,100 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Parameters to update or create an Api Version Set Contract. + # + class ApiVersionSetUpdateParameters + + include MsRestAzure + + # @return [String] Description of API Version Set. + attr_accessor :description + + # @return [String] Name of query parameter that indicates the API Version + # if versioningScheme is set to `query`. + attr_accessor :version_query_name + + # @return [String] Name of HTTP header parameter that indicates the API + # Version if versioningScheme is set to `header`. + attr_accessor :version_header_name + + # @return [String] Name of API Version Set + attr_accessor :display_name + + # @return [VersioningScheme] An value that determines where the API + # Version identifer will be located in a HTTP request. Possible values + # include: 'Segment', 'Query', 'Header' + attr_accessor :versioning_scheme + + + # + # Mapper for ApiVersionSetUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApiVersionSetUpdateParameters', + type: { + name: 'Composite', + class_name: 'ApiVersionSetUpdateParameters', + model_properties: { + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + version_query_name: { + required: false, + serialized_name: 'properties.versionQueryName', + constraints: { + MaxLength: 100, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + version_header_name: { + required: false, + serialized_name: 'properties.versionHeaderName', + constraints: { + MaxLength: 100, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + constraints: { + MaxLength: 100, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + versioning_scheme: { + required: false, + serialized_name: 'properties.versioningScheme', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/apim_resource.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/apim_resource.rb new file mode 100644 index 0000000000..baffdc7450 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/apim_resource.rb @@ -0,0 +1,85 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # The Resource definition. + # + class ApimResource + + include MsRestAzure + + # @return [String] Resource ID. + attr_accessor :id + + # @return [String] Resource name. + attr_accessor :name + + # @return [String] Resource type for API Management resource is set to + # Microsoft.ApiManagement. + attr_accessor :type + + # @return [Hash{String => String}] Resource tags. + attr_accessor :tags + + + # + # Mapper for ApimResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApimResource', + type: { + name: 'Composite', + class_name: 'ApimResource', + 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' + } + }, + 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_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/async_operation_status.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/async_operation_status.rb new file mode 100644 index 0000000000..2a36e02b79 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/async_operation_status.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for AsyncOperationStatus + # + module AsyncOperationStatus + Started = "Started" + InProgress = "InProgress" + Succeeded = "Succeeded" + Failed = "Failed" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authentication_settings_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authentication_settings_contract.rb new file mode 100644 index 0000000000..61392b4726 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authentication_settings_contract.rb @@ -0,0 +1,71 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # API Authentication Settings. + # + class AuthenticationSettingsContract + + include MsRestAzure + + # @return [OAuth2AuthenticationSettingsContract] OAuth2 Authentication + # settings + attr_accessor :o_auth2 + + # @return [OpenIdAuthenticationSettingsContract] OpenID Connect + # Authentication Settings + attr_accessor :openid + + # @return [Boolean] Specifies whether subscription key is required during + # call to this API, true - API is included into closed products only, + # false - API is included into open products alone, null - there is a mix + # of products. + attr_accessor :subscription_key_required + + + # + # Mapper for AuthenticationSettingsContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AuthenticationSettingsContract', + type: { + name: 'Composite', + class_name: 'AuthenticationSettingsContract', + model_properties: { + o_auth2: { + required: false, + serialized_name: 'oAuth2', + type: { + name: 'Composite', + class_name: 'OAuth2AuthenticationSettingsContract' + } + }, + openid: { + required: false, + serialized_name: 'openid', + type: { + name: 'Composite', + class_name: 'OpenIdAuthenticationSettingsContract' + } + }, + subscription_key_required: { + required: false, + serialized_name: 'subscriptionKeyRequired', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_method.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_method.rb new file mode 100644 index 0000000000..bdc8d6b2e4 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_method.rb @@ -0,0 +1,22 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for AuthorizationMethod + # + module AuthorizationMethod + HEAD = "HEAD" + OPTIONS = "OPTIONS" + TRACE = "TRACE" + GET = "GET" + POST = "POST" + PUT = "PUT" + PATCH = "PATCH" + DELETE = "DELETE" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_collection.rb new file mode 100644 index 0000000000..2a36fea752 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_collection.rb @@ -0,0 +1,104 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged OAuth2 Authorization Servers list representation. + # + class AuthorizationServerCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Page values. + attr_accessor :value + + # @return [Integer] Total record count number across all pages. + attr_accessor :count + + # @return [String] Next page link if any. + 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 [AuthorizationServerCollection] 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 AuthorizationServerCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AuthorizationServerCollection', + type: { + name: 'Composite', + class_name: 'AuthorizationServerCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AuthorizationServerContractElementType', + type: { + name: 'Composite', + class_name: 'AuthorizationServerContract' + } + } + } + }, + count: { + required: false, + serialized_name: 'count', + type: { + name: 'Number' + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_contract.rb new file mode 100644 index 0000000000..a87780d2f1 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_contract.rb @@ -0,0 +1,284 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # External OAuth authorization server settings. + # + class AuthorizationServerContract < Resource + + include MsRestAzure + + # @return [String] Description of the authorization server. Can contain + # HTML formatting tags. + attr_accessor :description + + # @return [Array] HTTP verbs supported by the + # authorization endpoint. GET must be always present. POST is optional. + attr_accessor :authorization_methods + + # @return [Array] Method of authentication + # supported by the token endpoint of this authorization server. Possible + # values are Basic and/or Body. When Body is specified, client + # credentials and other parameters are passed within the request body in + # the application/x-www-form-urlencoded format. + attr_accessor :client_authentication_method + + # @return [Array] Additional parameters + # required by the token endpoint of this authorization server represented + # as an array of JSON objects with name and value string properties, i.e. + # {"name" : "name value", "value": "a value"}. + attr_accessor :token_body_parameters + + # @return [String] OAuth token endpoint. Contains absolute URI to entity + # being referenced. + attr_accessor :token_endpoint + + # @return [Boolean] If true, authorization server will include state + # parameter from the authorization request to its response. Client may + # use state parameter to raise protocol security. + attr_accessor :support_state + + # @return [String] Access token scope that is going to be requested by + # default. Can be overridden at the API level. Should be provided in the + # form of a string containing space-delimited values. + attr_accessor :default_scope + + # @return [Array] Specifies the mechanism by + # which access token is passed to the API. + attr_accessor :bearer_token_sending_methods + + # @return [String] Client or app secret registered with this + # authorization server. + attr_accessor :client_secret + + # @return [String] Can be optionally specified when resource owner + # password grant type is supported by this authorization server. Default + # resource owner username. + attr_accessor :resource_owner_username + + # @return [String] Can be optionally specified when resource owner + # password grant type is supported by this authorization server. Default + # resource owner password. + attr_accessor :resource_owner_password + + # @return [String] User-friendly authorization server name. + attr_accessor :display_name + + # @return [String] Optional reference to a page where client or app + # registration for this authorization server is performed. Contains + # absolute URL to entity being referenced. + attr_accessor :client_registration_endpoint + + # @return [String] OAuth authorization endpoint. See + # http://tools.ietf.org/html/rfc6749#section-3.2. + attr_accessor :authorization_endpoint + + # @return [Array] Form of an authorization grant, which the + # client uses to request the access token. + attr_accessor :grant_types + + # @return [String] Client or app id registered with this authorization + # server. + attr_accessor :client_id + + + # + # Mapper for AuthorizationServerContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AuthorizationServerContract', + type: { + name: 'Composite', + class_name: 'AuthorizationServerContract', + 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', + type: { + name: 'String' + } + }, + authorization_methods: { + required: false, + serialized_name: 'properties.authorizationMethods', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AuthorizationMethodElementType', + type: { + name: 'Enum', + module: 'AuthorizationMethod' + } + } + } + }, + client_authentication_method: { + required: false, + serialized_name: 'properties.clientAuthenticationMethod', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ClientAuthenticationMethodElementType', + type: { + name: 'String' + } + } + } + }, + token_body_parameters: { + required: false, + serialized_name: 'properties.tokenBodyParameters', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'TokenBodyParameterContractElementType', + type: { + name: 'Composite', + class_name: 'TokenBodyParameterContract' + } + } + } + }, + token_endpoint: { + required: false, + serialized_name: 'properties.tokenEndpoint', + type: { + name: 'String' + } + }, + support_state: { + required: false, + serialized_name: 'properties.supportState', + type: { + name: 'Boolean' + } + }, + default_scope: { + required: false, + serialized_name: 'properties.defaultScope', + type: { + name: 'String' + } + }, + bearer_token_sending_methods: { + required: false, + serialized_name: 'properties.bearerTokenSendingMethods', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'BearerTokenSendingMethodElementType', + type: { + name: 'String' + } + } + } + }, + client_secret: { + required: false, + serialized_name: 'properties.clientSecret', + type: { + name: 'String' + } + }, + resource_owner_username: { + required: false, + serialized_name: 'properties.resourceOwnerUsername', + type: { + name: 'String' + } + }, + resource_owner_password: { + required: false, + serialized_name: 'properties.resourceOwnerPassword', + type: { + name: 'String' + } + }, + display_name: { + required: true, + serialized_name: 'properties.displayName', + constraints: { + MaxLength: 50, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + client_registration_endpoint: { + required: true, + serialized_name: 'properties.clientRegistrationEndpoint', + type: { + name: 'String' + } + }, + authorization_endpoint: { + required: true, + serialized_name: 'properties.authorizationEndpoint', + type: { + name: 'String' + } + }, + grant_types: { + required: true, + serialized_name: 'properties.grantTypes', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'GrantTypeElementType', + type: { + name: 'String' + } + } + } + }, + client_id: { + required: true, + serialized_name: 'properties.clientId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_contract_base_properties.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_contract_base_properties.rb new file mode 100644 index 0000000000..0cfa39294c --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_contract_base_properties.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # External OAuth authorization server Update settings contract. + # + class AuthorizationServerContractBaseProperties + + include MsRestAzure + + # @return [String] Description of the authorization server. Can contain + # HTML formatting tags. + attr_accessor :description + + # @return [Array] HTTP verbs supported by the + # authorization endpoint. GET must be always present. POST is optional. + attr_accessor :authorization_methods + + # @return [Array] Method of authentication + # supported by the token endpoint of this authorization server. Possible + # values are Basic and/or Body. When Body is specified, client + # credentials and other parameters are passed within the request body in + # the application/x-www-form-urlencoded format. + attr_accessor :client_authentication_method + + # @return [Array] Additional parameters + # required by the token endpoint of this authorization server represented + # as an array of JSON objects with name and value string properties, i.e. + # {"name" : "name value", "value": "a value"}. + attr_accessor :token_body_parameters + + # @return [String] OAuth token endpoint. Contains absolute URI to entity + # being referenced. + attr_accessor :token_endpoint + + # @return [Boolean] If true, authorization server will include state + # parameter from the authorization request to its response. Client may + # use state parameter to raise protocol security. + attr_accessor :support_state + + # @return [String] Access token scope that is going to be requested by + # default. Can be overridden at the API level. Should be provided in the + # form of a string containing space-delimited values. + attr_accessor :default_scope + + # @return [Array] Specifies the mechanism by + # which access token is passed to the API. + attr_accessor :bearer_token_sending_methods + + # @return [String] Client or app secret registered with this + # authorization server. + attr_accessor :client_secret + + # @return [String] Can be optionally specified when resource owner + # password grant type is supported by this authorization server. Default + # resource owner username. + attr_accessor :resource_owner_username + + # @return [String] Can be optionally specified when resource owner + # password grant type is supported by this authorization server. Default + # resource owner password. + attr_accessor :resource_owner_password + + + # + # Mapper for AuthorizationServerContractBaseProperties class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AuthorizationServerContractBaseProperties', + type: { + name: 'Composite', + class_name: 'AuthorizationServerContractBaseProperties', + model_properties: { + description: { + required: false, + serialized_name: 'description', + type: { + name: 'String' + } + }, + authorization_methods: { + required: false, + serialized_name: 'authorizationMethods', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AuthorizationMethodElementType', + type: { + name: 'Enum', + module: 'AuthorizationMethod' + } + } + } + }, + client_authentication_method: { + required: false, + serialized_name: 'clientAuthenticationMethod', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ClientAuthenticationMethodElementType', + type: { + name: 'String' + } + } + } + }, + token_body_parameters: { + required: false, + serialized_name: 'tokenBodyParameters', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'TokenBodyParameterContractElementType', + type: { + name: 'Composite', + class_name: 'TokenBodyParameterContract' + } + } + } + }, + token_endpoint: { + required: false, + serialized_name: 'tokenEndpoint', + type: { + name: 'String' + } + }, + support_state: { + required: false, + serialized_name: 'supportState', + type: { + name: 'Boolean' + } + }, + default_scope: { + required: false, + serialized_name: 'defaultScope', + type: { + name: 'String' + } + }, + bearer_token_sending_methods: { + required: false, + serialized_name: 'bearerTokenSendingMethods', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'BearerTokenSendingMethodElementType', + type: { + name: 'String' + } + } + } + }, + client_secret: { + required: false, + serialized_name: 'clientSecret', + type: { + name: 'String' + } + }, + resource_owner_username: { + required: false, + serialized_name: 'resourceOwnerUsername', + type: { + name: 'String' + } + }, + resource_owner_password: { + required: false, + serialized_name: 'resourceOwnerPassword', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_update_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_update_contract.rb new file mode 100644 index 0000000000..e7a97e32c6 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_update_contract.rb @@ -0,0 +1,284 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # External OAuth authorization server settings. + # + class AuthorizationServerUpdateContract < Resource + + include MsRestAzure + + # @return [String] Description of the authorization server. Can contain + # HTML formatting tags. + attr_accessor :description + + # @return [Array] HTTP verbs supported by the + # authorization endpoint. GET must be always present. POST is optional. + attr_accessor :authorization_methods + + # @return [Array] Method of authentication + # supported by the token endpoint of this authorization server. Possible + # values are Basic and/or Body. When Body is specified, client + # credentials and other parameters are passed within the request body in + # the application/x-www-form-urlencoded format. + attr_accessor :client_authentication_method + + # @return [Array] Additional parameters + # required by the token endpoint of this authorization server represented + # as an array of JSON objects with name and value string properties, i.e. + # {"name" : "name value", "value": "a value"}. + attr_accessor :token_body_parameters + + # @return [String] OAuth token endpoint. Contains absolute URI to entity + # being referenced. + attr_accessor :token_endpoint + + # @return [Boolean] If true, authorization server will include state + # parameter from the authorization request to its response. Client may + # use state parameter to raise protocol security. + attr_accessor :support_state + + # @return [String] Access token scope that is going to be requested by + # default. Can be overridden at the API level. Should be provided in the + # form of a string containing space-delimited values. + attr_accessor :default_scope + + # @return [Array] Specifies the mechanism by + # which access token is passed to the API. + attr_accessor :bearer_token_sending_methods + + # @return [String] Client or app secret registered with this + # authorization server. + attr_accessor :client_secret + + # @return [String] Can be optionally specified when resource owner + # password grant type is supported by this authorization server. Default + # resource owner username. + attr_accessor :resource_owner_username + + # @return [String] Can be optionally specified when resource owner + # password grant type is supported by this authorization server. Default + # resource owner password. + attr_accessor :resource_owner_password + + # @return [String] User-friendly authorization server name. + attr_accessor :display_name + + # @return [String] Optional reference to a page where client or app + # registration for this authorization server is performed. Contains + # absolute URL to entity being referenced. + attr_accessor :client_registration_endpoint + + # @return [String] OAuth authorization endpoint. See + # http://tools.ietf.org/html/rfc6749#section-3.2. + attr_accessor :authorization_endpoint + + # @return [Array] Form of an authorization grant, which the + # client uses to request the access token. + attr_accessor :grant_types + + # @return [String] Client or app id registered with this authorization + # server. + attr_accessor :client_id + + + # + # Mapper for AuthorizationServerUpdateContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AuthorizationServerUpdateContract', + type: { + name: 'Composite', + class_name: 'AuthorizationServerUpdateContract', + 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', + type: { + name: 'String' + } + }, + authorization_methods: { + required: false, + serialized_name: 'properties.authorizationMethods', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AuthorizationMethodElementType', + type: { + name: 'Enum', + module: 'AuthorizationMethod' + } + } + } + }, + client_authentication_method: { + required: false, + serialized_name: 'properties.clientAuthenticationMethod', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ClientAuthenticationMethodElementType', + type: { + name: 'String' + } + } + } + }, + token_body_parameters: { + required: false, + serialized_name: 'properties.tokenBodyParameters', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'TokenBodyParameterContractElementType', + type: { + name: 'Composite', + class_name: 'TokenBodyParameterContract' + } + } + } + }, + token_endpoint: { + required: false, + serialized_name: 'properties.tokenEndpoint', + type: { + name: 'String' + } + }, + support_state: { + required: false, + serialized_name: 'properties.supportState', + type: { + name: 'Boolean' + } + }, + default_scope: { + required: false, + serialized_name: 'properties.defaultScope', + type: { + name: 'String' + } + }, + bearer_token_sending_methods: { + required: false, + serialized_name: 'properties.bearerTokenSendingMethods', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'BearerTokenSendingMethodElementType', + type: { + name: 'String' + } + } + } + }, + client_secret: { + required: false, + serialized_name: 'properties.clientSecret', + type: { + name: 'String' + } + }, + resource_owner_username: { + required: false, + serialized_name: 'properties.resourceOwnerUsername', + type: { + name: 'String' + } + }, + resource_owner_password: { + required: false, + serialized_name: 'properties.resourceOwnerPassword', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + constraints: { + MaxLength: 50, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + client_registration_endpoint: { + required: false, + serialized_name: 'properties.clientRegistrationEndpoint', + type: { + name: 'String' + } + }, + authorization_endpoint: { + required: false, + serialized_name: 'properties.authorizationEndpoint', + type: { + name: 'String' + } + }, + grant_types: { + required: false, + serialized_name: 'properties.grantTypes', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'GrantTypeElementType', + type: { + name: 'String' + } + } + } + }, + client_id: { + required: false, + serialized_name: 'properties.clientId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_authorization_header_credentials.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_authorization_header_credentials.rb new file mode 100644 index 0000000000..84bd440cc2 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_authorization_header_credentials.rb @@ -0,0 +1,62 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Authorization header information. + # + class BackendAuthorizationHeaderCredentials + + include MsRestAzure + + # @return [String] Authentication Scheme name. + attr_accessor :scheme + + # @return [String] Authentication Parameter value. + attr_accessor :parameter + + + # + # Mapper for BackendAuthorizationHeaderCredentials class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BackendAuthorizationHeaderCredentials', + type: { + name: 'Composite', + class_name: 'BackendAuthorizationHeaderCredentials', + model_properties: { + scheme: { + required: true, + serialized_name: 'scheme', + constraints: { + MaxLength: 100, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + parameter: { + required: true, + serialized_name: 'parameter', + constraints: { + MaxLength: 300, + MinLength: 1 + }, + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_base_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_base_parameters.rb new file mode 100644 index 0000000000..edcf5d1b65 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_base_parameters.rb @@ -0,0 +1,123 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Backend entity base Parameter set. + # + class BackendBaseParameters + + include MsRestAzure + + # @return [String] Backend Title. + attr_accessor :title + + # @return [String] Backend Description. + attr_accessor :description + + # @return [String] Management Uri of the Resource in External System. + # This url can be the Arm Resource Id of Logic Apps, Function Apps or Api + # Apps. + attr_accessor :resource_id + + # @return [BackendProperties] Backend Properties contract + attr_accessor :properties + + # @return [BackendCredentialsContract] Backend Credentials Contract + # Properties + attr_accessor :credentials + + # @return [BackendProxyContract] Backend Proxy Contract Properties + attr_accessor :proxy + + # @return [BackendTlsProperties] Backend TLS Properties + attr_accessor :tls + + + # + # Mapper for BackendBaseParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BackendBaseParameters', + type: { + name: 'Composite', + class_name: 'BackendBaseParameters', + model_properties: { + title: { + required: false, + serialized_name: 'title', + constraints: { + MaxLength: 300, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'description', + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + resource_id: { + required: false, + serialized_name: 'resourceId', + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'BackendProperties' + } + }, + credentials: { + required: false, + serialized_name: 'credentials', + type: { + name: 'Composite', + class_name: 'BackendCredentialsContract' + } + }, + proxy: { + required: false, + serialized_name: 'proxy', + type: { + name: 'Composite', + class_name: 'BackendProxyContract' + } + }, + tls: { + required: false, + serialized_name: 'tls', + type: { + name: 'Composite', + class_name: 'BackendTlsProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_collection.rb new file mode 100644 index 0000000000..8956681ac1 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_collection.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Backend list representation. + # + class BackendCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Backend values. + attr_accessor :value + + # @return [String] Next page link if any. + 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 [BackendCollection] 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 BackendCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BackendCollection', + type: { + name: 'Composite', + class_name: 'BackendCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'BackendContractElementType', + type: { + name: 'Composite', + class_name: 'BackendContract' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_contract.rb new file mode 100644 index 0000000000..fdc2656897 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_contract.rb @@ -0,0 +1,172 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Backend details. + # + class BackendContract < Resource + + include MsRestAzure + + # @return [String] Backend Title. + attr_accessor :title + + # @return [String] Backend Description. + attr_accessor :description + + # @return [String] Management Uri of the Resource in External System. + # This url can be the Arm Resource Id of Logic Apps, Function Apps or Api + # Apps. + attr_accessor :resource_id + + # @return [BackendProperties] Backend Properties contract + attr_accessor :properties + + # @return [BackendCredentialsContract] Backend Credentials Contract + # Properties + attr_accessor :credentials + + # @return [BackendProxyContract] Backend Proxy Contract Properties + attr_accessor :proxy + + # @return [BackendTlsProperties] Backend TLS Properties + attr_accessor :tls + + # @return [String] Runtime Url of the Backend. + attr_accessor :url + + # @return [BackendProtocol] Backend communication protocol. Possible + # values include: 'http', 'soap' + attr_accessor :protocol + + + # + # Mapper for BackendContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BackendContract', + type: { + name: 'Composite', + class_name: 'BackendContract', + 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' + } + }, + title: { + required: false, + serialized_name: 'properties.title', + constraints: { + MaxLength: 300, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + resource_id: { + required: false, + serialized_name: 'properties.resourceId', + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties.properties', + type: { + name: 'Composite', + class_name: 'BackendProperties' + } + }, + credentials: { + required: false, + serialized_name: 'properties.credentials', + type: { + name: 'Composite', + class_name: 'BackendCredentialsContract' + } + }, + proxy: { + required: false, + serialized_name: 'properties.proxy', + type: { + name: 'Composite', + class_name: 'BackendProxyContract' + } + }, + tls: { + required: false, + serialized_name: 'properties.tls', + type: { + name: 'Composite', + class_name: 'BackendTlsProperties' + } + }, + url: { + required: true, + serialized_name: 'properties.url', + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + protocol: { + required: true, + serialized_name: 'properties.protocol', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_credentials_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_credentials_contract.rb new file mode 100644 index 0000000000..4e96e1f9c7 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_credentials_contract.rb @@ -0,0 +1,114 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Details of the Credentials used to connect to Backend. + # + class BackendCredentialsContract + + include MsRestAzure + + # @return [Array] List of Client Certificate Thumbprint. + attr_accessor :certificate + + # @return [Hash{String => Array}] Query Parameter description. + attr_accessor :query + + # @return [Hash{String => Array}] Header Parameter description. + attr_accessor :header + + # @return [BackendAuthorizationHeaderCredentials] Authorization header + # authentication + attr_accessor :authorization + + + # + # Mapper for BackendCredentialsContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BackendCredentialsContract', + type: { + name: 'Composite', + class_name: 'BackendCredentialsContract', + model_properties: { + certificate: { + required: false, + serialized_name: 'certificate', + constraints: { + MaxItems: 32 + }, + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + query: { + required: false, + serialized_name: 'query', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'ArrayElementType', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + }, + header: { + required: false, + serialized_name: 'header', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'ArrayElementType', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + }, + authorization: { + required: false, + serialized_name: 'authorization', + type: { + name: 'Composite', + class_name: 'BackendAuthorizationHeaderCredentials' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_properties.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_properties.rb new file mode 100644 index 0000000000..10df6c043f --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_properties.rb @@ -0,0 +1,46 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Properties specific to the Backend Type. + # + class BackendProperties + + include MsRestAzure + + # @return [BackendServiceFabricClusterProperties] Backend Service Fabric + # Cluster Properties + attr_accessor :service_fabric_cluster + + + # + # Mapper for BackendProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BackendProperties', + type: { + name: 'Composite', + class_name: 'BackendProperties', + model_properties: { + service_fabric_cluster: { + required: false, + serialized_name: 'serviceFabricCluster', + type: { + name: 'Composite', + class_name: 'BackendServiceFabricClusterProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_protocol.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_protocol.rb new file mode 100644 index 0000000000..1da99a6838 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_protocol.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for BackendProtocol + # + module BackendProtocol + Http = "http" + Soap = "soap" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_proxy_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_proxy_contract.rb new file mode 100644 index 0000000000..d15bee24a1 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_proxy_contract.rb @@ -0,0 +1,70 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Details of the Backend WebProxy Server to use in the Request to Backend. + # + class BackendProxyContract + + include MsRestAzure + + # @return [String] WebProxy Server AbsoluteUri property which includes + # the entire URI stored in the Uri instance, including all fragments and + # query strings. + attr_accessor :url + + # @return [String] Username to connect to the WebProxy server + attr_accessor :username + + # @return [String] Password to connect to the WebProxy Server + attr_accessor :password + + + # + # Mapper for BackendProxyContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BackendProxyContract', + type: { + name: 'Composite', + class_name: 'BackendProxyContract', + model_properties: { + url: { + required: true, + serialized_name: 'url', + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + username: { + required: false, + serialized_name: 'username', + type: { + name: 'String' + } + }, + password: { + required: false, + serialized_name: 'password', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_reconnect_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_reconnect_contract.rb new file mode 100644 index 0000000000..5e513038e4 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_reconnect_contract.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Reconnect request parameters. + # + class BackendReconnectContract < Resource + + include MsRestAzure + + # @return [Duration] Duration in ISO8601 format after which reconnect + # will be initiated. Minimum duration of the Reconect is PT2M. + attr_accessor :after + + + # + # Mapper for BackendReconnectContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BackendReconnectContract', + type: { + name: 'Composite', + class_name: 'BackendReconnectContract', + 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' + } + }, + after: { + required: false, + serialized_name: 'properties.after', + type: { + name: 'TimeSpan' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_service_fabric_cluster_properties.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_service_fabric_cluster_properties.rb new file mode 100644 index 0000000000..e171bbe81c --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_service_fabric_cluster_properties.rb @@ -0,0 +1,110 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Properties of the Service Fabric Type Backend. + # + class BackendServiceFabricClusterProperties + + include MsRestAzure + + # @return [String] The client certificate thumbprint for the management + # endpoint. + attr_accessor :client_certificatethumbprint + + # @return [Integer] Maximum number of retries while attempting resolve + # the parition. + attr_accessor :max_partition_resolution_retries + + # @return [Array] The cluster management endpoint. + attr_accessor :management_endpoints + + # @return [Array] Thumbprints of certificates cluster management + # service uses for tls communication + attr_accessor :server_certificate_thumbprints + + # @return [Array] Server X509 Certificate Names + # Collection + attr_accessor :server_x509names + + + # + # Mapper for BackendServiceFabricClusterProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BackendServiceFabricClusterProperties', + type: { + name: 'Composite', + class_name: 'BackendServiceFabricClusterProperties', + model_properties: { + client_certificatethumbprint: { + required: true, + serialized_name: 'clientCertificatethumbprint', + type: { + name: 'String' + } + }, + max_partition_resolution_retries: { + required: false, + serialized_name: 'maxPartitionResolutionRetries', + type: { + name: 'Number' + } + }, + management_endpoints: { + required: true, + serialized_name: 'managementEndpoints', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + server_certificate_thumbprints: { + required: false, + serialized_name: 'serverCertificateThumbprints', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + server_x509names: { + required: false, + serialized_name: 'serverX509Names', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'X509CertificateNameElementType', + type: { + name: 'Composite', + class_name: 'X509CertificateName' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_tls_properties.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_tls_properties.rb new file mode 100644 index 0000000000..be62d2b753 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_tls_properties.rb @@ -0,0 +1,60 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Properties controlling TLS Certificate Validation. + # + class BackendTlsProperties + + include MsRestAzure + + # @return [Boolean] Flag indicating whether SSL certificate chain + # validation should be done when using self-signed certificates for this + # backend host. Default value: true . + attr_accessor :validate_certificate_chain + + # @return [Boolean] Flag indicating whether SSL certificate name + # validation should be done when using self-signed certificates for this + # backend host. Default value: true . + attr_accessor :validate_certificate_name + + + # + # Mapper for BackendTlsProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BackendTlsProperties', + type: { + name: 'Composite', + class_name: 'BackendTlsProperties', + model_properties: { + validate_certificate_chain: { + required: false, + serialized_name: 'validateCertificateChain', + default_value: true, + type: { + name: 'Boolean' + } + }, + validate_certificate_name: { + required: false, + serialized_name: 'validateCertificateName', + default_value: true, + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_update_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_update_parameters.rb new file mode 100644 index 0000000000..e871509a3c --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_update_parameters.rb @@ -0,0 +1,148 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Backend update parameters. + # + class BackendUpdateParameters + + include MsRestAzure + + # @return [String] Backend Title. + attr_accessor :title + + # @return [String] Backend Description. + attr_accessor :description + + # @return [String] Management Uri of the Resource in External System. + # This url can be the Arm Resource Id of Logic Apps, Function Apps or Api + # Apps. + attr_accessor :resource_id + + # @return [BackendProperties] Backend Properties contract + attr_accessor :properties + + # @return [BackendCredentialsContract] Backend Credentials Contract + # Properties + attr_accessor :credentials + + # @return [BackendProxyContract] Backend Proxy Contract Properties + attr_accessor :proxy + + # @return [BackendTlsProperties] Backend TLS Properties + attr_accessor :tls + + # @return [String] Runtime Url of the Backend. + attr_accessor :url + + # @return [BackendProtocol] Backend communication protocol. Possible + # values include: 'http', 'soap' + attr_accessor :protocol + + + # + # Mapper for BackendUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BackendUpdateParameters', + type: { + name: 'Composite', + class_name: 'BackendUpdateParameters', + model_properties: { + title: { + required: false, + serialized_name: 'properties.title', + constraints: { + MaxLength: 300, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + resource_id: { + required: false, + serialized_name: 'properties.resourceId', + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties.properties', + type: { + name: 'Composite', + class_name: 'BackendProperties' + } + }, + credentials: { + required: false, + serialized_name: 'properties.credentials', + type: { + name: 'Composite', + class_name: 'BackendCredentialsContract' + } + }, + proxy: { + required: false, + serialized_name: 'properties.proxy', + type: { + name: 'Composite', + class_name: 'BackendProxyContract' + } + }, + tls: { + required: false, + serialized_name: 'properties.tls', + type: { + name: 'Composite', + class_name: 'BackendTlsProperties' + } + }, + url: { + required: false, + serialized_name: 'properties.url', + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + protocol: { + required: false, + serialized_name: 'properties.protocol', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/bearer_token_sending_method.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/bearer_token_sending_method.rb new file mode 100644 index 0000000000..9c2101067b --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/bearer_token_sending_method.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for BearerTokenSendingMethod + # + module BearerTokenSendingMethod + AuthorizationHeader = "authorizationHeader" + Query = "query" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/bearer_token_sending_methods.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/bearer_token_sending_methods.rb new file mode 100644 index 0000000000..128892a965 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/bearer_token_sending_methods.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for BearerTokenSendingMethods + # + module BearerTokenSendingMethods + AuthorizationHeader = "authorizationHeader" + Query = "query" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_collection.rb new file mode 100644 index 0000000000..15defeec9f --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_collection.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Certificates list representation. + # + class CertificateCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Page values. + attr_accessor :value + + # @return [String] Next page link if any. + 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 [CertificateCollection] 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 CertificateCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CertificateCollection', + type: { + name: 'Composite', + class_name: 'CertificateCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'CertificateContractElementType', + type: { + name: 'Composite', + class_name: 'CertificateContract' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_configuration.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_configuration.rb new file mode 100644 index 0000000000..4647f78cce --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_configuration.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Certificate configuration which consist of non-trusted intermediates and + # root certificates. + # + class CertificateConfiguration + + include MsRestAzure + + # @return [String] Base64 Encoded certificate. + attr_accessor :encoded_certificate + + # @return [String] Certificate Password. + attr_accessor :certificate_password + + # @return [Enum] The + # System.Security.Cryptography.x509certificates.Storename certificate + # store location. Only Root and CertificateAuthority are valid locations. + # Possible values include: 'CertificateAuthority', 'Root' + attr_accessor :store_name + + # @return [CertificateInformation] Certificate information. + attr_accessor :certificate + + + # + # Mapper for CertificateConfiguration class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CertificateConfiguration', + type: { + name: 'Composite', + class_name: 'CertificateConfiguration', + model_properties: { + encoded_certificate: { + required: false, + serialized_name: 'encodedCertificate', + type: { + name: 'String' + } + }, + certificate_password: { + required: false, + serialized_name: 'certificatePassword', + type: { + name: 'String' + } + }, + store_name: { + required: true, + serialized_name: 'storeName', + type: { + name: 'String' + } + }, + certificate: { + required: false, + serialized_name: 'certificate', + type: { + name: 'Composite', + class_name: 'CertificateInformation' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_contract.rb new file mode 100644 index 0000000000..666e0c68a4 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_contract.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Certificate details. + # + class CertificateContract < Resource + + include MsRestAzure + + # @return [String] Subject attribute of the certificate. + attr_accessor :subject + + # @return [String] Thumbprint of the certificate. + attr_accessor :thumbprint + + # @return [DateTime] Expiration date of the certificate. The date + # conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified + # by the ISO 8601 standard. + # + attr_accessor :expiration_date + + + # + # Mapper for CertificateContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CertificateContract', + type: { + name: 'Composite', + class_name: 'CertificateContract', + 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' + } + }, + subject: { + required: true, + serialized_name: 'properties.subject', + type: { + name: 'String' + } + }, + thumbprint: { + required: true, + serialized_name: 'properties.thumbprint', + type: { + name: 'String' + } + }, + expiration_date: { + required: true, + serialized_name: 'properties.expirationDate', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_create_or_update_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_create_or_update_parameters.rb new file mode 100644 index 0000000000..f51b20c3e5 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_create_or_update_parameters.rb @@ -0,0 +1,55 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Certificate create or update details. + # + class CertificateCreateOrUpdateParameters + + include MsRestAzure + + # @return [String] Base 64 encoded certificate using the + # application/x-pkcs12 representation. + attr_accessor :data + + # @return [String] Password for the Certificate + attr_accessor :password + + + # + # Mapper for CertificateCreateOrUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CertificateCreateOrUpdateParameters', + type: { + name: 'Composite', + class_name: 'CertificateCreateOrUpdateParameters', + model_properties: { + data: { + required: true, + serialized_name: 'properties.data', + type: { + name: 'String' + } + }, + password: { + required: true, + serialized_name: 'properties.password', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_information.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_information.rb new file mode 100644 index 0000000000..939ec4176d --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_information.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # SSL certificate information. + # + class CertificateInformation + + include MsRestAzure + + # @return [DateTime] Expiration date of the certificate. The date + # conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified + # by the ISO 8601 standard. + attr_accessor :expiry + + # @return [String] Thumbprint of the certificate. + attr_accessor :thumbprint + + # @return [String] Subject of the certificate. + attr_accessor :subject + + + # + # Mapper for CertificateInformation class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CertificateInformation', + type: { + name: 'Composite', + class_name: 'CertificateInformation', + model_properties: { + expiry: { + required: true, + serialized_name: 'expiry', + type: { + name: 'DateTime' + } + }, + thumbprint: { + required: true, + serialized_name: 'thumbprint', + type: { + name: 'String' + } + }, + subject: { + required: true, + serialized_name: 'subject', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/client_authentication_method.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/client_authentication_method.rb new file mode 100644 index 0000000000..52679997c5 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/client_authentication_method.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for ClientAuthenticationMethod + # + module ClientAuthenticationMethod + Basic = "Basic" + Body = "Body" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/confirmation.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/confirmation.rb new file mode 100644 index 0000000000..a741634c5d --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/confirmation.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for Confirmation + # + module Confirmation + Signup = "signup" + Invite = "invite" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/connectivity_status_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/connectivity_status_contract.rb new file mode 100644 index 0000000000..b5a4c62320 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/connectivity_status_contract.rb @@ -0,0 +1,101 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Details about connectivity to a resource. + # + class ConnectivityStatusContract + + include MsRestAzure + + # @return [String] The hostname of the resource which the service depends + # on. This can be the database, storage or any other azure resource on + # which the service depends upon. + attr_accessor :name + + # @return [ConnectivityStatusType] Resource Connectivity Status Type + # identifier. Possible values include: 'initializing', 'success', + # 'failure' + attr_accessor :status + + # @return [String] Error details of the connectivity to the resource. + attr_accessor :error + + # @return [DateTime] The date when the resource connectivity status was + # last updated. This status should be updated every 15 minutes. If this + # status has not been updated, then it means that the service has lost + # network connectivity to the resource, from inside the Virtual + # Network.The date conforms to the following format: + # `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + # + attr_accessor :last_updated + + # @return [DateTime] The date when the resource connectivity status last + # Changed from success to failure or vice-versa. The date conforms to the + # following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 + # standard. + # + attr_accessor :last_status_change + + + # + # Mapper for ConnectivityStatusContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ConnectivityStatusContract', + type: { + name: 'Composite', + class_name: 'ConnectivityStatusContract', + model_properties: { + name: { + required: true, + serialized_name: 'name', + constraints: { + MinLength: 1 + }, + type: { + name: 'String' + } + }, + status: { + required: true, + serialized_name: 'status', + type: { + name: 'String' + } + }, + error: { + required: false, + serialized_name: 'error', + type: { + name: 'String' + } + }, + last_updated: { + required: true, + serialized_name: 'lastUpdated', + type: { + name: 'DateTime' + } + }, + last_status_change: { + required: true, + serialized_name: 'lastStatusChange', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/connectivity_status_type.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/connectivity_status_type.rb new file mode 100644 index 0000000000..4d3da3590a --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/connectivity_status_type.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for ConnectivityStatusType + # + module ConnectivityStatusType + Initializing = "initializing" + Success = "success" + Failure = "failure" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/content_format.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/content_format.rb new file mode 100644 index 0000000000..e58448e375 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/content_format.rb @@ -0,0 +1,20 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for ContentFormat + # + module ContentFormat + WadlXml = "wadl-xml" + WadlLinkJson = "wadl-link-json" + SwaggerJson = "swagger-json" + SwaggerLinkJson = "swagger-link-json" + Wsdl = "wsdl" + WsdlLink = "wsdl-link" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/deploy_configuration_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/deploy_configuration_parameters.rb new file mode 100644 index 0000000000..06504b5594 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/deploy_configuration_parameters.rb @@ -0,0 +1,56 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Parameters supplied to the Deploy Configuration operation. + # + class DeployConfigurationParameters + + include MsRestAzure + + # @return [String] The name of the Git branch from which the + # configuration is to be deployed to the configuration database. + attr_accessor :branch + + # @return [Boolean] The value enforcing deleting subscriptions to + # products that are deleted in this update. + attr_accessor :force + + + # + # Mapper for DeployConfigurationParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DeployConfigurationParameters', + type: { + name: 'Composite', + class_name: 'DeployConfigurationParameters', + model_properties: { + branch: { + required: true, + serialized_name: 'branch', + type: { + name: 'String' + } + }, + force: { + required: false, + serialized_name: 'force', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/diagnostic_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/diagnostic_collection.rb new file mode 100644 index 0000000000..0c09eec787 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/diagnostic_collection.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Diagnostic list representation. + # + class DiagnosticCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Page values. + attr_accessor :value + + # @return [String] Next page link if any. + 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 [DiagnosticCollection] 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 DiagnosticCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DiagnosticCollection', + type: { + name: 'Composite', + class_name: 'DiagnosticCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DiagnosticContractElementType', + type: { + name: 'Composite', + class_name: 'DiagnosticContract' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/diagnostic_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/diagnostic_contract.rb new file mode 100644 index 0000000000..6f0ada800d --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/diagnostic_contract.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Diagnostic details. + # + class DiagnosticContract < Resource + + include MsRestAzure + + # @return [Boolean] Indicates whether a diagnostic should receive data or + # not. + attr_accessor :enabled + + + # + # Mapper for DiagnosticContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DiagnosticContract', + type: { + name: 'Composite', + class_name: 'DiagnosticContract', + 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' + } + }, + enabled: { + required: true, + serialized_name: 'properties.enabled', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/email_template_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/email_template_collection.rb new file mode 100644 index 0000000000..f190f2ff72 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/email_template_collection.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged email template list representation. + # + class EmailTemplateCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Page values. + attr_accessor :value + + # @return [String] Next page link if any. + 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 [EmailTemplateCollection] 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 EmailTemplateCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EmailTemplateCollection', + type: { + name: 'Composite', + class_name: 'EmailTemplateCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'EmailTemplateContractElementType', + type: { + name: 'Composite', + class_name: 'EmailTemplateContract' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/email_template_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/email_template_contract.rb new file mode 100644 index 0000000000..e17258edbb --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/email_template_contract.rb @@ -0,0 +1,136 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Email Template details. + # + class EmailTemplateContract < Resource + + include MsRestAzure + + # @return [String] Subject of the Template. + attr_accessor :subject + + # @return [String] Email Template Body. This should be a valid XDocument + attr_accessor :body + + # @return [String] Title of the Template. + attr_accessor :title + + # @return [String] Description of the Email Template. + attr_accessor :description + + # @return [Boolean] Whether the template is the default template provided + # by Api Management or has been edited. + attr_accessor :is_default + + # @return [Array] Email + # Template Parameter values. + attr_accessor :parameters + + + # + # Mapper for EmailTemplateContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EmailTemplateContract', + type: { + name: 'Composite', + class_name: 'EmailTemplateContract', + 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' + } + }, + subject: { + required: true, + serialized_name: 'properties.subject', + constraints: { + MaxLength: 1000, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + body: { + required: true, + serialized_name: 'properties.body', + constraints: { + MinLength: 1 + }, + type: { + name: 'String' + } + }, + title: { + required: false, + serialized_name: 'properties.title', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + is_default: { + required: false, + read_only: true, + serialized_name: 'properties.isDefault', + type: { + name: 'Boolean' + } + }, + parameters: { + required: false, + serialized_name: 'properties.parameters', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'EmailTemplateParametersContractPropertiesElementType', + type: { + name: 'Composite', + class_name: 'EmailTemplateParametersContractProperties' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/email_template_parameters_contract_properties.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/email_template_parameters_contract_properties.rb new file mode 100644 index 0000000000..23b4541660 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/email_template_parameters_contract_properties.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Email Template Parameter contract. + # + class EmailTemplateParametersContractProperties + + include MsRestAzure + + # @return [String] Template parameter name. + attr_accessor :name + + # @return [String] Template parameter title. + attr_accessor :title + + # @return [String] Template parameter description. + attr_accessor :description + + + # + # Mapper for EmailTemplateParametersContractProperties class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EmailTemplateParametersContractProperties', + type: { + name: 'Composite', + class_name: 'EmailTemplateParametersContractProperties', + model_properties: { + name: { + required: false, + serialized_name: 'name', + constraints: { + MaxLength: 256, + MinLength: 1, + Pattern: '^[A-Za-z0-9-._]+$' + }, + type: { + name: 'String' + } + }, + title: { + required: false, + serialized_name: 'title', + constraints: { + MaxLength: 4096, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'description', + constraints: { + MaxLength: 256, + MinLength: 1, + Pattern: '^[A-Za-z0-9-._]+$' + }, + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/email_template_update_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/email_template_update_parameters.rb new file mode 100644 index 0000000000..2ab613df9a --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/email_template_update_parameters.rb @@ -0,0 +1,100 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Email Template update Parameters. + # + class EmailTemplateUpdateParameters + + include MsRestAzure + + # @return [String] Subject of the Template. + attr_accessor :subject + + # @return [String] Title of the Template. + attr_accessor :title + + # @return [String] Description of the Email Template. + attr_accessor :description + + # @return [String] Email Template Body. This should be a valid XDocument + attr_accessor :body + + # @return [Array] Email + # Template Parameter values. + attr_accessor :parameters + + + # + # Mapper for EmailTemplateUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EmailTemplateUpdateParameters', + type: { + name: 'Composite', + class_name: 'EmailTemplateUpdateParameters', + model_properties: { + subject: { + required: false, + serialized_name: 'properties.subject', + constraints: { + MaxLength: 1000, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + title: { + required: false, + serialized_name: 'properties.title', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + body: { + required: false, + serialized_name: 'properties.body', + constraints: { + MinLength: 1 + }, + type: { + name: 'String' + } + }, + parameters: { + required: false, + serialized_name: 'properties.parameters', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'EmailTemplateParametersContractPropertiesElementType', + type: { + name: 'Composite', + class_name: 'EmailTemplateParametersContractProperties' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/error_field_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/error_field_contract.rb new file mode 100644 index 0000000000..d63aedd531 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/error_field_contract.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Error Field contract. + # + class ErrorFieldContract + + include MsRestAzure + + # @return [String] Property level error code. + attr_accessor :code + + # @return [String] Human-readable representation of property-level error. + attr_accessor :message + + # @return [String] Property name. + attr_accessor :target + + + # + # Mapper for ErrorFieldContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ErrorFieldContract', + type: { + name: 'Composite', + class_name: 'ErrorFieldContract', + model_properties: { + code: { + required: false, + serialized_name: 'code', + type: { + name: 'String' + } + }, + message: { + required: false, + serialized_name: 'message', + type: { + name: 'String' + } + }, + target: { + required: false, + serialized_name: 'target', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/error_response.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/error_response.rb new file mode 100644 index 0000000000..9bd68b2734 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/error_response.rb @@ -0,0 +1,74 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Error Response. + # + class ErrorResponse + + include MsRestAzure + + # @return [String] Service-defined error code. This code serves as a + # sub-status for the HTTP error code specified in the response. + attr_accessor :code + + # @return [String] Human-readable representation of the error. + attr_accessor :message + + # @return [Array] The list of invalid fields send in + # request, in case of validation error. + attr_accessor :details + + + # + # Mapper for ErrorResponse class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ErrorResponse', + type: { + name: 'Composite', + class_name: 'ErrorResponse', + model_properties: { + code: { + required: false, + serialized_name: 'error.code', + type: { + name: 'String' + } + }, + message: { + required: false, + serialized_name: 'error.message', + type: { + name: 'String' + } + }, + details: { + required: false, + serialized_name: 'error.details', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ErrorFieldContractElementType', + type: { + name: 'Composite', + class_name: 'ErrorFieldContract' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/error_response_body.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/error_response_body.rb new file mode 100644 index 0000000000..218197796a --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/error_response_body.rb @@ -0,0 +1,74 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Error Body contract. + # + class ErrorResponseBody + + include MsRestAzure + + # @return [String] Service-defined error code. This code serves as a + # sub-status for the HTTP error code specified in the response. + attr_accessor :code + + # @return [String] Human-readable representation of the error. + attr_accessor :message + + # @return [Array] The list of invalid fields send in + # request, in case of validation error. + attr_accessor :details + + + # + # Mapper for ErrorResponseBody class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ErrorResponseBody', + type: { + name: 'Composite', + class_name: 'ErrorResponseBody', + model_properties: { + code: { + required: false, + serialized_name: 'code', + type: { + name: 'String' + } + }, + message: { + required: false, + serialized_name: 'message', + type: { + name: 'String' + } + }, + details: { + required: false, + serialized_name: 'details', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ErrorFieldContractElementType', + type: { + name: 'Composite', + class_name: 'ErrorFieldContract' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/export_format.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/export_format.rb new file mode 100644 index 0000000000..6cb51c0f22 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/export_format.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for ExportFormat + # + module ExportFormat + Swagger = "swagger-link" + Wsdl = "wsdl-link" + Wadl = "wadl-link" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/generate_sso_url_result.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/generate_sso_url_result.rb new file mode 100644 index 0000000000..773bb4fac7 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/generate_sso_url_result.rb @@ -0,0 +1,44 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Generate SSO Url operations response details. + # + class GenerateSsoUrlResult + + include MsRestAzure + + # @return [String] Redirect Url containing the SSO URL value. + attr_accessor :value + + + # + # Mapper for GenerateSsoUrlResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'GenerateSsoUrlResult', + type: { + name: 'Composite', + class_name: 'GenerateSsoUrlResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/grant_type.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/grant_type.rb new file mode 100644 index 0000000000..f722726a42 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/grant_type.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for GrantType + # + module GrantType + AuthorizationCode = "authorizationCode" + Implicit = "implicit" + ResourceOwnerPassword = "resourceOwnerPassword" + ClientCredentials = "clientCredentials" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_collection.rb new file mode 100644 index 0000000000..deaa6a7f34 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_collection.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Group list representation. + # + class GroupCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Page values. + attr_accessor :value + + # @return [String] Next page link if any. + 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 [GroupCollection] 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 GroupCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'GroupCollection', + type: { + name: 'Composite', + class_name: 'GroupCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'GroupContractElementType', + type: { + name: 'Composite', + class_name: 'GroupContract' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_contract.rb new file mode 100644 index 0000000000..8544f4ec1c --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_contract.rb @@ -0,0 +1,122 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Contract details. + # + class GroupContract < Resource + + include MsRestAzure + + # @return [String] Group name. + attr_accessor :display_name + + # @return [String] Group description. Can contain HTML formatting tags. + attr_accessor :description + + # @return [Boolean] true if the group is one of the three system groups + # (Administrators, Developers, or Guests); otherwise false. + attr_accessor :built_in + + # @return [GroupType] Group type. Possible values include: 'custom', + # 'system', 'external' + attr_accessor :group_contract_type + + # @return [String] For external groups, this property contains the id of + # the group from the external identity provider, e.g. for Azure Active + # Directory aad://.onmicrosoft.com/groups/; + # otherwise the value is null. + attr_accessor :external_id + + + # + # Mapper for GroupContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'GroupContract', + type: { + name: 'Composite', + class_name: 'GroupContract', + 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' + } + }, + display_name: { + required: true, + serialized_name: 'properties.displayName', + constraints: { + MaxLength: 300, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + constraints: { + MaxLength: 1000 + }, + type: { + name: 'String' + } + }, + built_in: { + required: false, + read_only: true, + serialized_name: 'properties.builtIn', + type: { + name: 'Boolean' + } + }, + group_contract_type: { + required: false, + serialized_name: 'properties.type', + type: { + name: 'Enum', + module: 'GroupType' + } + }, + external_id: { + required: false, + serialized_name: 'properties.externalId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_contract_properties.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_contract_properties.rb new file mode 100644 index 0000000000..90bb57c014 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_contract_properties.rb @@ -0,0 +1,98 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Group contract Properties. + # + class GroupContractProperties + + include MsRestAzure + + # @return [String] Group name. + attr_accessor :display_name + + # @return [String] Group description. Can contain HTML formatting tags. + attr_accessor :description + + # @return [Boolean] true if the group is one of the three system groups + # (Administrators, Developers, or Guests); otherwise false. + attr_accessor :built_in + + # @return [GroupType] Group type. Possible values include: 'custom', + # 'system', 'external' + attr_accessor :type + + # @return [String] For external groups, this property contains the id of + # the group from the external identity provider, e.g. for Azure Active + # Directory aad://.onmicrosoft.com/groups/; + # otherwise the value is null. + attr_accessor :external_id + + + # + # Mapper for GroupContractProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'GroupContractProperties', + type: { + name: 'Composite', + class_name: 'GroupContractProperties', + model_properties: { + display_name: { + required: true, + serialized_name: 'displayName', + constraints: { + MaxLength: 300, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'description', + constraints: { + MaxLength: 1000 + }, + type: { + name: 'String' + } + }, + built_in: { + required: false, + read_only: true, + serialized_name: 'builtIn', + type: { + name: 'Boolean' + } + }, + type: { + required: false, + serialized_name: 'type', + type: { + name: 'Enum', + module: 'GroupType' + } + }, + external_id: { + required: false, + serialized_name: 'externalId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_create_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_create_parameters.rb new file mode 100644 index 0000000000..b42a617d3d --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_create_parameters.rb @@ -0,0 +1,83 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Parameters supplied to the Create Group operation. + # + class GroupCreateParameters + + include MsRestAzure + + # @return [String] Group name. + attr_accessor :display_name + + # @return [String] Group description. + attr_accessor :description + + # @return [GroupType] Group type. Possible values include: 'custom', + # 'system', 'external' + attr_accessor :type + + # @return [String] Identifier of the external groups, this property + # contains the id of the group from the external identity provider, e.g. + # for Azure Active Directory aad://.onmicrosoft.com/groups/; otherwise the value is null. + attr_accessor :external_id + + + # + # Mapper for GroupCreateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'GroupCreateParameters', + type: { + name: 'Composite', + class_name: 'GroupCreateParameters', + model_properties: { + display_name: { + required: true, + serialized_name: 'properties.displayName', + constraints: { + MaxLength: 300, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + type: { + required: false, + serialized_name: 'properties.type', + type: { + name: 'Enum', + module: 'GroupType' + } + }, + external_id: { + required: false, + serialized_name: 'properties.externalId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_type.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_type.rb new file mode 100644 index 0000000000..6324409ecb --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_type.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for GroupType + # + module GroupType + Custom = "custom" + System = "system" + External = "external" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_update_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_update_parameters.rb new file mode 100644 index 0000000000..ac5eb974c6 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_update_parameters.rb @@ -0,0 +1,83 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Parameters supplied to the Update Group operation. + # + class GroupUpdateParameters + + include MsRestAzure + + # @return [String] Group name. + attr_accessor :display_name + + # @return [String] Group description. + attr_accessor :description + + # @return [GroupType] Group type. Possible values include: 'custom', + # 'system', 'external' + attr_accessor :type + + # @return [String] Identifier of the external groups, this property + # contains the id of the group from the external identity provider, e.g. + # for Azure Active Directory aad://.onmicrosoft.com/groups/; otherwise the value is null. + attr_accessor :external_id + + + # + # Mapper for GroupUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'GroupUpdateParameters', + type: { + name: 'Composite', + class_name: 'GroupUpdateParameters', + model_properties: { + display_name: { + required: false, + serialized_name: 'properties.displayName', + constraints: { + MaxLength: 300, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + type: { + required: false, + serialized_name: 'properties.type', + type: { + name: 'Enum', + module: 'GroupType' + } + }, + external_id: { + required: false, + serialized_name: 'properties.externalId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/hostname_configuration.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/hostname_configuration.rb new file mode 100644 index 0000000000..16de47a386 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/hostname_configuration.rb @@ -0,0 +1,129 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Custom hostname configuration. + # + class HostnameConfiguration + + include MsRestAzure + + # @return [HostnameType] Hostname type. Possible values include: 'Proxy', + # 'Portal', 'Management', 'Scm' + attr_accessor :type + + # @return [String] Hostname to configure on the Api Management service. + attr_accessor :host_name + + # @return [String] Url to the KeyVault Secret containing the Ssl + # Certificate. If absolute Url containing version is provided, + # auto-update of ssl certificate will not work. This requires Api + # Management service to be configured with MSI. The secret should be of + # type *application/x-pkcs12* + attr_accessor :key_vault_id + + # @return [String] Base64 Encoded certificate. + attr_accessor :encoded_certificate + + # @return [String] Certificate Password. + attr_accessor :certificate_password + + # @return [Boolean] Specify true to setup the certificate associated with + # this Hostname as the Default SSL Certificate. If a client does not send + # the SNI header, then this will be the certificate that will be + # challenged. The property is useful if a service has multiple custom + # hostname enabled and it needs to decide on the default ssl certificate. + # The setting only applied to Proxy Hostname Type. Default value: false . + attr_accessor :default_ssl_binding + + # @return [Boolean] Specify true to always negotiate client certificate + # on the hostname. Default Value is false. Default value: false . + attr_accessor :negotiate_client_certificate + + # @return [CertificateInformation] Certificate information. + attr_accessor :certificate + + + # + # Mapper for HostnameConfiguration class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HostnameConfiguration', + type: { + name: 'Composite', + class_name: 'HostnameConfiguration', + model_properties: { + type: { + required: true, + serialized_name: 'type', + type: { + name: 'Enum', + module: 'HostnameType' + } + }, + host_name: { + required: true, + serialized_name: 'hostName', + type: { + name: 'String' + } + }, + key_vault_id: { + required: false, + serialized_name: 'keyVaultId', + type: { + name: 'String' + } + }, + encoded_certificate: { + required: false, + serialized_name: 'encodedCertificate', + type: { + name: 'String' + } + }, + certificate_password: { + required: false, + serialized_name: 'certificatePassword', + type: { + name: 'String' + } + }, + default_ssl_binding: { + required: false, + serialized_name: 'defaultSslBinding', + default_value: false, + type: { + name: 'Boolean' + } + }, + negotiate_client_certificate: { + required: false, + serialized_name: 'negotiateClientCertificate', + default_value: false, + type: { + name: 'Boolean' + } + }, + certificate: { + required: false, + serialized_name: 'certificate', + type: { + name: 'Composite', + class_name: 'CertificateInformation' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/hostname_configuration_old.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/hostname_configuration_old.rb new file mode 100644 index 0000000000..ab5077e29f --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/hostname_configuration_old.rb @@ -0,0 +1,67 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Custom hostname configuration. + # + class HostnameConfigurationOld + + include MsRestAzure + + # @return [HostnameType] Hostname type. Possible values include: 'Proxy', + # 'Portal', 'Management', 'Scm' + attr_accessor :type + + # @return [String] Hostname to configure. + attr_accessor :hostname + + # @return [CertificateInformation] Certificate information. + attr_accessor :certificate + + + # + # Mapper for HostnameConfigurationOld class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HostnameConfigurationOld', + type: { + name: 'Composite', + class_name: 'HostnameConfigurationOld', + model_properties: { + type: { + required: true, + serialized_name: 'type', + type: { + name: 'Enum', + module: 'HostnameType' + } + }, + hostname: { + required: true, + serialized_name: 'hostname', + type: { + name: 'String' + } + }, + certificate: { + required: true, + serialized_name: 'certificate', + type: { + name: 'Composite', + class_name: 'CertificateInformation' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/hostname_type.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/hostname_type.rb new file mode 100644 index 0000000000..92803a31ce --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/hostname_type.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for HostnameType + # + module HostnameType + Proxy = "Proxy" + Portal = "Portal" + Management = "Management" + Scm = "Scm" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_base_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_base_parameters.rb new file mode 100644 index 0000000000..883d068d9b --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_base_parameters.rb @@ -0,0 +1,123 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Identity Provider Base Parameter Properties. + # + class IdentityProviderBaseParameters + + include MsRestAzure + + # @return [IdentityProviderType] Identity Provider Type identifier. + # Possible values include: 'facebook', 'google', 'microsoft', 'twitter', + # 'aad', 'aadB2C' + attr_accessor :type + + # @return [Array] List of Allowed Tenants when configuring Azure + # Active Directory login. + attr_accessor :allowed_tenants + + # @return [String] Signup Policy Name. Only applies to AAD B2C Identity + # Provider. + attr_accessor :signup_policy_name + + # @return [String] Signin Policy Name. Only applies to AAD B2C Identity + # Provider. + attr_accessor :signin_policy_name + + # @return [String] Profile Editing Policy Name. Only applies to AAD B2C + # Identity Provider. + attr_accessor :profile_editing_policy_name + + # @return [String] Password Reset Policy Name. Only applies to AAD B2C + # Identity Provider. + attr_accessor :password_reset_policy_name + + + # + # Mapper for IdentityProviderBaseParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'IdentityProviderBaseParameters', + type: { + name: 'Composite', + class_name: 'IdentityProviderBaseParameters', + model_properties: { + type: { + required: false, + serialized_name: 'type', + type: { + name: 'String' + } + }, + allowed_tenants: { + required: false, + serialized_name: 'allowedTenants', + constraints: { + MaxItems: 32 + }, + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + signup_policy_name: { + required: false, + serialized_name: 'signupPolicyName', + constraints: { + MinLength: 1 + }, + type: { + name: 'String' + } + }, + signin_policy_name: { + required: false, + serialized_name: 'signinPolicyName', + constraints: { + MinLength: 1 + }, + type: { + name: 'String' + } + }, + profile_editing_policy_name: { + required: false, + serialized_name: 'profileEditingPolicyName', + constraints: { + MinLength: 1 + }, + type: { + name: 'String' + } + }, + password_reset_policy_name: { + required: false, + serialized_name: 'passwordResetPolicyName', + constraints: { + MinLength: 1 + }, + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_contract.rb new file mode 100644 index 0000000000..1a4be45b4e --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_contract.rb @@ -0,0 +1,178 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Identity Provider details. + # + class IdentityProviderContract < Resource + + include MsRestAzure + + # @return [IdentityProviderType] Identity Provider Type identifier. + # Possible values include: 'facebook', 'google', 'microsoft', 'twitter', + # 'aad', 'aadB2C' + attr_accessor :identity_provider_contract_type + + # @return [Array] List of Allowed Tenants when configuring Azure + # Active Directory login. + attr_accessor :allowed_tenants + + # @return [String] Signup Policy Name. Only applies to AAD B2C Identity + # Provider. + attr_accessor :signup_policy_name + + # @return [String] Signin Policy Name. Only applies to AAD B2C Identity + # Provider. + attr_accessor :signin_policy_name + + # @return [String] Profile Editing Policy Name. Only applies to AAD B2C + # Identity Provider. + attr_accessor :profile_editing_policy_name + + # @return [String] Password Reset Policy Name. Only applies to AAD B2C + # Identity Provider. + attr_accessor :password_reset_policy_name + + # @return [String] Client Id of the Application in the external Identity + # Provider. It is App ID for Facebook login, Client ID for Google login, + # App ID for Microsoft. + attr_accessor :client_id + + # @return [String] Client secret of the Application in external Identity + # Provider, used to authenticate login request. For example, it is App + # Secret for Facebook login, API Key for Google login, Public Key for + # Microsoft. + attr_accessor :client_secret + + + # + # Mapper for IdentityProviderContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'IdentityProviderContract', + type: { + name: 'Composite', + class_name: 'IdentityProviderContract', + 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' + } + }, + identity_provider_contract_type: { + required: false, + serialized_name: 'properties.type', + type: { + name: 'String' + } + }, + allowed_tenants: { + required: false, + serialized_name: 'properties.allowedTenants', + constraints: { + MaxItems: 32 + }, + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + signup_policy_name: { + required: false, + serialized_name: 'properties.signupPolicyName', + constraints: { + MinLength: 1 + }, + type: { + name: 'String' + } + }, + signin_policy_name: { + required: false, + serialized_name: 'properties.signinPolicyName', + constraints: { + MinLength: 1 + }, + type: { + name: 'String' + } + }, + profile_editing_policy_name: { + required: false, + serialized_name: 'properties.profileEditingPolicyName', + constraints: { + MinLength: 1 + }, + type: { + name: 'String' + } + }, + password_reset_policy_name: { + required: false, + serialized_name: 'properties.passwordResetPolicyName', + constraints: { + MinLength: 1 + }, + type: { + name: 'String' + } + }, + client_id: { + required: true, + serialized_name: 'properties.clientId', + constraints: { + MinLength: 1 + }, + type: { + name: 'String' + } + }, + client_secret: { + required: true, + serialized_name: 'properties.clientSecret', + constraints: { + MinLength: 1 + }, + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_list.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_list.rb new file mode 100644 index 0000000000..ae535243ab --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_list.rb @@ -0,0 +1,95 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # List of all the Identity Providers configured on the service instance. + # + class IdentityProviderList + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Identity Provider + # configuration values. + attr_accessor :value + + # @return [String] Next page link if any. + 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 [IdentityProviderList] 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 IdentityProviderList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'IdentityProviderList', + type: { + name: 'Composite', + class_name: 'IdentityProviderList', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'IdentityProviderContractElementType', + type: { + name: 'Composite', + class_name: 'IdentityProviderContract' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_type.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_type.rb new file mode 100644 index 0000000000..4c62183d77 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_type.rb @@ -0,0 +1,20 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for IdentityProviderType + # + module IdentityProviderType + Facebook = "facebook" + Google = "google" + Microsoft = "microsoft" + Twitter = "twitter" + Aad = "aad" + AadB2C = "aadB2C" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_update_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_update_parameters.rb new file mode 100644 index 0000000000..f4673f04c0 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_update_parameters.rb @@ -0,0 +1,154 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Parameters supplied to update Identity Provider + # + class IdentityProviderUpdateParameters + + include MsRestAzure + + # @return [IdentityProviderType] Identity Provider Type identifier. + # Possible values include: 'facebook', 'google', 'microsoft', 'twitter', + # 'aad', 'aadB2C' + attr_accessor :type + + # @return [Array] List of Allowed Tenants when configuring Azure + # Active Directory login. + attr_accessor :allowed_tenants + + # @return [String] Signup Policy Name. Only applies to AAD B2C Identity + # Provider. + attr_accessor :signup_policy_name + + # @return [String] Signin Policy Name. Only applies to AAD B2C Identity + # Provider. + attr_accessor :signin_policy_name + + # @return [String] Profile Editing Policy Name. Only applies to AAD B2C + # Identity Provider. + attr_accessor :profile_editing_policy_name + + # @return [String] Password Reset Policy Name. Only applies to AAD B2C + # Identity Provider. + attr_accessor :password_reset_policy_name + + # @return [String] Client Id of the Application in the external Identity + # Provider. It is App ID for Facebook login, Client ID for Google login, + # App ID for Microsoft. + attr_accessor :client_id + + # @return [String] Client secret of the Application in external Identity + # Provider, used to authenticate login request. For example, it is App + # Secret for Facebook login, API Key for Google login, Public Key for + # Microsoft. + attr_accessor :client_secret + + + # + # Mapper for IdentityProviderUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'IdentityProviderUpdateParameters', + type: { + name: 'Composite', + class_name: 'IdentityProviderUpdateParameters', + model_properties: { + type: { + required: false, + serialized_name: 'properties.type', + type: { + name: 'String' + } + }, + allowed_tenants: { + required: false, + serialized_name: 'properties.allowedTenants', + constraints: { + MaxItems: 32 + }, + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + signup_policy_name: { + required: false, + serialized_name: 'properties.signupPolicyName', + constraints: { + MinLength: 1 + }, + type: { + name: 'String' + } + }, + signin_policy_name: { + required: false, + serialized_name: 'properties.signinPolicyName', + constraints: { + MinLength: 1 + }, + type: { + name: 'String' + } + }, + profile_editing_policy_name: { + required: false, + serialized_name: 'properties.profileEditingPolicyName', + constraints: { + MinLength: 1 + }, + type: { + name: 'String' + } + }, + password_reset_policy_name: { + required: false, + serialized_name: 'properties.passwordResetPolicyName', + constraints: { + MinLength: 1 + }, + type: { + name: 'String' + } + }, + client_id: { + required: false, + serialized_name: 'properties.clientId', + constraints: { + MinLength: 1 + }, + type: { + name: 'String' + } + }, + client_secret: { + required: false, + serialized_name: 'properties.clientSecret', + constraints: { + MinLength: 1 + }, + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_attachment_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_attachment_collection.rb new file mode 100644 index 0000000000..13d9c46b8c --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_attachment_collection.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Issue Attachment list representation. + # + class IssueAttachmentCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Issue Attachment values. + attr_accessor :value + + # @return [String] Next page link if any. + 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 [IssueAttachmentCollection] 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 IssueAttachmentCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'IssueAttachmentCollection', + type: { + name: 'Composite', + class_name: 'IssueAttachmentCollection', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'IssueAttachmentContractElementType', + type: { + name: 'Composite', + class_name: 'IssueAttachmentContract' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_attachment_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_attachment_contract.rb new file mode 100644 index 0000000000..3f4e0f0ac4 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_attachment_contract.rb @@ -0,0 +1,90 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Issue Attachment Contract details. + # + class IssueAttachmentContract < Resource + + include MsRestAzure + + # @return [String] Filename by which the binary data will be saved. + attr_accessor :title + + # @return [String] Either 'link' if content is provided via an HTTP link + # or the MIME type of the Base64-encoded binary data provided in the + # 'content' property. + attr_accessor :content_format + + # @return [String] An HTTP link or Base64-encoded binary data. + attr_accessor :content + + + # + # Mapper for IssueAttachmentContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'IssueAttachmentContract', + type: { + name: 'Composite', + class_name: 'IssueAttachmentContract', + 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' + } + }, + title: { + required: true, + serialized_name: 'properties.title', + type: { + name: 'String' + } + }, + content_format: { + required: true, + serialized_name: 'properties.contentFormat', + type: { + name: 'String' + } + }, + content: { + required: true, + serialized_name: 'properties.content', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_collection.rb new file mode 100644 index 0000000000..bf40e69e90 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_collection.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Issue list representation. + # + class IssueCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Issue values. + attr_accessor :value + + # @return [String] Next page link if any. + 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 [IssueCollection] 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 IssueCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'IssueCollection', + type: { + name: 'Composite', + class_name: 'IssueCollection', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'IssueContractElementType', + type: { + name: 'Composite', + class_name: 'IssueContract' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_comment_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_comment_collection.rb new file mode 100644 index 0000000000..3a2da614b1 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_comment_collection.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Issue Comment list representation. + # + class IssueCommentCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Issue Comment values. + attr_accessor :value + + # @return [String] Next page link if any. + 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 [IssueCommentCollection] 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 IssueCommentCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'IssueCommentCollection', + type: { + name: 'Composite', + class_name: 'IssueCommentCollection', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'IssueCommentContractElementType', + type: { + name: 'Composite', + class_name: 'IssueCommentContract' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_comment_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_comment_contract.rb new file mode 100644 index 0000000000..86993a80b5 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_comment_contract.rb @@ -0,0 +1,89 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Issue Comment Contract details. + # + class IssueCommentContract < Resource + + include MsRestAzure + + # @return [String] Comment text. + attr_accessor :text + + # @return [DateTime] Date and time when the comment was created. + attr_accessor :created_date + + # @return [String] A resource identifier for the user who left the + # comment. + attr_accessor :user_id + + + # + # Mapper for IssueCommentContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'IssueCommentContract', + type: { + name: 'Composite', + class_name: 'IssueCommentContract', + 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' + } + }, + text: { + required: true, + serialized_name: 'properties.text', + type: { + name: 'String' + } + }, + created_date: { + required: false, + serialized_name: 'properties.createdDate', + type: { + name: 'DateTime' + } + }, + user_id: { + required: true, + serialized_name: 'properties.userId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_contract.rb new file mode 100644 index 0000000000..3f5e0f7d2d --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_contract.rb @@ -0,0 +1,120 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Issue Contract details. + # + class IssueContract < Resource + + include MsRestAzure + + # @return [String] The issue title. + attr_accessor :title + + # @return [String] Text describing the issue. + attr_accessor :description + + # @return [DateTime] Date and time when the issue was created. + attr_accessor :created_date + + # @return [State] Status of the issue. Possible values include: + # 'proposed', 'open', 'removed', 'resolved', 'closed' + attr_accessor :state + + # @return [String] A resource identifier for the user created the issue. + attr_accessor :user_id + + # @return [String] A resource identifier for the API the issue was + # created for. + attr_accessor :api_id + + + # + # Mapper for IssueContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'IssueContract', + type: { + name: 'Composite', + class_name: 'IssueContract', + 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' + } + }, + title: { + required: true, + serialized_name: 'properties.title', + type: { + name: 'String' + } + }, + description: { + required: true, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + created_date: { + required: false, + serialized_name: 'properties.createdDate', + type: { + name: 'DateTime' + } + }, + state: { + required: false, + serialized_name: 'properties.state', + type: { + name: 'String' + } + }, + user_id: { + required: true, + serialized_name: 'properties.userId', + type: { + name: 'String' + } + }, + api_id: { + required: false, + serialized_name: 'properties.apiId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/key_type.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/key_type.rb new file mode 100644 index 0000000000..197d7b6e02 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/key_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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for KeyType + # + module KeyType + Primary = "primary" + Secondary = "secondary" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/logger_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/logger_collection.rb new file mode 100644 index 0000000000..2f9a5db107 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/logger_collection.rb @@ -0,0 +1,104 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Logger list representation. + # + class LoggerCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Logger values. + attr_accessor :value + + # @return [Integer] Total record count number across all pages. + attr_accessor :count + + # @return [String] Next page link if any. + 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 [LoggerCollection] 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 LoggerCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LoggerCollection', + type: { + name: 'Composite', + class_name: 'LoggerCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'LoggerContractElementType', + type: { + name: 'Composite', + class_name: 'LoggerContract' + } + } + } + }, + count: { + required: false, + serialized_name: 'count', + type: { + name: 'Number' + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/logger_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/logger_contract.rb new file mode 100644 index 0000000000..972d3644b4 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/logger_contract.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Logger details. + # + class LoggerContract < Resource + + include MsRestAzure + + # @return [LoggerType] Logger type. Possible values include: + # 'azureEventHub', 'applicationInsights' + attr_accessor :logger_type + + # @return [String] Logger description. + attr_accessor :description + + # @return [Hash{String => String}] The name and SendRule connection + # string of the event hub for azureEventHub logger. + # Instrumentation key for applicationInsights logger. + attr_accessor :credentials + + # @return [Boolean] Whether records are buffered in the logger before + # publishing. Default is assumed to be true. + attr_accessor :is_buffered + + + # + # Mapper for LoggerContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LoggerContract', + type: { + name: 'Composite', + class_name: 'LoggerContract', + 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' + } + }, + logger_type: { + required: true, + serialized_name: 'properties.loggerType', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + constraints: { + MaxLength: 256 + }, + type: { + name: 'String' + } + }, + credentials: { + required: true, + serialized_name: 'properties.credentials', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + is_buffered: { + required: false, + serialized_name: 'properties.isBuffered', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/logger_type.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/logger_type.rb new file mode 100644 index 0000000000..f05c15062e --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/logger_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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for LoggerType + # + module LoggerType + AzureEventHub = "azureEventHub" + ApplicationInsights = "applicationInsights" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/logger_update_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/logger_update_contract.rb new file mode 100644 index 0000000000..0f39e6e791 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/logger_update_contract.rb @@ -0,0 +1,83 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Logger update contract. + # + class LoggerUpdateContract + + include MsRestAzure + + # @return [LoggerType] Logger type. Possible values include: + # 'azureEventHub', 'applicationInsights' + attr_accessor :logger_type + + # @return [String] Logger description. + attr_accessor :description + + # @return [Hash{String => String}] Logger credentials. + attr_accessor :credentials + + # @return [Boolean] Whether records are buffered in the logger before + # publishing. Default is assumed to be true. + attr_accessor :is_buffered + + + # + # Mapper for LoggerUpdateContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LoggerUpdateContract', + type: { + name: 'Composite', + class_name: 'LoggerUpdateContract', + model_properties: { + logger_type: { + required: false, + serialized_name: 'properties.loggerType', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + credentials: { + required: false, + serialized_name: 'properties.credentials', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + is_buffered: { + required: false, + serialized_name: 'properties.isBuffered', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/name_availability_reason.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/name_availability_reason.rb new file mode 100644 index 0000000000..5932c8490d --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/name_availability_reason.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for NameAvailabilityReason + # + module NameAvailabilityReason + Valid = "Valid" + Invalid = "Invalid" + AlreadyExists = "AlreadyExists" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/network_status_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/network_status_contract.rb new file mode 100644 index 0000000000..4f0a49376e --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/network_status_contract.rb @@ -0,0 +1,70 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Network Status details. + # + class NetworkStatusContract + + include MsRestAzure + + # @return [Array] Gets the list of DNS servers IPV4 addresses. + attr_accessor :dns_servers + + # @return [Array] Gets the list of + # Connectivity Status to the Resources on which the service depends upon. + attr_accessor :connectivity_status + + + # + # Mapper for NetworkStatusContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NetworkStatusContract', + type: { + name: 'Composite', + class_name: 'NetworkStatusContract', + model_properties: { + dns_servers: { + required: true, + serialized_name: 'dnsServers', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + connectivity_status: { + required: true, + serialized_name: 'connectivityStatus', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ConnectivityStatusContractElementType', + type: { + name: 'Composite', + class_name: 'ConnectivityStatusContract' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/network_status_contract_by_location.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/network_status_contract_by_location.rb new file mode 100644 index 0000000000..f387d98e99 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/network_status_contract_by_location.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Network Status in the Location + # + class NetworkStatusContractByLocation + + include MsRestAzure + + # @return [String] Location of service + attr_accessor :location + + # @return [NetworkStatusContract] Network status in Location + attr_accessor :network_status + + + # + # Mapper for NetworkStatusContractByLocation class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NetworkStatusContractByLocation', + type: { + name: 'Composite', + class_name: 'NetworkStatusContractByLocation', + model_properties: { + location: { + required: false, + serialized_name: 'location', + constraints: { + MinLength: 1 + }, + type: { + name: 'String' + } + }, + network_status: { + required: false, + serialized_name: 'networkStatus', + type: { + name: 'Composite', + class_name: 'NetworkStatusContract' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/notification_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/notification_collection.rb new file mode 100644 index 0000000000..92520d7220 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/notification_collection.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Notification list representation. + # + class NotificationCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Page values. + attr_accessor :value + + # @return [String] Next page link if any. + 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 [NotificationCollection] 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 NotificationCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NotificationCollection', + type: { + name: 'Composite', + class_name: 'NotificationCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'NotificationContractElementType', + type: { + name: 'Composite', + class_name: 'NotificationContract' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/notification_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/notification_contract.rb new file mode 100644 index 0000000000..eff277bc97 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/notification_contract.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Notification details. + # + class NotificationContract < Resource + + include MsRestAzure + + # @return [String] Title of the Notification. + attr_accessor :title + + # @return [String] Description of the Notification. + attr_accessor :description + + # @return [RecipientsContractProperties] Recipient Parameter values. + attr_accessor :recipients + + + # + # Mapper for NotificationContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NotificationContract', + type: { + name: 'Composite', + class_name: 'NotificationContract', + 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' + } + }, + title: { + required: true, + serialized_name: 'properties.title', + constraints: { + MaxLength: 1000, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + recipients: { + required: false, + serialized_name: 'properties.recipients', + type: { + name: 'Composite', + class_name: 'RecipientsContractProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/notification_name.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/notification_name.rb new file mode 100644 index 0000000000..3794be26ef --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/notification_name.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for NotificationName + # + module NotificationName + RequestPublisherNotificationMessage = "RequestPublisherNotificationMessage" + PurchasePublisherNotificationMessage = "PurchasePublisherNotificationMessage" + NewApplicationNotificationMessage = "NewApplicationNotificationMessage" + BCC = "BCC" + NewIssuePublisherNotificationMessage = "NewIssuePublisherNotificationMessage" + AccountClosedPublisher = "AccountClosedPublisher" + QuotaLimitApproachingPublisherNotificationMessage = "QuotaLimitApproachingPublisherNotificationMessage" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/oauth2authentication_settings_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/oauth2authentication_settings_contract.rb new file mode 100644 index 0000000000..17e4c8117f --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/oauth2authentication_settings_contract.rb @@ -0,0 +1,54 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # API OAuth2 Authentication settings details. + # + class OAuth2AuthenticationSettingsContract + + include MsRestAzure + + # @return [String] OAuth authorization server identifier. + attr_accessor :authorization_server_id + + # @return [String] operations scope. + attr_accessor :scope + + + # + # Mapper for OAuth2AuthenticationSettingsContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OAuth2AuthenticationSettingsContract', + type: { + name: 'Composite', + class_name: 'OAuth2AuthenticationSettingsContract', + model_properties: { + authorization_server_id: { + required: false, + serialized_name: 'authorizationServerId', + type: { + name: 'String' + } + }, + scope: { + required: false, + serialized_name: 'scope', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/open_id_authentication_settings_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/open_id_authentication_settings_contract.rb new file mode 100644 index 0000000000..9b8122eebd --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/open_id_authentication_settings_contract.rb @@ -0,0 +1,62 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # API OAuth2 Authentication settings details. + # + class OpenIdAuthenticationSettingsContract + + include MsRestAzure + + # @return [String] OAuth authorization server identifier. + attr_accessor :openid_provider_id + + # @return [Array] How to send token to the + # server. + attr_accessor :bearer_token_sending_methods + + + # + # Mapper for OpenIdAuthenticationSettingsContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OpenIdAuthenticationSettingsContract', + type: { + name: 'Composite', + class_name: 'OpenIdAuthenticationSettingsContract', + model_properties: { + openid_provider_id: { + required: false, + serialized_name: 'openidProviderId', + type: { + name: 'String' + } + }, + bearer_token_sending_methods: { + required: false, + serialized_name: 'bearerTokenSendingMethods', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'BearerTokenSendingMethodsElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/open_id_connect_provider_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/open_id_connect_provider_collection.rb new file mode 100644 index 0000000000..8ff06e7b15 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/open_id_connect_provider_collection.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged OpenIdProviders list representation. + # + class OpenIdConnectProviderCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Page values. + attr_accessor :value + + # @return [String] Next page link if any. + 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 [OpenIdConnectProviderCollection] 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 OpenIdConnectProviderCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OpenIdConnectProviderCollection', + type: { + name: 'Composite', + class_name: 'OpenIdConnectProviderCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'OpenidConnectProviderContractElementType', + type: { + name: 'Composite', + class_name: 'OpenidConnectProviderContract' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/openid_connect_provider_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/openid_connect_provider_contract.rb new file mode 100644 index 0000000000..ff73fc9ef9 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/openid_connect_provider_contract.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # OpenId Connect Provider details. + # + class OpenidConnectProviderContract < Resource + + include MsRestAzure + + # @return [String] User-friendly OpenID Connect Provider name. + attr_accessor :display_name + + # @return [String] User-friendly description of OpenID Connect Provider. + attr_accessor :description + + # @return [String] Metadata endpoint URI. + attr_accessor :metadata_endpoint + + # @return [String] Client ID of developer console which is the client + # application. + attr_accessor :client_id + + # @return [String] Client Secret of developer console which is the client + # application. + attr_accessor :client_secret + + + # + # Mapper for OpenidConnectProviderContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OpenidConnectProviderContract', + type: { + name: 'Composite', + class_name: 'OpenidConnectProviderContract', + 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' + } + }, + display_name: { + required: true, + serialized_name: 'properties.displayName', + constraints: { + MaxLength: 50 + }, + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + metadata_endpoint: { + required: true, + serialized_name: 'properties.metadataEndpoint', + type: { + name: 'String' + } + }, + client_id: { + required: true, + serialized_name: 'properties.clientId', + type: { + name: 'String' + } + }, + client_secret: { + required: false, + serialized_name: 'properties.clientSecret', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/openid_connect_provider_update_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/openid_connect_provider_update_contract.rb new file mode 100644 index 0000000000..700f9a9bbc --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/openid_connect_provider_update_contract.rb @@ -0,0 +1,89 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Parameters supplied to the Update OpenID Connect Provider operation. + # + class OpenidConnectProviderUpdateContract + + include MsRestAzure + + # @return [String] User-friendly OpenID Connect Provider name. + attr_accessor :display_name + + # @return [String] User-friendly description of OpenID Connect Provider. + attr_accessor :description + + # @return [String] Metadata endpoint URI. + attr_accessor :metadata_endpoint + + # @return [String] Client ID of developer console which is the client + # application. + attr_accessor :client_id + + # @return [String] Client Secret of developer console which is the client + # application. + attr_accessor :client_secret + + + # + # Mapper for OpenidConnectProviderUpdateContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OpenidConnectProviderUpdateContract', + type: { + name: 'Composite', + class_name: 'OpenidConnectProviderUpdateContract', + model_properties: { + display_name: { + required: false, + serialized_name: 'properties.displayName', + constraints: { + MaxLength: 50 + }, + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + metadata_endpoint: { + required: false, + serialized_name: 'properties.metadataEndpoint', + type: { + name: 'String' + } + }, + client_id: { + required: false, + serialized_name: 'properties.clientId', + type: { + name: 'String' + } + }, + client_secret: { + required: false, + serialized_name: 'properties.clientSecret', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation.rb new file mode 100644 index 0000000000..013e8ae7f9 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # REST API operation + # + class Operation + + include MsRestAzure + + # @return [String] Operation name: {provider}/{resource}/{operation} + attr_accessor :name + + # @return [OperationDisplay] The object that describes the operation. + attr_accessor :display + + # @return [String] The operation origin. + attr_accessor :origin + + # @return The operation properties. + attr_accessor :properties + + + # + # Mapper for Operation class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Operation', + type: { + name: 'Composite', + class_name: 'Operation', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display: { + required: false, + serialized_name: 'display', + type: { + name: 'Composite', + class_name: 'OperationDisplay' + } + }, + origin: { + required: false, + serialized_name: 'origin', + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Object' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_collection.rb new file mode 100644 index 0000000000..b318d19961 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_collection.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Operation list representation. + # + class OperationCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Page values. + attr_accessor :value + + # @return [String] Next page link if any. + 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 [OperationCollection] 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 OperationCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OperationCollection', + type: { + name: 'Composite', + class_name: 'OperationCollection', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'OperationContractElementType', + type: { + name: 'Composite', + class_name: 'OperationContract' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_contract.rb new file mode 100644 index 0000000000..67fd00a98a --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_contract.rb @@ -0,0 +1,171 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Api Operation details. + # + class OperationContract < Resource + + include MsRestAzure + + # @return [Array] Collection of URL template + # parameters. + attr_accessor :template_parameters + + # @return [String] Description of the operation. May include HTML + # formatting tags. + attr_accessor :description + + # @return [RequestContract] An entity containing request details. + attr_accessor :request + + # @return [Array] Array of Operation responses. + attr_accessor :responses + + # @return [String] Operation Policies + attr_accessor :policies + + # @return [String] Operation Name. + attr_accessor :display_name + + # @return [String] A Valid HTTP Operation Method. Typical Http Methods + # like GET, PUT, POST but not limited by only them. + attr_accessor :method + + # @return [String] Relative URL template identifying the target resource + # for this operation. May include parameters. Example: + # /customers/{cid}/orders/{oid}/?date={date} + attr_accessor :url_template + + + # + # Mapper for OperationContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OperationContract', + type: { + name: 'Composite', + class_name: 'OperationContract', + 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' + } + }, + template_parameters: { + required: false, + serialized_name: 'properties.templateParameters', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ParameterContractElementType', + type: { + name: 'Composite', + class_name: 'ParameterContract' + } + } + } + }, + description: { + required: false, + serialized_name: 'properties.description', + constraints: { + MaxLength: 1000 + }, + type: { + name: 'String' + } + }, + request: { + required: false, + serialized_name: 'properties.request', + type: { + name: 'Composite', + class_name: 'RequestContract' + } + }, + responses: { + required: false, + serialized_name: 'properties.responses', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ResponseContractElementType', + type: { + name: 'Composite', + class_name: 'ResponseContract' + } + } + } + }, + policies: { + required: false, + serialized_name: 'properties.policies', + type: { + name: 'String' + } + }, + display_name: { + required: true, + serialized_name: 'properties.displayName', + constraints: { + MaxLength: 300, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + method: { + required: true, + serialized_name: 'properties.method', + type: { + name: 'String' + } + }, + url_template: { + required: true, + serialized_name: 'properties.urlTemplate', + constraints: { + MaxLength: 1000, + MinLength: 1 + }, + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_display.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_display.rb new file mode 100644 index 0000000000..328986f525 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_display.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # The object that describes the operation. + # + class OperationDisplay + + include MsRestAzure + + # @return [String] Friendly name of the resource provider + attr_accessor :provider + + # @return [String] Operation type: read, write, delete, listKeys/action, + # etc. + attr_accessor :operation + + # @return [String] Resource type on which the operation is performed. + attr_accessor :resource + + # @return [String] Friendly name of the operation + attr_accessor :description + + + # + # Mapper for OperationDisplay class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Operation_display', + type: { + name: 'Composite', + class_name: 'OperationDisplay', + model_properties: { + provider: { + required: false, + serialized_name: 'provider', + type: { + name: 'String' + } + }, + operation: { + required: false, + serialized_name: 'operation', + type: { + name: 'String' + } + }, + resource: { + required: false, + serialized_name: 'resource', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_entity_base_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_entity_base_contract.rb new file mode 100644 index 0000000000..6813f6337d --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_entity_base_contract.rb @@ -0,0 +1,106 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Api Operation Entity Base Contract details. + # + class OperationEntityBaseContract + + include MsRestAzure + + # @return [Array] Collection of URL template + # parameters. + attr_accessor :template_parameters + + # @return [String] Description of the operation. May include HTML + # formatting tags. + attr_accessor :description + + # @return [RequestContract] An entity containing request details. + attr_accessor :request + + # @return [Array] Array of Operation responses. + attr_accessor :responses + + # @return [String] Operation Policies + attr_accessor :policies + + + # + # Mapper for OperationEntityBaseContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OperationEntityBaseContract', + type: { + name: 'Composite', + class_name: 'OperationEntityBaseContract', + model_properties: { + template_parameters: { + required: false, + serialized_name: 'templateParameters', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ParameterContractElementType', + type: { + name: 'Composite', + class_name: 'ParameterContract' + } + } + } + }, + description: { + required: false, + serialized_name: 'description', + constraints: { + MaxLength: 1000 + }, + type: { + name: 'String' + } + }, + request: { + required: false, + serialized_name: 'request', + type: { + name: 'Composite', + class_name: 'RequestContract' + } + }, + responses: { + required: false, + serialized_name: 'responses', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ResponseContractElementType', + type: { + name: 'Composite', + class_name: 'ResponseContract' + } + } + } + }, + policies: { + required: false, + serialized_name: 'policies', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_list_result.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_list_result.rb new file mode 100644 index 0000000000..fa698d5299 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_list_result.rb @@ -0,0 +1,97 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Result of the request to list REST API operations. It contains a list of + # operations and a URL nextLink to get the next set of results. + # + class OperationListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] List of operations supported by the resource + # provider. + attr_accessor :value + + # @return [String] URL to get the next set of operation list results if + # there are any. + 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 [OperationListResult] 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 OperationListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OperationListResult', + type: { + name: 'Composite', + class_name: 'OperationListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'OperationElementType', + type: { + name: 'Composite', + class_name: 'Operation' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_result_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_result_contract.rb new file mode 100644 index 0000000000..b5cb7d42d5 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_result_contract.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Operation Result. + # + class OperationResultContract + + include MsRestAzure + + # @return [String] Operation result identifier. + attr_accessor :id + + # @return [AsyncOperationStatus] Status of an async operation. Possible + # values include: 'Started', 'InProgress', 'Succeeded', 'Failed' + attr_accessor :status + + # @return [DateTime] Start time of an async operation. The date conforms + # to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO + # 8601 standard. + # + attr_accessor :started + + # @return [DateTime] Last update time of an async operation. The date + # conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified + # by the ISO 8601 standard. + # + attr_accessor :updated + + # @return [String] Optional result info. + attr_accessor :result_info + + # @return [ErrorResponseBody] Error Body Contract + attr_accessor :error + + # @return [Array] This property if only + # provided as part of the TenantConfiguration_Validate operation. It + # contains the log the entities which will be updated/created/deleted as + # part of the TenantConfiguration_Deploy operation. + attr_accessor :action_log + + + # + # Mapper for OperationResultContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OperationResultContract', + type: { + name: 'Composite', + class_name: 'OperationResultContract', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + status: { + required: false, + serialized_name: 'status', + type: { + name: 'Enum', + module: 'AsyncOperationStatus' + } + }, + started: { + required: false, + serialized_name: 'started', + type: { + name: 'DateTime' + } + }, + updated: { + required: false, + serialized_name: 'updated', + type: { + name: 'DateTime' + } + }, + result_info: { + required: false, + serialized_name: 'resultInfo', + type: { + name: 'String' + } + }, + error: { + required: false, + serialized_name: 'error', + type: { + name: 'Composite', + class_name: 'ErrorResponseBody' + } + }, + action_log: { + required: false, + read_only: true, + serialized_name: 'actionLog', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'OperationResultLogItemContractElementType', + type: { + name: 'Composite', + class_name: 'OperationResultLogItemContract' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_result_log_item_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_result_log_item_contract.rb new file mode 100644 index 0000000000..6af9929e01 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_result_log_item_contract.rb @@ -0,0 +1,65 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Log of the entity being created, updated or deleted. + # + class OperationResultLogItemContract + + include MsRestAzure + + # @return [String] The type of entity contract. + attr_accessor :object_type + + # @return [String] Action like create/update/delete. + attr_accessor :action + + # @return [String] Identifier of the entity being + # created/updated/deleted. + attr_accessor :object_key + + + # + # Mapper for OperationResultLogItemContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OperationResultLogItemContract', + type: { + name: 'Composite', + class_name: 'OperationResultLogItemContract', + model_properties: { + object_type: { + required: false, + serialized_name: 'objectType', + type: { + name: 'String' + } + }, + action: { + required: false, + serialized_name: 'action', + type: { + name: 'String' + } + }, + object_key: { + required: false, + serialized_name: 'objectKey', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_tag_resource_contract_properties.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_tag_resource_contract_properties.rb new file mode 100644 index 0000000000..8e501c6781 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_tag_resource_contract_properties.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Operation Entity contract Properties. + # + class OperationTagResourceContractProperties + + include MsRestAzure + + # @return [String] Identifier of the operation in form + # /operations/{operationId}. + attr_accessor :id + + # @return [String] Operation name. + attr_accessor :name + + # @return [String] Api Name. + attr_accessor :api_name + + # @return [String] Api Revision. + attr_accessor :api_revision + + # @return [String] Api Version. + attr_accessor :api_version + + # @return [String] Operation Description. + attr_accessor :description + + # @return [String] A Valid HTTP Operation Method. Typical Http Methods + # like GET, PUT, POST but not limited by only them. + attr_accessor :method + + # @return [String] Relative URL template identifying the target resource + # for this operation. May include parameters. Example: + # /customers/{cid}/orders/{oid}/?date={date} + attr_accessor :url_template + + + # + # Mapper for OperationTagResourceContractProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OperationTagResourceContractProperties', + type: { + name: 'Composite', + class_name: 'OperationTagResourceContractProperties', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + api_name: { + required: false, + read_only: true, + serialized_name: 'apiName', + type: { + name: 'String' + } + }, + api_revision: { + required: false, + read_only: true, + serialized_name: 'apiRevision', + type: { + name: 'String' + } + }, + api_version: { + required: false, + read_only: true, + serialized_name: 'apiVersion', + type: { + name: 'String' + } + }, + description: { + required: false, + read_only: true, + serialized_name: 'description', + type: { + name: 'String' + } + }, + method: { + required: false, + read_only: true, + serialized_name: 'method', + type: { + name: 'String' + } + }, + url_template: { + required: false, + read_only: true, + serialized_name: 'urlTemplate', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_update_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_update_contract.rb new file mode 100644 index 0000000000..1e504ca3af --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_update_contract.rb @@ -0,0 +1,147 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Api Operation Update Contract details. + # + class OperationUpdateContract + + include MsRestAzure + + # @return [Array] Collection of URL template + # parameters. + attr_accessor :template_parameters + + # @return [String] Description of the operation. May include HTML + # formatting tags. + attr_accessor :description + + # @return [RequestContract] An entity containing request details. + attr_accessor :request + + # @return [Array] Array of Operation responses. + attr_accessor :responses + + # @return [String] Operation Policies + attr_accessor :policies + + # @return [String] Operation Name. + attr_accessor :display_name + + # @return [String] A Valid HTTP Operation Method. Typical Http Methods + # like GET, PUT, POST but not limited by only them. + attr_accessor :method + + # @return [String] Relative URL template identifying the target resource + # for this operation. May include parameters. Example: + # /customers/{cid}/orders/{oid}/?date={date} + attr_accessor :url_template + + + # + # Mapper for OperationUpdateContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OperationUpdateContract', + type: { + name: 'Composite', + class_name: 'OperationUpdateContract', + model_properties: { + template_parameters: { + required: false, + serialized_name: 'properties.templateParameters', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ParameterContractElementType', + type: { + name: 'Composite', + class_name: 'ParameterContract' + } + } + } + }, + description: { + required: false, + serialized_name: 'properties.description', + constraints: { + MaxLength: 1000 + }, + type: { + name: 'String' + } + }, + request: { + required: false, + serialized_name: 'properties.request', + type: { + name: 'Composite', + class_name: 'RequestContract' + } + }, + responses: { + required: false, + serialized_name: 'properties.responses', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ResponseContractElementType', + type: { + name: 'Composite', + class_name: 'ResponseContract' + } + } + } + }, + policies: { + required: false, + serialized_name: 'properties.policies', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + constraints: { + MaxLength: 300, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + method: { + required: false, + serialized_name: 'properties.method', + type: { + name: 'String' + } + }, + url_template: { + required: false, + serialized_name: 'properties.urlTemplate', + constraints: { + MaxLength: 1000, + MinLength: 1 + }, + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/parameter_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/parameter_contract.rb new file mode 100644 index 0000000000..e196cd2b41 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/parameter_contract.rb @@ -0,0 +1,101 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Operation parameters details. + # + class ParameterContract + + include MsRestAzure + + # @return [String] Parameter name. + attr_accessor :name + + # @return [String] Parameter description. + attr_accessor :description + + # @return [String] Parameter type. + attr_accessor :type + + # @return [String] Default parameter value. + attr_accessor :default_value + + # @return [Boolean] whether parameter is required or not. + attr_accessor :required + + # @return [Array] Parameter values. + attr_accessor :values + + + # + # Mapper for ParameterContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ParameterContract', + type: { + name: 'Composite', + class_name: 'ParameterContract', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'description', + type: { + name: 'String' + } + }, + type: { + required: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + default_value: { + required: false, + serialized_name: 'defaultValue', + type: { + name: 'String' + } + }, + required: { + required: false, + serialized_name: 'required', + type: { + name: 'Boolean' + } + }, + values: { + required: false, + serialized_name: 'values', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_collection.rb new file mode 100644 index 0000000000..3a382ab8a4 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_collection.rb @@ -0,0 +1,62 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # The response of the list policy operation. + # + class PolicyCollection + + include MsRestAzure + + # @return [Array] Policy Contract value. + attr_accessor :value + + # @return [String] Next page link if any. + attr_accessor :next_link + + + # + # Mapper for PolicyCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PolicyCollection', + type: { + name: 'Composite', + class_name: 'PolicyCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'PolicyContractElementType', + type: { + name: 'Composite', + class_name: 'PolicyContract' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_content_format.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_content_format.rb new file mode 100644 index 0000000000..99c9f3648c --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_content_format.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for PolicyContentFormat + # + module PolicyContentFormat + Xml = "xml" + XmlLink = "xml-link" + Rawxml = "rawxml" + RawxmlLink = "rawxml-link" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_contract.rb new file mode 100644 index 0000000000..d9bdc81cdf --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_contract.rb @@ -0,0 +1,81 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Policy Contract details. + # + class PolicyContract < Resource + + include MsRestAzure + + # @return [String] Json escaped Xml Encoded contents of the Policy. + attr_accessor :policy_content + + # @return [PolicyContentFormat] Format of the policyContent. Possible + # values include: 'xml', 'xml-link', 'rawxml', 'rawxml-link'. Default + # value: 'xml' . + attr_accessor :content_format + + + # + # Mapper for PolicyContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PolicyContract', + type: { + name: 'Composite', + class_name: 'PolicyContract', + 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' + } + }, + policy_content: { + required: true, + serialized_name: 'properties.policyContent', + type: { + name: 'String' + } + }, + content_format: { + required: false, + serialized_name: 'properties.contentFormat', + default_value: 'xml', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_scope_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_scope_contract.rb new file mode 100644 index 0000000000..ddd04df547 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_scope_contract.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for PolicyScopeContract + # + module PolicyScopeContract + Tenant = "Tenant" + Product = "Product" + Api = "Api" + Operation = "Operation" + All = "All" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_snippet_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_snippet_contract.rb new file mode 100644 index 0000000000..ae697a33ab --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_snippet_contract.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Policy snippet. + # + class PolicySnippetContract + + include MsRestAzure + + # @return [String] Snippet name. + attr_accessor :name + + # @return [String] Snippet content. + attr_accessor :content + + # @return [String] Snippet toolTip. + attr_accessor :tool_tip + + # @return [Integer] Binary OR value of the Snippet scope. + attr_accessor :scope + + + # + # Mapper for PolicySnippetContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PolicySnippetContract', + type: { + name: 'Composite', + class_name: 'PolicySnippetContract', + model_properties: { + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + content: { + required: false, + read_only: true, + serialized_name: 'content', + type: { + name: 'String' + } + }, + tool_tip: { + required: false, + read_only: true, + serialized_name: 'toolTip', + type: { + name: 'String' + } + }, + scope: { + required: false, + read_only: true, + serialized_name: 'scope', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_snippets_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_snippets_collection.rb new file mode 100644 index 0000000000..a26da46697 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_snippets_collection.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # The response of the list policy snippets operation. + # + class PolicySnippetsCollection + + include MsRestAzure + + # @return [Array] Policy snippet value. + attr_accessor :value + + + # + # Mapper for PolicySnippetsCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PolicySnippetsCollection', + type: { + name: 'Composite', + class_name: 'PolicySnippetsCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'PolicySnippetContractElementType', + type: { + name: 'Composite', + class_name: 'PolicySnippetContract' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/portal_delegation_settings.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/portal_delegation_settings.rb new file mode 100644 index 0000000000..08204cbabd --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/portal_delegation_settings.rb @@ -0,0 +1,103 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Delegation settings for a developer portal. + # + class PortalDelegationSettings < Resource + + include MsRestAzure + + # @return [String] A delegation Url. + attr_accessor :url + + # @return [String] A base64-encoded validation key to validate, that a + # request is coming from Azure API Management. + attr_accessor :validation_key + + # @return [SubscriptionsDelegationSettingsProperties] Subscriptions + # delegation settings. + attr_accessor :subscriptions + + # @return [RegistrationDelegationSettingsProperties] User registration + # delegation settings. + attr_accessor :user_registration + + + # + # Mapper for PortalDelegationSettings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PortalDelegationSettings', + type: { + name: 'Composite', + class_name: 'PortalDelegationSettings', + 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' + } + }, + url: { + required: false, + serialized_name: 'properties.url', + type: { + name: 'String' + } + }, + validation_key: { + required: false, + serialized_name: 'properties.validationKey', + type: { + name: 'String' + } + }, + subscriptions: { + required: false, + serialized_name: 'properties.subscriptions', + type: { + name: 'Composite', + class_name: 'SubscriptionsDelegationSettingsProperties' + } + }, + user_registration: { + required: false, + serialized_name: 'properties.userRegistration', + type: { + name: 'Composite', + class_name: 'RegistrationDelegationSettingsProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/portal_signin_settings.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/portal_signin_settings.rb new file mode 100644 index 0000000000..6ea43ab3d3 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/portal_signin_settings.rb @@ -0,0 +1,68 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Sign-In settings for the Developer Portal. + # + class PortalSigninSettings < Resource + + include MsRestAzure + + # @return [Boolean] Redirect Anonymous users to the Sign-In page. + attr_accessor :enabled + + + # + # Mapper for PortalSigninSettings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PortalSigninSettings', + type: { + name: 'Composite', + class_name: 'PortalSigninSettings', + 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' + } + }, + enabled: { + required: false, + serialized_name: 'properties.enabled', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/portal_signup_settings.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/portal_signup_settings.rb new file mode 100644 index 0000000000..473d0ecfa0 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/portal_signup_settings.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Sign-Up settings for a developer portal. + # + class PortalSignupSettings < Resource + + include MsRestAzure + + # @return [Boolean] Allow users to sign up on a developer portal. + attr_accessor :enabled + + # @return [TermsOfServiceProperties] Terms of service contract + # properties. + attr_accessor :terms_of_service + + + # + # Mapper for PortalSignupSettings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PortalSignupSettings', + type: { + name: 'Composite', + class_name: 'PortalSignupSettings', + 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' + } + }, + enabled: { + required: false, + serialized_name: 'properties.enabled', + type: { + name: 'Boolean' + } + }, + terms_of_service: { + required: false, + serialized_name: 'properties.termsOfService', + type: { + name: 'Composite', + class_name: 'TermsOfServiceProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_collection.rb new file mode 100644 index 0000000000..2d0a2882b8 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_collection.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Products list representation. + # + class ProductCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Page values. + attr_accessor :value + + # @return [String] Next page link if any. + 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 [ProductCollection] 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 ProductCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProductCollection', + type: { + name: 'Composite', + class_name: 'ProductCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ProductContractElementType', + type: { + name: 'Composite', + class_name: 'ProductContract' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_contract.rb new file mode 100644 index 0000000000..597ac4cf73 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_contract.rb @@ -0,0 +1,156 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Product details. + # + class ProductContract < Resource + + include MsRestAzure + + # @return [String] Product description. May include HTML formatting tags. + attr_accessor :description + + # @return [String] Product terms of use. Developers trying to subscribe + # to the product will be presented and required to accept these terms + # before they can complete the subscription process. + attr_accessor :terms + + # @return [Boolean] Whether a product subscription is required for + # accessing APIs included in this product. If true, the product is + # referred to as "protected" and a valid subscription key is required for + # a request to an API included in the product to succeed. If false, the + # product is referred to as "open" and requests to an API included in the + # product can be made without a subscription key. If property is omitted + # when creating a new product it's value is assumed to be true. + attr_accessor :subscription_required + + # @return [Boolean] whether subscription approval is required. If false, + # new subscriptions will be approved automatically enabling developers to + # call the product’s APIs immediately after subscribing. If true, + # administrators must manually approve the subscription before the + # developer can any of the product’s APIs. Can be present only if + # subscriptionRequired property is present and has a value of false. + attr_accessor :approval_required + + # @return [Integer] Whether the number of subscriptions a user can have + # to this product at the same time. Set to null or omit to allow + # unlimited per user subscriptions. Can be present only if + # subscriptionRequired property is present and has a value of false. + attr_accessor :subscriptions_limit + + # @return [ProductState] whether product is published or not. Published + # products are discoverable by users of developer portal. Non published + # products are visible only to administrators. Default state of Product + # is notPublished. Possible values include: 'notPublished', 'published' + attr_accessor :state + + # @return [String] Product name. + attr_accessor :display_name + + + # + # Mapper for ProductContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProductContract', + type: { + name: 'Composite', + class_name: 'ProductContract', + 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', + constraints: { + MaxLength: 1000, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + terms: { + required: false, + serialized_name: 'properties.terms', + type: { + name: 'String' + } + }, + subscription_required: { + required: false, + serialized_name: 'properties.subscriptionRequired', + type: { + name: 'Boolean' + } + }, + approval_required: { + required: false, + serialized_name: 'properties.approvalRequired', + type: { + name: 'Boolean' + } + }, + subscriptions_limit: { + required: false, + serialized_name: 'properties.subscriptionsLimit', + type: { + name: 'Number' + } + }, + state: { + required: false, + serialized_name: 'properties.state', + type: { + name: 'Enum', + module: 'ProductState' + } + }, + display_name: { + required: true, + serialized_name: 'properties.displayName', + constraints: { + MaxLength: 300, + MinLength: 1 + }, + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_entity_base_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_entity_base_parameters.rb new file mode 100644 index 0000000000..5e911b42a1 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_entity_base_parameters.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Product Entity Base Parameters + # + class ProductEntityBaseParameters + + include MsRestAzure + + # @return [String] Product description. May include HTML formatting tags. + attr_accessor :description + + # @return [String] Product terms of use. Developers trying to subscribe + # to the product will be presented and required to accept these terms + # before they can complete the subscription process. + attr_accessor :terms + + # @return [Boolean] Whether a product subscription is required for + # accessing APIs included in this product. If true, the product is + # referred to as "protected" and a valid subscription key is required for + # a request to an API included in the product to succeed. If false, the + # product is referred to as "open" and requests to an API included in the + # product can be made without a subscription key. If property is omitted + # when creating a new product it's value is assumed to be true. + attr_accessor :subscription_required + + # @return [Boolean] whether subscription approval is required. If false, + # new subscriptions will be approved automatically enabling developers to + # call the product’s APIs immediately after subscribing. If true, + # administrators must manually approve the subscription before the + # developer can any of the product’s APIs. Can be present only if + # subscriptionRequired property is present and has a value of false. + attr_accessor :approval_required + + # @return [Integer] Whether the number of subscriptions a user can have + # to this product at the same time. Set to null or omit to allow + # unlimited per user subscriptions. Can be present only if + # subscriptionRequired property is present and has a value of false. + attr_accessor :subscriptions_limit + + # @return [ProductState] whether product is published or not. Published + # products are discoverable by users of developer portal. Non published + # products are visible only to administrators. Default state of Product + # is notPublished. Possible values include: 'notPublished', 'published' + attr_accessor :state + + + # + # Mapper for ProductEntityBaseParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProductEntityBaseParameters', + type: { + name: 'Composite', + class_name: 'ProductEntityBaseParameters', + model_properties: { + description: { + required: false, + serialized_name: 'description', + constraints: { + MaxLength: 1000, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + terms: { + required: false, + serialized_name: 'terms', + type: { + name: 'String' + } + }, + subscription_required: { + required: false, + serialized_name: 'subscriptionRequired', + type: { + name: 'Boolean' + } + }, + approval_required: { + required: false, + serialized_name: 'approvalRequired', + type: { + name: 'Boolean' + } + }, + subscriptions_limit: { + required: false, + serialized_name: 'subscriptionsLimit', + type: { + name: 'Number' + } + }, + state: { + required: false, + serialized_name: 'state', + type: { + name: 'Enum', + module: 'ProductState' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_state.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_state.rb new file mode 100644 index 0000000000..71463a3149 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for ProductState + # + module ProductState + NotPublished = "notPublished" + Published = "published" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_tag_resource_contract_properties.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_tag_resource_contract_properties.rb new file mode 100644 index 0000000000..b4c643f894 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_tag_resource_contract_properties.rb @@ -0,0 +1,106 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Product profile. + # + class ProductTagResourceContractProperties < ProductEntityBaseParameters + + include MsRestAzure + + # @return [String] Identifier of the product in the form of + # /products/{productId} + attr_accessor :id + + # @return [String] Product name. + attr_accessor :name + + + # + # Mapper for ProductTagResourceContractProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProductTagResourceContractProperties', + type: { + name: 'Composite', + class_name: 'ProductTagResourceContractProperties', + model_properties: { + description: { + required: false, + serialized_name: 'description', + constraints: { + MaxLength: 1000, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + terms: { + required: false, + serialized_name: 'terms', + type: { + name: 'String' + } + }, + subscription_required: { + required: false, + serialized_name: 'subscriptionRequired', + type: { + name: 'Boolean' + } + }, + approval_required: { + required: false, + serialized_name: 'approvalRequired', + type: { + name: 'Boolean' + } + }, + subscriptions_limit: { + required: false, + serialized_name: 'subscriptionsLimit', + type: { + name: 'Number' + } + }, + state: { + required: false, + serialized_name: 'state', + type: { + name: 'Enum', + module: 'ProductState' + } + }, + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: true, + serialized_name: 'name', + constraints: { + MaxLength: 300, + MinLength: 1 + }, + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_update_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_update_parameters.rb new file mode 100644 index 0000000000..65db033075 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_update_parameters.rb @@ -0,0 +1,132 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Product Update parameters. + # + class ProductUpdateParameters + + include MsRestAzure + + # @return [String] Product description. May include HTML formatting tags. + attr_accessor :description + + # @return [String] Product terms of use. Developers trying to subscribe + # to the product will be presented and required to accept these terms + # before they can complete the subscription process. + attr_accessor :terms + + # @return [Boolean] Whether a product subscription is required for + # accessing APIs included in this product. If true, the product is + # referred to as "protected" and a valid subscription key is required for + # a request to an API included in the product to succeed. If false, the + # product is referred to as "open" and requests to an API included in the + # product can be made without a subscription key. If property is omitted + # when creating a new product it's value is assumed to be true. + attr_accessor :subscription_required + + # @return [Boolean] whether subscription approval is required. If false, + # new subscriptions will be approved automatically enabling developers to + # call the product’s APIs immediately after subscribing. If true, + # administrators must manually approve the subscription before the + # developer can any of the product’s APIs. Can be present only if + # subscriptionRequired property is present and has a value of false. + attr_accessor :approval_required + + # @return [Integer] Whether the number of subscriptions a user can have + # to this product at the same time. Set to null or omit to allow + # unlimited per user subscriptions. Can be present only if + # subscriptionRequired property is present and has a value of false. + attr_accessor :subscriptions_limit + + # @return [ProductState] whether product is published or not. Published + # products are discoverable by users of developer portal. Non published + # products are visible only to administrators. Default state of Product + # is notPublished. Possible values include: 'notPublished', 'published' + attr_accessor :state + + # @return [String] Product name. + attr_accessor :display_name + + + # + # Mapper for ProductUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProductUpdateParameters', + type: { + name: 'Composite', + class_name: 'ProductUpdateParameters', + model_properties: { + description: { + required: false, + serialized_name: 'properties.description', + constraints: { + MaxLength: 1000, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + terms: { + required: false, + serialized_name: 'properties.terms', + type: { + name: 'String' + } + }, + subscription_required: { + required: false, + serialized_name: 'properties.subscriptionRequired', + type: { + name: 'Boolean' + } + }, + approval_required: { + required: false, + serialized_name: 'properties.approvalRequired', + type: { + name: 'Boolean' + } + }, + subscriptions_limit: { + required: false, + serialized_name: 'properties.subscriptionsLimit', + type: { + name: 'Number' + } + }, + state: { + required: false, + serialized_name: 'properties.state', + type: { + name: 'Enum', + module: 'ProductState' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + constraints: { + MaxLength: 300, + MinLength: 1 + }, + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/property_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/property_collection.rb new file mode 100644 index 0000000000..5fbb8adf8e --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/property_collection.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Property list representation. + # + class PropertyCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Page values. + attr_accessor :value + + # @return [String] Next page link if any. + 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 [PropertyCollection] 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 PropertyCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PropertyCollection', + type: { + name: 'Composite', + class_name: 'PropertyCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'PropertyContractElementType', + type: { + name: 'Composite', + class_name: 'PropertyContract' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/property_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/property_contract.rb new file mode 100644 index 0000000000..89871b4db6 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/property_contract.rb @@ -0,0 +1,121 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Property details. + # + class PropertyContract < Resource + + include MsRestAzure + + # @return [Array] Optional tags that when provided can be used to + # filter the property list. + attr_accessor :tags + + # @return [Boolean] Determines whether the value is a secret and should + # be encrypted or not. Default value is false. + attr_accessor :secret + + # @return [String] Unique name of Property. It may contain only letters, + # digits, period, dash, and underscore characters. + attr_accessor :display_name + + # @return [String] Value of the property. Can contain policy expressions. + # It may not be empty or consist only of whitespace. + attr_accessor :value + + + # + # Mapper for PropertyContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PropertyContract', + type: { + name: 'Composite', + class_name: 'PropertyContract', + 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' + } + }, + tags: { + required: false, + serialized_name: 'properties.tags', + constraints: { + MaxItems: 32 + }, + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + secret: { + required: false, + serialized_name: 'properties.secret', + type: { + name: 'Boolean' + } + }, + display_name: { + required: true, + serialized_name: 'properties.displayName', + constraints: { + MaxLength: 256, + MinLength: 1, + Pattern: '^[A-Za-z0-9-._]+$' + }, + type: { + name: 'String' + } + }, + value: { + required: true, + serialized_name: 'properties.value', + constraints: { + MaxLength: 4096, + MinLength: 1 + }, + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/property_entity_base_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/property_entity_base_parameters.rb new file mode 100644 index 0000000000..663e26a877 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/property_entity_base_parameters.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Property Entity Base Parameters set. + # + class PropertyEntityBaseParameters + + include MsRestAzure + + # @return [Array] Optional tags that when provided can be used to + # filter the property list. + attr_accessor :tags + + # @return [Boolean] Determines whether the value is a secret and should + # be encrypted or not. Default value is false. + attr_accessor :secret + + + # + # Mapper for PropertyEntityBaseParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PropertyEntityBaseParameters', + type: { + name: 'Composite', + class_name: 'PropertyEntityBaseParameters', + model_properties: { + tags: { + required: false, + serialized_name: 'tags', + constraints: { + MaxItems: 32 + }, + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + secret: { + required: false, + serialized_name: 'secret', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/property_update_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/property_update_parameters.rb new file mode 100644 index 0000000000..0da156ea47 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/property_update_parameters.rb @@ -0,0 +1,97 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Property update Parameters. + # + class PropertyUpdateParameters + + include MsRestAzure + + # @return [Array] Optional tags that when provided can be used to + # filter the property list. + attr_accessor :tags + + # @return [Boolean] Determines whether the value is a secret and should + # be encrypted or not. Default value is false. + attr_accessor :secret + + # @return [String] Unique name of Property. It may contain only letters, + # digits, period, dash, and underscore characters. + attr_accessor :display_name + + # @return [String] Value of the property. Can contain policy expressions. + # It may not be empty or consist only of whitespace. + attr_accessor :value + + + # + # Mapper for PropertyUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PropertyUpdateParameters', + type: { + name: 'Composite', + class_name: 'PropertyUpdateParameters', + model_properties: { + tags: { + required: false, + serialized_name: 'properties.tags', + constraints: { + MaxItems: 32 + }, + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + secret: { + required: false, + serialized_name: 'properties.secret', + type: { + name: 'Boolean' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + constraints: { + MaxLength: 256, + MinLength: 1, + Pattern: '^[A-Za-z0-9-._]+$' + }, + type: { + name: 'String' + } + }, + value: { + required: false, + serialized_name: 'properties.value', + constraints: { + MaxLength: 4096, + MinLength: 1 + }, + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/protocol.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/protocol.rb new file mode 100644 index 0000000000..cdbd304179 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/protocol.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for Protocol + # + module Protocol + Http = "http" + Https = "https" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_collection.rb new file mode 100644 index 0000000000..c8303da2d4 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_collection.rb @@ -0,0 +1,72 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Quota Counter list representation. + # + class QuotaCounterCollection + + include MsRestAzure + + # @return [Array] Quota counter values. + attr_accessor :value + + # @return [Integer] Total record count number across all pages. + attr_accessor :count + + # @return [String] Next page link if any. + attr_accessor :next_link + + + # + # Mapper for QuotaCounterCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'QuotaCounterCollection', + type: { + name: 'Composite', + class_name: 'QuotaCounterCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'QuotaCounterContractElementType', + type: { + name: 'Composite', + class_name: 'QuotaCounterContract' + } + } + } + }, + count: { + required: false, + serialized_name: 'count', + type: { + name: 'Number' + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_contract.rb new file mode 100644 index 0000000000..0313119dc4 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_contract.rb @@ -0,0 +1,98 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Quota counter details. + # + class QuotaCounterContract + + include MsRestAzure + + # @return [String] The Key value of the Counter. Must not be empty. + attr_accessor :counter_key + + # @return [String] Identifier of the Period for which the counter was + # collected. Must not be empty. + attr_accessor :period_key + + # @return [DateTime] The date of the start of Counter Period. The date + # conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified + # by the ISO 8601 standard. + # + attr_accessor :period_start_time + + # @return [DateTime] The date of the end of Counter Period. The date + # conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified + # by the ISO 8601 standard. + # + attr_accessor :period_end_time + + # @return [QuotaCounterValueContractProperties] Quota Value Properties + attr_accessor :value + + + # + # Mapper for QuotaCounterContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'QuotaCounterContract', + type: { + name: 'Composite', + class_name: 'QuotaCounterContract', + model_properties: { + counter_key: { + required: true, + serialized_name: 'counterKey', + constraints: { + MinLength: 1 + }, + type: { + name: 'String' + } + }, + period_key: { + required: true, + serialized_name: 'periodKey', + constraints: { + MinLength: 1 + }, + type: { + name: 'String' + } + }, + period_start_time: { + required: true, + serialized_name: 'periodStartTime', + type: { + name: 'DateTime' + } + }, + period_end_time: { + required: true, + serialized_name: 'periodEndTime', + type: { + name: 'DateTime' + } + }, + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Composite', + class_name: 'QuotaCounterValueContractProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_value_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_value_contract.rb new file mode 100644 index 0000000000..655a321e15 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_value_contract.rb @@ -0,0 +1,54 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Quota counter value details. + # + class QuotaCounterValueContract + + include MsRestAzure + + # @return [Integer] Number of times Counter was called. + attr_accessor :calls_count + + # @return [Float] Data Transferred in KiloBytes. + attr_accessor :kb_transferred + + + # + # Mapper for QuotaCounterValueContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'QuotaCounterValueContract', + type: { + name: 'Composite', + class_name: 'QuotaCounterValueContract', + model_properties: { + calls_count: { + required: false, + serialized_name: 'value.callsCount', + type: { + name: 'Number' + } + }, + kb_transferred: { + required: false, + serialized_name: 'value.kbTransferred', + type: { + name: 'Double' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_value_contract_properties.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_value_contract_properties.rb new file mode 100644 index 0000000000..54be8d003b --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_value_contract_properties.rb @@ -0,0 +1,54 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Quota counter value details. + # + class QuotaCounterValueContractProperties + + include MsRestAzure + + # @return [Integer] Number of times Counter was called. + attr_accessor :calls_count + + # @return [Float] Data Transferred in KiloBytes. + attr_accessor :kb_transferred + + + # + # Mapper for QuotaCounterValueContractProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'QuotaCounterValueContractProperties', + type: { + name: 'Composite', + class_name: 'QuotaCounterValueContractProperties', + model_properties: { + calls_count: { + required: false, + serialized_name: 'callsCount', + type: { + name: 'Number' + } + }, + kb_transferred: { + required: false, + serialized_name: 'kbTransferred', + type: { + name: 'Double' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipient_email_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipient_email_collection.rb new file mode 100644 index 0000000000..f6f323b4a0 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipient_email_collection.rb @@ -0,0 +1,62 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Recipient User list representation. + # + class RecipientEmailCollection + + include MsRestAzure + + # @return [Array] Page values. + attr_accessor :value + + # @return [String] Next page link if any. + attr_accessor :next_link + + + # + # Mapper for RecipientEmailCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecipientEmailCollection', + type: { + name: 'Composite', + class_name: 'RecipientEmailCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RecipientEmailContractElementType', + type: { + name: 'Composite', + class_name: 'RecipientEmailContract' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipient_email_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipient_email_contract.rb new file mode 100644 index 0000000000..d0e0a72f4d --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipient_email_contract.rb @@ -0,0 +1,68 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Recipient Email details. + # + class RecipientEmailContract < Resource + + include MsRestAzure + + # @return [String] User Email subscribed to notification. + attr_accessor :email + + + # + # Mapper for RecipientEmailContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecipientEmailContract', + type: { + name: 'Composite', + class_name: 'RecipientEmailContract', + 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' + } + }, + email: { + required: false, + serialized_name: 'properties.email', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipient_user_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipient_user_collection.rb new file mode 100644 index 0000000000..09c53a1f03 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipient_user_collection.rb @@ -0,0 +1,62 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Recipient User list representation. + # + class RecipientUserCollection + + include MsRestAzure + + # @return [Array] Page values. + attr_accessor :value + + # @return [String] Next page link if any. + attr_accessor :next_link + + + # + # Mapper for RecipientUserCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecipientUserCollection', + type: { + name: 'Composite', + class_name: 'RecipientUserCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RecipientUserContractElementType', + type: { + name: 'Composite', + class_name: 'RecipientUserContract' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipient_user_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipient_user_contract.rb new file mode 100644 index 0000000000..8d26c350f5 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipient_user_contract.rb @@ -0,0 +1,68 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Recipient User details. + # + class RecipientUserContract < Resource + + include MsRestAzure + + # @return [String] API Management UserId subscribed to notification. + attr_accessor :user_id + + + # + # Mapper for RecipientUserContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecipientUserContract', + type: { + name: 'Composite', + class_name: 'RecipientUserContract', + 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' + } + }, + user_id: { + required: false, + serialized_name: 'properties.userId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipients_contract_properties.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipients_contract_properties.rb new file mode 100644 index 0000000000..fe71717c5c --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipients_contract_properties.rb @@ -0,0 +1,68 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Notification Parameter contract. + # + class RecipientsContractProperties + + include MsRestAzure + + # @return [Array] List of Emails subscribed for the notification. + attr_accessor :emails + + # @return [Array] List of Users subscribed for the notification. + attr_accessor :users + + + # + # Mapper for RecipientsContractProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecipientsContractProperties', + type: { + name: 'Composite', + class_name: 'RecipientsContractProperties', + model_properties: { + emails: { + required: false, + serialized_name: 'emails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + users: { + required: false, + serialized_name: 'users', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/region_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/region_contract.rb new file mode 100644 index 0000000000..22244e2d88 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/region_contract.rb @@ -0,0 +1,65 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Region profile. + # + class RegionContract + + include MsRestAzure + + # @return [String] Region name. + attr_accessor :name + + # @return [Boolean] whether Region is the master region. + attr_accessor :is_master_region + + # @return [Boolean] whether Region is deleted. + attr_accessor :is_deleted + + + # + # Mapper for RegionContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RegionContract', + type: { + name: 'Composite', + class_name: 'RegionContract', + model_properties: { + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + is_master_region: { + required: false, + serialized_name: 'isMasterRegion', + type: { + name: 'Boolean' + } + }, + is_deleted: { + required: false, + serialized_name: 'isDeleted', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/region_list_result.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/region_list_result.rb new file mode 100644 index 0000000000..0aaf90fa0a --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/region_list_result.rb @@ -0,0 +1,104 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Lists Regions operation response details. + # + class RegionListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Lists of Regions. + attr_accessor :value + + # @return [Integer] Total record count number across all pages. + attr_accessor :count + + # @return [String] Next page link if any. + 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 [RegionListResult] 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 RegionListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RegionListResult', + type: { + name: 'Composite', + class_name: 'RegionListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RegionContractElementType', + type: { + name: 'Composite', + class_name: 'RegionContract' + } + } + } + }, + count: { + required: false, + serialized_name: 'count', + type: { + name: 'Number' + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/registration_delegation_settings_properties.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/registration_delegation_settings_properties.rb new file mode 100644 index 0000000000..506dc170c2 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/registration_delegation_settings_properties.rb @@ -0,0 +1,44 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # User registration delegation settings properties. + # + class RegistrationDelegationSettingsProperties + + include MsRestAzure + + # @return [Boolean] Enable or disable delegation for user registration. + attr_accessor :enabled + + + # + # Mapper for RegistrationDelegationSettingsProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RegistrationDelegationSettingsProperties', + type: { + name: 'Composite', + class_name: 'RegistrationDelegationSettingsProperties', + model_properties: { + enabled: { + required: false, + serialized_name: 'enabled', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/report_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/report_collection.rb new file mode 100644 index 0000000000..8e30fe99c0 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/report_collection.rb @@ -0,0 +1,104 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Report records list representation. + # + class ReportCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Page values. + attr_accessor :value + + # @return [Integer] Total record count number across all pages. + attr_accessor :count + + # @return [String] Next page link if any. + 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 [ReportCollection] 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 ReportCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ReportCollection', + type: { + name: 'Composite', + class_name: 'ReportCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ReportRecordContractElementType', + type: { + name: 'Composite', + class_name: 'ReportRecordContract' + } + } + } + }, + count: { + required: false, + serialized_name: 'count', + type: { + name: 'Number' + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/report_record_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/report_record_contract.rb new file mode 100644 index 0000000000..da598516ff --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/report_record_contract.rb @@ -0,0 +1,311 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Report data. + # + class ReportRecordContract + + include MsRestAzure + + # @return [String] Name depending on report endpoint specifies product, + # API, operation or developer name. + attr_accessor :name + + # @return [DateTime] Start of aggregation period. The date conforms to + # the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO + # 8601 standard. + # + attr_accessor :timestamp + + # @return [String] Length of agregation period. Interval must be + # multiple of 15 minutes and may not be zero. The value should be in ISO + # 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations). + attr_accessor :interval + + # @return [String] Country to which this record data is related. + attr_accessor :country + + # @return [String] Country region to which this record data is related. + attr_accessor :region + + # @return [String] Zip code to which this record data is related. + attr_accessor :zip + + # @return [String] User identifier path. /users/{userId} + attr_accessor :user_id + + # @return [String] Product identifier path. /products/{productId} + attr_accessor :product_id + + # @return [String] API identifier path. /apis/{apiId} + attr_accessor :api_id + + # @return [String] Operation identifier path. + # /apis/{apiId}/operations/{operationId} + attr_accessor :operation_id + + # @return [String] API region identifier. + attr_accessor :api_region + + # @return [String] Subscription identifier path. + # /subscriptions/{subscriptionId} + attr_accessor :subscription_id + + # @return [Integer] Number of succesful calls. This includes calls + # returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and + # HttpStatusCode.TemporaryRedirect + attr_accessor :call_count_success + + # @return [Integer] Number of calls blocked due to invalid credentials. + # This includes calls returning HttpStatusCode.Unauthorize and + # HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests + attr_accessor :call_count_blocked + + # @return [Integer] Number of calls failed due to proxy or backend + # errors. This includes calls returning HttpStatusCode.BadRequest(400) + # and any Code between HttpStatusCode.InternalServerError (500) and 600 + attr_accessor :call_count_failed + + # @return [Integer] Number of other calls. + attr_accessor :call_count_other + + # @return [Integer] Total number of calls. + attr_accessor :call_count_total + + # @return [Integer] Bandwidth consumed. + attr_accessor :bandwidth + + # @return [Integer] Number of times when content was served from cache + # policy. + attr_accessor :cache_hit_count + + # @return [Integer] Number of times content was fetched from backend. + attr_accessor :cache_miss_count + + # @return [Float] Average time it took to process request. + attr_accessor :api_time_avg + + # @return [Float] Minimum time it took to process request. + attr_accessor :api_time_min + + # @return [Float] Maximum time it took to process request. + attr_accessor :api_time_max + + # @return [Float] Average time it took to process request on backend. + attr_accessor :service_time_avg + + # @return [Float] Minimum time it took to process request on backend. + attr_accessor :service_time_min + + # @return [Float] Maximum time it took to process request on backend. + attr_accessor :service_time_max + + + # + # Mapper for ReportRecordContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ReportRecordContract', + type: { + name: 'Composite', + class_name: 'ReportRecordContract', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + timestamp: { + required: false, + serialized_name: 'timestamp', + type: { + name: 'DateTime' + } + }, + interval: { + required: false, + serialized_name: 'interval', + type: { + name: 'String' + } + }, + country: { + required: false, + serialized_name: 'country', + type: { + name: 'String' + } + }, + region: { + required: false, + serialized_name: 'region', + type: { + name: 'String' + } + }, + zip: { + required: false, + serialized_name: 'zip', + type: { + name: 'String' + } + }, + user_id: { + required: false, + read_only: true, + serialized_name: 'userId', + type: { + name: 'String' + } + }, + product_id: { + required: false, + read_only: true, + serialized_name: 'productId', + type: { + name: 'String' + } + }, + api_id: { + required: false, + serialized_name: 'apiId', + type: { + name: 'String' + } + }, + operation_id: { + required: false, + serialized_name: 'operationId', + type: { + name: 'String' + } + }, + api_region: { + required: false, + serialized_name: 'apiRegion', + type: { + name: 'String' + } + }, + subscription_id: { + required: false, + serialized_name: 'subscriptionId', + type: { + name: 'String' + } + }, + call_count_success: { + required: false, + serialized_name: 'callCountSuccess', + type: { + name: 'Number' + } + }, + call_count_blocked: { + required: false, + serialized_name: 'callCountBlocked', + type: { + name: 'Number' + } + }, + call_count_failed: { + required: false, + serialized_name: 'callCountFailed', + type: { + name: 'Number' + } + }, + call_count_other: { + required: false, + serialized_name: 'callCountOther', + type: { + name: 'Number' + } + }, + call_count_total: { + required: false, + serialized_name: 'callCountTotal', + type: { + name: 'Number' + } + }, + bandwidth: { + required: false, + serialized_name: 'bandwidth', + type: { + name: 'Number' + } + }, + cache_hit_count: { + required: false, + serialized_name: 'cacheHitCount', + type: { + name: 'Number' + } + }, + cache_miss_count: { + required: false, + serialized_name: 'cacheMissCount', + type: { + name: 'Number' + } + }, + api_time_avg: { + required: false, + serialized_name: 'apiTimeAvg', + type: { + name: 'Double' + } + }, + api_time_min: { + required: false, + serialized_name: 'apiTimeMin', + type: { + name: 'Double' + } + }, + api_time_max: { + required: false, + serialized_name: 'apiTimeMax', + type: { + name: 'Double' + } + }, + service_time_avg: { + required: false, + serialized_name: 'serviceTimeAvg', + type: { + name: 'Double' + } + }, + service_time_min: { + required: false, + serialized_name: 'serviceTimeMin', + type: { + name: 'Double' + } + }, + service_time_max: { + required: false, + serialized_name: 'serviceTimeMax', + type: { + name: 'Double' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/representation_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/representation_contract.rb new file mode 100644 index 0000000000..9e0ce31e70 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/representation_contract.rb @@ -0,0 +1,99 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Operation request/response representation details. + # + class RepresentationContract + + include MsRestAzure + + # @return [String] Specifies a registered or custom content type for this + # representation, e.g. application/xml. + attr_accessor :content_type + + # @return [String] An example of the representation. + attr_accessor :sample + + # @return [String] Schema identifier. Applicable only if 'contentType' + # value is neither 'application/x-www-form-urlencoded' nor + # 'multipart/form-data'. + attr_accessor :schema_id + + # @return [String] Type name defined by the schema. Applicable only if + # 'contentType' value is neither 'application/x-www-form-urlencoded' nor + # 'multipart/form-data'. + attr_accessor :type_name + + # @return [Array] Collection of form parameters. + # Required if 'contentType' value is either + # 'application/x-www-form-urlencoded' or 'multipart/form-data'.. + attr_accessor :form_parameters + + + # + # Mapper for RepresentationContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RepresentationContract', + type: { + name: 'Composite', + class_name: 'RepresentationContract', + model_properties: { + content_type: { + required: true, + serialized_name: 'contentType', + type: { + name: 'String' + } + }, + sample: { + required: false, + serialized_name: 'sample', + type: { + name: 'String' + } + }, + schema_id: { + required: false, + serialized_name: 'schemaId', + type: { + name: 'String' + } + }, + type_name: { + required: false, + serialized_name: 'typeName', + type: { + name: 'String' + } + }, + form_parameters: { + required: false, + serialized_name: 'formParameters', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ParameterContractElementType', + type: { + name: 'Composite', + class_name: 'ParameterContract' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/request_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/request_contract.rb new file mode 100644 index 0000000000..65f2d8c2c4 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/request_contract.rb @@ -0,0 +1,101 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Operation request details. + # + class RequestContract + + include MsRestAzure + + # @return [String] Operation request description. + attr_accessor :description + + # @return [Array] Collection of operation request + # query parameters. + attr_accessor :query_parameters + + # @return [Array] Collection of operation request + # headers. + attr_accessor :headers + + # @return [Array] Collection of operation request + # representations. + attr_accessor :representations + + + # + # Mapper for RequestContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RequestContract', + type: { + name: 'Composite', + class_name: 'RequestContract', + model_properties: { + description: { + required: false, + serialized_name: 'description', + type: { + name: 'String' + } + }, + query_parameters: { + required: false, + serialized_name: 'queryParameters', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ParameterContractElementType', + type: { + name: 'Composite', + class_name: 'ParameterContract' + } + } + } + }, + headers: { + required: false, + serialized_name: 'headers', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ParameterContractElementType', + type: { + name: 'Composite', + class_name: 'ParameterContract' + } + } + } + }, + representations: { + required: false, + serialized_name: 'representations', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RepresentationContractElementType', + type: { + name: 'Composite', + class_name: 'RepresentationContract' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/request_report_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/request_report_collection.rb new file mode 100644 index 0000000000..429439f7e3 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/request_report_collection.rb @@ -0,0 +1,62 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Report records list representation. + # + class RequestReportCollection + + include MsRestAzure + + # @return [Array] Page values. + attr_accessor :value + + # @return [Integer] Total record count number across all pages. + attr_accessor :count + + + # + # Mapper for RequestReportCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RequestReportCollection', + type: { + name: 'Composite', + class_name: 'RequestReportCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RequestReportRecordContractElementType', + type: { + name: 'Composite', + class_name: 'RequestReportRecordContract' + } + } + } + }, + count: { + required: false, + serialized_name: 'count', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/request_report_record_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/request_report_record_contract.rb new file mode 100644 index 0000000000..7447d7cfe6 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/request_report_record_contract.rb @@ -0,0 +1,226 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Request Report data. + # + class RequestReportRecordContract + + include MsRestAzure + + # @return [String] API identifier path. /apis/{apiId} + attr_accessor :api_id + + # @return [String] Operation identifier path. + # /apis/{apiId}/operations/{operationId} + attr_accessor :operation_id + + # @return [String] Product identifier path. /products/{productId} + attr_accessor :product_id + + # @return [String] User identifier path. /users/{userId} + attr_accessor :user_id + + # @return [String] The HTTP method associated with this request.. + attr_accessor :method + + # @return [String] The full URL associated with this request. + attr_accessor :url + + # @return [String] The client IP address associated with this request. + attr_accessor :ip_address + + # @return [String] The HTTP status code received by the gateway as a + # result of forwarding this request to the backend. + attr_accessor :backend_response_code + + # @return [Integer] The HTTP status code returned by the gateway. + attr_accessor :response_code + + # @return [Integer] The size of the response returned by the gateway. + attr_accessor :response_size + + # @return [DateTime] The date and time when this request was received by + # the gateway in ISO 8601 format. + attr_accessor :timestamp + + # @return [String] Specifies if response cache was involved in generating + # the response. If the value is none, the cache was not used. If the + # value is hit, cached response was returned. If the value is miss, the + # cache was used but lookup resulted in a miss and request was fullfilled + # by the backend. + attr_accessor :cache + + # @return [Float] The total time it took to process this request. + attr_accessor :api_time + + # @return [Float] he time it took to forward this request to the backend + # and get the response back. + attr_accessor :service_time + + # @return [String] Azure region where the gateway that processed this + # request is located. + attr_accessor :api_region + + # @return [String] Subscription identifier path. + # /subscriptions/{subscriptionId} + attr_accessor :subscription_id + + # @return [String] Request Identifier. + attr_accessor :request_id + + # @return [Integer] The size of this request.. + attr_accessor :request_size + + + # + # Mapper for RequestReportRecordContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RequestReportRecordContract', + type: { + name: 'Composite', + class_name: 'RequestReportRecordContract', + model_properties: { + api_id: { + required: false, + serialized_name: 'apiId', + type: { + name: 'String' + } + }, + operation_id: { + required: false, + serialized_name: 'operationId', + type: { + name: 'String' + } + }, + product_id: { + required: false, + read_only: true, + serialized_name: 'productId', + type: { + name: 'String' + } + }, + user_id: { + required: false, + read_only: true, + serialized_name: 'userId', + type: { + name: 'String' + } + }, + method: { + required: false, + serialized_name: 'method', + type: { + name: 'String' + } + }, + url: { + required: false, + serialized_name: 'url', + type: { + name: 'String' + } + }, + ip_address: { + required: false, + serialized_name: 'ipAddress', + type: { + name: 'String' + } + }, + backend_response_code: { + required: false, + serialized_name: 'backendResponseCode', + type: { + name: 'String' + } + }, + response_code: { + required: false, + serialized_name: 'responseCode', + type: { + name: 'Number' + } + }, + response_size: { + required: false, + serialized_name: 'responseSize', + type: { + name: 'Number' + } + }, + timestamp: { + required: false, + serialized_name: 'timestamp', + type: { + name: 'DateTime' + } + }, + cache: { + required: false, + serialized_name: 'cache', + type: { + name: 'String' + } + }, + api_time: { + required: false, + serialized_name: 'apiTime', + type: { + name: 'Double' + } + }, + service_time: { + required: false, + serialized_name: 'serviceTime', + type: { + name: 'Double' + } + }, + api_region: { + required: false, + serialized_name: 'apiRegion', + type: { + name: 'String' + } + }, + subscription_id: { + required: false, + serialized_name: 'subscriptionId', + type: { + name: 'String' + } + }, + request_id: { + required: false, + serialized_name: 'requestId', + type: { + name: 'String' + } + }, + request_size: { + required: false, + serialized_name: 'requestSize', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/resource.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/resource.rb new file mode 100644 index 0000000000..14518126ec --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/resource.rb @@ -0,0 +1,67 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # The Resource definition. + # + class Resource + + include MsRestAzure + + # @return [String] Resource ID. + attr_accessor :id + + # @return [String] Resource name. + attr_accessor :name + + # @return [String] Resource type for API Management resource. + attr_accessor :type + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/response_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/response_contract.rb new file mode 100644 index 0000000000..e3aa211c5c --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/response_contract.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Operation response details. + # + class ResponseContract + + include MsRestAzure + + # @return [Integer] Operation response HTTP status code. + attr_accessor :status_code + + # @return [String] Operation response description. + attr_accessor :description + + # @return [Array] Collection of operation + # response representations. + attr_accessor :representations + + # @return [Array] Collection of operation response + # headers. + attr_accessor :headers + + + # + # Mapper for ResponseContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ResponseContract', + type: { + name: 'Composite', + class_name: 'ResponseContract', + model_properties: { + status_code: { + required: true, + serialized_name: 'statusCode', + type: { + name: 'Number' + } + }, + description: { + required: false, + serialized_name: 'description', + type: { + name: 'String' + } + }, + representations: { + required: false, + serialized_name: 'representations', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RepresentationContractElementType', + type: { + name: 'Composite', + class_name: 'RepresentationContract' + } + } + } + }, + headers: { + required: false, + serialized_name: 'headers', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ParameterContractElementType', + type: { + name: 'Composite', + class_name: 'ParameterContract' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/save_configuration_parameter.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/save_configuration_parameter.rb new file mode 100644 index 0000000000..0796f9df36 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/save_configuration_parameter.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Parameters supplied to the Save Tenant Configuration operation. + # + class SaveConfigurationParameter + + include MsRestAzure + + # @return [String] The name of the Git branch in which to commit the + # current configuration snapshot. + attr_accessor :branch + + # @return [Boolean] The value if true, the current configuration database + # is committed to the Git repository, even if the Git repository has + # newer changes that would be overwritten. + attr_accessor :force + + + # + # Mapper for SaveConfigurationParameter class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SaveConfigurationParameter', + type: { + name: 'Composite', + class_name: 'SaveConfigurationParameter', + model_properties: { + branch: { + required: true, + serialized_name: 'branch', + type: { + name: 'String' + } + }, + force: { + required: false, + serialized_name: 'force', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/schema_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/schema_collection.rb new file mode 100644 index 0000000000..954ea6f8a9 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/schema_collection.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # The response of the list schema operation. + # + class SchemaCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Api Schema Contract value. + attr_accessor :value + + # @return [String] Next page link if any. + 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 [SchemaCollection] 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 SchemaCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SchemaCollection', + type: { + name: 'Composite', + class_name: 'SchemaCollection', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SchemaContractElementType', + type: { + name: 'Composite', + class_name: 'SchemaContract' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/schema_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/schema_contract.rb new file mode 100644 index 0000000000..add8269098 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/schema_contract.rb @@ -0,0 +1,81 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Schema Contract details. + # + class SchemaContract < Resource + + include MsRestAzure + + # @return [String] Must be a valid a media type used in a Content-Type + # header as defined in the RFC 2616. Media type of the schema document + # (e.g. application/json, application/xml). + attr_accessor :content_type + + # @return [String] Json escaped string defining the document representing + # the Schema. + attr_accessor :value + + + # + # Mapper for SchemaContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SchemaContract', + type: { + name: 'Composite', + class_name: 'SchemaContract', + 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' + } + }, + content_type: { + required: true, + serialized_name: 'properties.contentType', + type: { + name: 'String' + } + }, + value: { + required: false, + serialized_name: 'properties.document.value', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/sku_type.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/sku_type.rb new file mode 100644 index 0000000000..d6f53fd8f7 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/sku_type.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for SkuType + # + module SkuType + Developer = "Developer" + Standard = "Standard" + Premium = "Premium" + Basic = "Basic" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/soap_api_type.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/soap_api_type.rb new file mode 100644 index 0000000000..affa74dc0a --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/soap_api_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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for SoapApiType + # + module SoapApiType + SoapToRest = "http" + SoapPassThrough = "soap" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/state.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/state.rb new file mode 100644 index 0000000000..2c46c301bb --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for State + # + module State + Proposed = "proposed" + Open = "open" + Removed = "removed" + Resolved = "resolved" + Closed = "closed" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_collection.rb new file mode 100644 index 0000000000..b0de4dd604 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_collection.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Subscriptions list representation. + # + class SubscriptionCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Page values. + attr_accessor :value + + # @return [String] Next page link if any. + 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 [SubscriptionCollection] 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 SubscriptionCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SubscriptionCollection', + type: { + name: 'Composite', + class_name: 'SubscriptionCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SubscriptionContractElementType', + type: { + name: 'Composite', + class_name: 'SubscriptionContract' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_contract.rb new file mode 100644 index 0000000000..2b26ee2af7 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_contract.rb @@ -0,0 +1,228 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Subscription details. + # + class SubscriptionContract < Resource + + include MsRestAzure + + # @return [String] The user resource identifier of the subscription + # owner. The value is a valid relative URL in the format of /users/{uid} + # where {uid} is a user identifier. + attr_accessor :user_id + + # @return [String] The product resource identifier of the subscribed + # product. The value is a valid relative URL in the format of + # /products/{productId} where {productId} is a product identifier. + attr_accessor :product_id + + # @return [String] The name of the subscription, or null if the + # subscription has no name. + attr_accessor :display_name + + # @return [SubscriptionState] Subscription state. Possible states are * + # active – the subscription is active, * suspended – the subscription is + # blocked, and the subscriber cannot call any APIs of the product, * + # submitted – the subscription request has been made by the developer, + # but has not yet been approved or rejected, * rejected – the + # subscription request has been denied by an administrator, * cancelled – + # the subscription has been cancelled by the developer or administrator, + # * expired – the subscription reached its expiration date and was + # deactivated. Possible values include: 'suspended', 'active', 'expired', + # 'submitted', 'rejected', 'cancelled' + attr_accessor :state + + # @return [DateTime] Subscription creation date. The date conforms to the + # following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 + # standard. + # + attr_accessor :created_date + + # @return [DateTime] Subscription activation date. The setting is for + # audit purposes only and the subscription is not automatically + # activated. The subscription lifecycle can be managed by using the + # `state` property. The date conforms to the following format: + # `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + # + attr_accessor :start_date + + # @return [DateTime] Subscription expiration date. The setting is for + # audit purposes only and the subscription is not automatically expired. + # The subscription lifecycle can be managed by using the `state` + # property. The date conforms to the following format: + # `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + # + attr_accessor :expiration_date + + # @return [DateTime] Date when subscription was cancelled or expired. The + # setting is for audit purposes only and the subscription is not + # automatically cancelled. The subscription lifecycle can be managed by + # using the `state` property. The date conforms to the following format: + # `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + # + attr_accessor :end_date + + # @return [DateTime] Upcoming subscription expiration notification date. + # The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + # specified by the ISO 8601 standard. + # + attr_accessor :notification_date + + # @return [String] Subscription primary key. + attr_accessor :primary_key + + # @return [String] Subscription secondary key. + attr_accessor :secondary_key + + # @return [String] Optional subscription comment added by an + # administrator. + attr_accessor :state_comment + + + # + # Mapper for SubscriptionContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SubscriptionContract', + type: { + name: 'Composite', + class_name: 'SubscriptionContract', + 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' + } + }, + user_id: { + required: true, + serialized_name: 'properties.userId', + type: { + name: 'String' + } + }, + product_id: { + required: true, + serialized_name: 'properties.productId', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + constraints: { + MaxLength: 100, + MinLength: 0 + }, + type: { + name: 'String' + } + }, + state: { + required: true, + serialized_name: 'properties.state', + type: { + name: 'Enum', + module: 'SubscriptionState' + } + }, + created_date: { + required: false, + read_only: true, + serialized_name: 'properties.createdDate', + type: { + name: 'DateTime' + } + }, + start_date: { + required: false, + serialized_name: 'properties.startDate', + type: { + name: 'DateTime' + } + }, + expiration_date: { + required: false, + serialized_name: 'properties.expirationDate', + type: { + name: 'DateTime' + } + }, + end_date: { + required: false, + serialized_name: 'properties.endDate', + type: { + name: 'DateTime' + } + }, + notification_date: { + required: false, + serialized_name: 'properties.notificationDate', + type: { + name: 'DateTime' + } + }, + primary_key: { + required: true, + serialized_name: 'properties.primaryKey', + constraints: { + MaxLength: 256, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + secondary_key: { + required: true, + serialized_name: 'properties.secondaryKey', + constraints: { + MaxLength: 256, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + state_comment: { + required: false, + serialized_name: 'properties.stateComment', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb new file mode 100644 index 0000000000..9560f58d49 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb @@ -0,0 +1,121 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Subscription create details. + # + class SubscriptionCreateParameters + + include MsRestAzure + + # @return [String] User (user id path) for whom subscription is being + # created in form /users/{uid} + attr_accessor :user_id + + # @return [String] Product (product id path) for which subscription is + # being created in form /products/{productid} + attr_accessor :product_id + + # @return [String] Subscription name. + attr_accessor :display_name + + # @return [String] Primary subscription key. If not specified during + # request key will be generated automatically. + attr_accessor :primary_key + + # @return [String] Secondary subscription key. If not specified during + # request key will be generated automatically. + attr_accessor :secondary_key + + # @return [SubscriptionState] Initial subscription state. If no value is + # specified, subscription is created with Submitted state. Possible + # states are * active – the subscription is active, * suspended – the + # subscription is blocked, and the subscriber cannot call any APIs of the + # product, * submitted – the subscription request has been made by the + # developer, but has not yet been approved or rejected, * rejected – the + # subscription request has been denied by an administrator, * cancelled – + # the subscription has been cancelled by the developer or administrator, + # * expired – the subscription reached its expiration date and was + # deactivated. Possible values include: 'suspended', 'active', 'expired', + # 'submitted', 'rejected', 'cancelled' + attr_accessor :state + + + # + # Mapper for SubscriptionCreateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SubscriptionCreateParameters', + type: { + name: 'Composite', + class_name: 'SubscriptionCreateParameters', + model_properties: { + user_id: { + required: true, + serialized_name: 'properties.userId', + type: { + name: 'String' + } + }, + product_id: { + required: true, + serialized_name: 'properties.productId', + type: { + name: 'String' + } + }, + display_name: { + required: true, + serialized_name: 'properties.displayName', + constraints: { + MaxLength: 100, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + primary_key: { + required: false, + serialized_name: 'properties.primaryKey', + constraints: { + MaxLength: 256, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + secondary_key: { + required: false, + serialized_name: 'properties.secondaryKey', + constraints: { + MaxLength: 256, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + state: { + required: false, + serialized_name: 'properties.state', + type: { + name: 'Enum', + module: 'SubscriptionState' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_key_parameter_names_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_key_parameter_names_contract.rb new file mode 100644 index 0000000000..95422e01ca --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_key_parameter_names_contract.rb @@ -0,0 +1,54 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Subscription key parameter names details. + # + class SubscriptionKeyParameterNamesContract + + include MsRestAzure + + # @return [String] Subscription key header name. + attr_accessor :header + + # @return [String] Subscription key query string parameter name. + attr_accessor :query + + + # + # Mapper for SubscriptionKeyParameterNamesContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SubscriptionKeyParameterNamesContract', + type: { + name: 'Composite', + class_name: 'SubscriptionKeyParameterNamesContract', + model_properties: { + header: { + required: false, + serialized_name: 'header', + type: { + name: 'String' + } + }, + query: { + required: false, + serialized_name: 'query', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_state.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_state.rb new file mode 100644 index 0000000000..c406f3bd17 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_state.rb @@ -0,0 +1,20 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for SubscriptionState + # + module SubscriptionState + Suspended = "suspended" + Active = "active" + Expired = "expired" + Submitted = "submitted" + Rejected = "rejected" + Cancelled = "cancelled" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_update_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_update_parameters.rb new file mode 100644 index 0000000000..3cb1e6853f --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_update_parameters.rb @@ -0,0 +1,137 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Subscription update details. + # + class SubscriptionUpdateParameters + + include MsRestAzure + + # @return [String] User identifier path: /users/{uid} + attr_accessor :user_id + + # @return [String] Product identifier path: /products/{productId} + attr_accessor :product_id + + # @return [DateTime] Subscription expiration date. The setting is for + # audit purposes only and the subscription is not automatically expired. + # The subscription lifecycle can be managed by using the `state` + # property. The date conforms to the following format: + # `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + attr_accessor :expiration_date + + # @return [String] Subscription name. + attr_accessor :display_name + + # @return [String] Primary subscription key. + attr_accessor :primary_key + + # @return [String] Secondary subscription key. + attr_accessor :secondary_key + + # @return [SubscriptionState] Subscription state. Possible states are * + # active – the subscription is active, * suspended – the subscription is + # blocked, and the subscriber cannot call any APIs of the product, * + # submitted – the subscription request has been made by the developer, + # but has not yet been approved or rejected, * rejected – the + # subscription request has been denied by an administrator, * cancelled – + # the subscription has been cancelled by the developer or administrator, + # * expired – the subscription reached its expiration date and was + # deactivated. Possible values include: 'suspended', 'active', 'expired', + # 'submitted', 'rejected', 'cancelled' + attr_accessor :state + + # @return [String] Comments describing subscription state change by the + # administrator. + attr_accessor :state_comment + + + # + # Mapper for SubscriptionUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SubscriptionUpdateParameters', + type: { + name: 'Composite', + class_name: 'SubscriptionUpdateParameters', + model_properties: { + user_id: { + required: false, + serialized_name: 'properties.userId', + type: { + name: 'String' + } + }, + product_id: { + required: false, + serialized_name: 'properties.productId', + type: { + name: 'String' + } + }, + expiration_date: { + required: false, + serialized_name: 'properties.expirationDate', + type: { + name: 'DateTime' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + type: { + name: 'String' + } + }, + primary_key: { + required: false, + serialized_name: 'properties.primaryKey', + constraints: { + MaxLength: 256, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + secondary_key: { + required: false, + serialized_name: 'properties.secondaryKey', + constraints: { + MaxLength: 256, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + state: { + required: false, + serialized_name: 'properties.state', + type: { + name: 'Enum', + module: 'SubscriptionState' + } + }, + state_comment: { + required: false, + serialized_name: 'properties.stateComment', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscriptions_delegation_settings_properties.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscriptions_delegation_settings_properties.rb new file mode 100644 index 0000000000..9d5f0ab2e5 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscriptions_delegation_settings_properties.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Subscriptions delegation settings properties. + # + class SubscriptionsDelegationSettingsProperties + + include MsRestAzure + + # @return [Boolean] Enable or disable delegation for subscriptions. + attr_accessor :enabled + + + # + # Mapper for SubscriptionsDelegationSettingsProperties class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SubscriptionsDelegationSettingsProperties', + type: { + name: 'Composite', + class_name: 'SubscriptionsDelegationSettingsProperties', + model_properties: { + enabled: { + required: false, + serialized_name: 'enabled', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_collection.rb new file mode 100644 index 0000000000..e0cff8cd09 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_collection.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Tag list representation. + # + class TagCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Page values. + attr_accessor :value + + # @return [String] Next page link if any. + 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 [TagCollection] 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 TagCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TagCollection', + type: { + name: 'Composite', + class_name: 'TagCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'TagContractElementType', + type: { + name: 'Composite', + class_name: 'TagContract' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_contract.rb new file mode 100644 index 0000000000..97c972b80b --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_contract.rb @@ -0,0 +1,72 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Tag Contract details. + # + class TagContract < Resource + + include MsRestAzure + + # @return [String] Tag name. + attr_accessor :display_name + + + # + # Mapper for TagContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TagContract', + type: { + name: 'Composite', + class_name: 'TagContract', + 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' + } + }, + display_name: { + required: true, + serialized_name: 'properties.displayName', + constraints: { + MaxLength: 160, + MinLength: 1 + }, + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_create_update_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_create_update_parameters.rb new file mode 100644 index 0000000000..ae49014735 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_create_update_parameters.rb @@ -0,0 +1,48 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Parameters supplied to Create/Update Tag operations. + # + class TagCreateUpdateParameters + + include MsRestAzure + + # @return [String] Tag name. + attr_accessor :display_name + + + # + # Mapper for TagCreateUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TagCreateUpdateParameters', + type: { + name: 'Composite', + class_name: 'TagCreateUpdateParameters', + model_properties: { + display_name: { + required: true, + serialized_name: 'properties.displayName', + constraints: { + MaxLength: 160, + MinLength: 1 + }, + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_description_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_description_collection.rb new file mode 100644 index 0000000000..8f5654062c --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_description_collection.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged TagDescription list representation. + # + class TagDescriptionCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Page values. + attr_accessor :value + + # @return [String] Next page link if any. + 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 [TagDescriptionCollection] 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 TagDescriptionCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TagDescriptionCollection', + type: { + name: 'Composite', + class_name: 'TagDescriptionCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'TagDescriptionContractElementType', + type: { + name: 'Composite', + class_name: 'TagDescriptionContract' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_description_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_description_contract.rb new file mode 100644 index 0000000000..cbea7509c5 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_description_contract.rb @@ -0,0 +1,106 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Contract details. + # + class TagDescriptionContract < Resource + + include MsRestAzure + + # @return [String] Description of the Tag. + attr_accessor :description + + # @return [String] Absolute URL of external resources describing the tag. + attr_accessor :external_docs_url + + # @return [String] Description of the external resources describing the + # tag. + attr_accessor :external_docs_description + + # @return [String] Tag name. + attr_accessor :display_name + + + # + # Mapper for TagDescriptionContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TagDescriptionContract', + type: { + name: 'Composite', + class_name: 'TagDescriptionContract', + 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', + type: { + name: 'String' + } + }, + external_docs_url: { + required: false, + serialized_name: 'properties.externalDocsUrl', + constraints: { + MaxLength: 2000 + }, + type: { + name: 'String' + } + }, + external_docs_description: { + required: false, + serialized_name: 'properties.externalDocsDescription', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + constraints: { + MaxLength: 160, + MinLength: 1 + }, + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_description_create_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_description_create_parameters.rb new file mode 100644 index 0000000000..6c02fac247 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_description_create_parameters.rb @@ -0,0 +1,68 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Parameters supplied to the Create TagDescription operation. + # + class TagDescriptionCreateParameters + + include MsRestAzure + + # @return [String] Description of the Tag. + attr_accessor :description + + # @return [String] Absolute URL of external resources describing the tag. + attr_accessor :external_docs_url + + # @return [String] Description of the external resources describing the + # tag. + attr_accessor :external_docs_description + + + # + # Mapper for TagDescriptionCreateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TagDescriptionCreateParameters', + type: { + name: 'Composite', + class_name: 'TagDescriptionCreateParameters', + model_properties: { + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + external_docs_url: { + required: false, + serialized_name: 'properties.externalDocsUrl', + constraints: { + MaxLength: 2000 + }, + type: { + name: 'String' + } + }, + external_docs_description: { + required: false, + serialized_name: 'properties.externalDocsDescription', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_resource_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_resource_collection.rb new file mode 100644 index 0000000000..2da0f24471 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_resource_collection.rb @@ -0,0 +1,104 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Tag list representation. + # + class TagResourceCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Page values. + attr_accessor :value + + # @return [Integer] Total record count number across all pages. + attr_accessor :count + + # @return [String] Next page link if any. + 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 [TagResourceCollection] 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 TagResourceCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TagResourceCollection', + type: { + name: 'Composite', + class_name: 'TagResourceCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'TagResourceContractElementType', + type: { + name: 'Composite', + class_name: 'TagResourceContract' + } + } + } + }, + count: { + required: false, + serialized_name: 'count', + type: { + name: 'Number' + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_resource_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_resource_contract.rb new file mode 100644 index 0000000000..3e6e981762 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_resource_contract.rb @@ -0,0 +1,81 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # TagResource contract properties. + # + class TagResourceContract + + include MsRestAzure + + # @return [TagTagResourceContractProperties] Tag associated with the + # resource. + attr_accessor :tag + + # @return [ApiTagResourceContractProperties] Api associated with the tag. + attr_accessor :api + + # @return [OperationTagResourceContractProperties] Operation associated + # with the tag. + attr_accessor :operation + + # @return [ProductTagResourceContractProperties] Product associated with + # the tag. + attr_accessor :product + + + # + # Mapper for TagResourceContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TagResourceContract', + type: { + name: 'Composite', + class_name: 'TagResourceContract', + model_properties: { + tag: { + required: true, + serialized_name: 'tag', + type: { + name: 'Composite', + class_name: 'TagTagResourceContractProperties' + } + }, + api: { + required: false, + serialized_name: 'api', + type: { + name: 'Composite', + class_name: 'ApiTagResourceContractProperties' + } + }, + operation: { + required: false, + serialized_name: 'operation', + type: { + name: 'Composite', + class_name: 'OperationTagResourceContractProperties' + } + }, + product: { + required: false, + serialized_name: 'product', + type: { + name: 'Composite', + class_name: 'ProductTagResourceContractProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_tag_resource_contract_properties.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_tag_resource_contract_properties.rb new file mode 100644 index 0000000000..ec10306a00 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_tag_resource_contract_properties.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Contract defining the Tag property in the Tag Resource Contract + # + class TagTagResourceContractProperties + + include MsRestAzure + + # @return [String] Tag identifier + attr_accessor :id + + # @return [String] Tag Name + attr_accessor :name + + + # + # Mapper for TagTagResourceContractProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TagTagResourceContractProperties', + type: { + name: 'Composite', + class_name: 'TagTagResourceContractProperties', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + constraints: { + MaxLength: 160, + MinLength: 1 + }, + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/template_name.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/template_name.rb new file mode 100644 index 0000000000..af6f9c9a63 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/template_name.rb @@ -0,0 +1,28 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for TemplateName + # + module TemplateName + ApplicationApprovedNotificationMessage = "applicationApprovedNotificationMessage" + AccountClosedDeveloper = "accountClosedDeveloper" + QuotaLimitApproachingDeveloperNotificationMessage = "quotaLimitApproachingDeveloperNotificationMessage" + NewDeveloperNotificationMessage = "newDeveloperNotificationMessage" + EmailChangeIdentityDefault = "emailChangeIdentityDefault" + InviteUserNotificationMessage = "inviteUserNotificationMessage" + NewCommentNotificationMessage = "newCommentNotificationMessage" + ConfirmSignUpIdentityDefault = "confirmSignUpIdentityDefault" + NewIssueNotificationMessage = "newIssueNotificationMessage" + PurchaseDeveloperNotificationMessage = "purchaseDeveloperNotificationMessage" + PasswordResetIdentityDefault = "passwordResetIdentityDefault" + PasswordResetByAdminNotificationMessage = "passwordResetByAdminNotificationMessage" + RejectDeveloperNotificationMessage = "rejectDeveloperNotificationMessage" + RequestDeveloperNotificationMessage = "requestDeveloperNotificationMessage" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tenant_configuration_sync_state_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tenant_configuration_sync_state_contract.rb new file mode 100644 index 0000000000..1d0132ed30 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/tenant_configuration_sync_state_contract.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Tenant Configuration Synchronization State. + # + class TenantConfigurationSyncStateContract + + include MsRestAzure + + # @return [String] The name of Git branch. + attr_accessor :branch + + # @return [String] The latest commit Id. + attr_accessor :commit_id + + # @return [Boolean] value indicating if last sync was save (true) or + # deploy (false) operation. + attr_accessor :is_export + + # @return [Boolean] value indicating if last synchronization was later + # than the configuration change. + attr_accessor :is_synced + + # @return [Boolean] value indicating whether Git configuration access is + # enabled. + attr_accessor :is_git_enabled + + # @return [DateTime] The date of the latest synchronization. The date + # conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified + # by the ISO 8601 standard. + # + attr_accessor :sync_date + + # @return [DateTime] The date of the latest configuration change. The + # date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + # specified by the ISO 8601 standard. + # + attr_accessor :configuration_change_date + + + # + # Mapper for TenantConfigurationSyncStateContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TenantConfigurationSyncStateContract', + type: { + name: 'Composite', + class_name: 'TenantConfigurationSyncStateContract', + model_properties: { + branch: { + required: false, + serialized_name: 'branch', + type: { + name: 'String' + } + }, + commit_id: { + required: false, + serialized_name: 'commitId', + type: { + name: 'String' + } + }, + is_export: { + required: false, + serialized_name: 'isExport', + type: { + name: 'Boolean' + } + }, + is_synced: { + required: false, + serialized_name: 'isSynced', + type: { + name: 'Boolean' + } + }, + is_git_enabled: { + required: false, + serialized_name: 'isGitEnabled', + type: { + name: 'Boolean' + } + }, + sync_date: { + required: false, + serialized_name: 'syncDate', + type: { + name: 'DateTime' + } + }, + configuration_change_date: { + required: false, + serialized_name: 'configurationChangeDate', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/terms_of_service_properties.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/terms_of_service_properties.rb new file mode 100644 index 0000000000..056d42ccc2 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/terms_of_service_properties.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Terms of service contract properties. + # + class TermsOfServiceProperties + + include MsRestAzure + + # @return [String] A terms of service text. + attr_accessor :text + + # @return [Boolean] Display terms of service during a sign-up process. + attr_accessor :enabled + + # @return [Boolean] Ask user for consent to the terms of service. + attr_accessor :consent_required + + + # + # Mapper for TermsOfServiceProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TermsOfServiceProperties', + type: { + name: 'Composite', + class_name: 'TermsOfServiceProperties', + model_properties: { + text: { + required: false, + serialized_name: 'text', + type: { + name: 'String' + } + }, + enabled: { + required: false, + serialized_name: 'enabled', + type: { + name: 'Boolean' + } + }, + consent_required: { + required: false, + serialized_name: 'consentRequired', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/token_body_parameter_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/token_body_parameter_contract.rb new file mode 100644 index 0000000000..a446f20628 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/token_body_parameter_contract.rb @@ -0,0 +1,54 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # OAuth acquire token request body parameter (www-url-form-encoded). + # + class TokenBodyParameterContract + + include MsRestAzure + + # @return [String] body parameter name. + attr_accessor :name + + # @return [String] body parameter value. + attr_accessor :value + + + # + # Mapper for TokenBodyParameterContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TokenBodyParameterContract', + type: { + name: 'Composite', + class_name: 'TokenBodyParameterContract', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + value: { + required: true, + serialized_name: 'value', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_collection.rb new file mode 100644 index 0000000000..48f0165f4d --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_collection.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Paged Users list representation. + # + class UserCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Page values. + attr_accessor :value + + # @return [String] Next page link if any. + 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 [UserCollection] 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 UserCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UserCollection', + type: { + name: 'Composite', + class_name: 'UserCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'UserContractElementType', + type: { + name: 'Composite', + class_name: 'UserContract' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_contract.rb new file mode 100644 index 0000000000..3a8473120c --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_contract.rb @@ -0,0 +1,165 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # User details. + # + class UserContract < Resource + + include MsRestAzure + + # @return [UserState] Account state. Specifies whether the user is active + # or not. Blocked users are unable to sign into the developer portal or + # call any APIs of subscribed products. Default state is Active. Possible + # values include: 'active', 'blocked', 'pending', 'deleted'. Default + # value: 'active' . + attr_accessor :state + + # @return [String] Optional note about a user set by the administrator. + attr_accessor :note + + # @return [Array] Collection of user identities. + attr_accessor :identities + + # @return [String] First name. + attr_accessor :first_name + + # @return [String] Last name. + attr_accessor :last_name + + # @return [String] Email address. + attr_accessor :email + + # @return [DateTime] Date of user registration. The date conforms to the + # following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 + # standard. + # + attr_accessor :registration_date + + # @return [Array] Collection of groups user is + # part of. + attr_accessor :groups + + + # + # Mapper for UserContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UserContract', + type: { + name: 'Composite', + class_name: 'UserContract', + 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: false, + serialized_name: 'properties.state', + default_value: 'active', + type: { + name: 'String' + } + }, + note: { + required: false, + serialized_name: 'properties.note', + type: { + name: 'String' + } + }, + identities: { + required: false, + read_only: true, + serialized_name: 'properties.identities', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'UserIdentityContractElementType', + type: { + name: 'Composite', + class_name: 'UserIdentityContract' + } + } + } + }, + first_name: { + required: false, + serialized_name: 'properties.firstName', + type: { + name: 'String' + } + }, + last_name: { + required: false, + serialized_name: 'properties.lastName', + type: { + name: 'String' + } + }, + email: { + required: false, + serialized_name: 'properties.email', + type: { + name: 'String' + } + }, + registration_date: { + required: false, + serialized_name: 'properties.registrationDate', + type: { + name: 'DateTime' + } + }, + groups: { + required: false, + read_only: true, + serialized_name: 'properties.groups', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'GroupContractPropertiesElementType', + type: { + name: 'Composite', + class_name: 'GroupContractProperties' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_create_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_create_parameters.rb new file mode 100644 index 0000000000..5208790cd3 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_create_parameters.rb @@ -0,0 +1,144 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # User create details. + # + class UserCreateParameters + + include MsRestAzure + + # @return [UserState] Account state. Specifies whether the user is active + # or not. Blocked users are unable to sign into the developer portal or + # call any APIs of subscribed products. Default state is Active. Possible + # values include: 'active', 'blocked', 'pending', 'deleted'. Default + # value: 'active' . + attr_accessor :state + + # @return [String] Optional note about a user set by the administrator. + attr_accessor :note + + # @return [Array] Collection of user identities. + attr_accessor :identities + + # @return [String] Email address. Must not be empty and must be unique + # within the service instance. + attr_accessor :email + + # @return [String] First name. + attr_accessor :first_name + + # @return [String] Last name. + attr_accessor :last_name + + # @return [String] User Password. If no value is provided, a default + # password is generated. + attr_accessor :password + + # @return [Confirmation] Determines the type of confirmation e-mail that + # will be sent to the newly created user. Possible values include: + # 'signup', 'invite' + attr_accessor :confirmation + + + # + # Mapper for UserCreateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UserCreateParameters', + type: { + name: 'Composite', + class_name: 'UserCreateParameters', + model_properties: { + state: { + required: false, + serialized_name: 'properties.state', + default_value: 'active', + type: { + name: 'String' + } + }, + note: { + required: false, + serialized_name: 'properties.note', + type: { + name: 'String' + } + }, + identities: { + required: false, + read_only: true, + serialized_name: 'properties.identities', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'UserIdentityContractElementType', + type: { + name: 'Composite', + class_name: 'UserIdentityContract' + } + } + } + }, + email: { + required: true, + serialized_name: 'properties.email', + constraints: { + MaxLength: 254, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + first_name: { + required: true, + serialized_name: 'properties.firstName', + constraints: { + MaxLength: 100, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + last_name: { + required: true, + serialized_name: 'properties.lastName', + constraints: { + MaxLength: 100, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + password: { + required: false, + serialized_name: 'properties.password', + type: { + name: 'String' + } + }, + confirmation: { + required: false, + serialized_name: 'properties.confirmation', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_entity_base_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_entity_base_parameters.rb new file mode 100644 index 0000000000..db6f755ad0 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_entity_base_parameters.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # User Entity Base Parameters set. + # + class UserEntityBaseParameters + + include MsRestAzure + + # @return [UserState] Account state. Specifies whether the user is active + # or not. Blocked users are unable to sign into the developer portal or + # call any APIs of subscribed products. Default state is Active. Possible + # values include: 'active', 'blocked', 'pending', 'deleted'. Default + # value: 'active' . + attr_accessor :state + + # @return [String] Optional note about a user set by the administrator. + attr_accessor :note + + # @return [Array] Collection of user identities. + attr_accessor :identities + + + # + # Mapper for UserEntityBaseParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UserEntityBaseParameters', + type: { + name: 'Composite', + class_name: 'UserEntityBaseParameters', + model_properties: { + state: { + required: false, + serialized_name: 'state', + default_value: 'active', + type: { + name: 'String' + } + }, + note: { + required: false, + serialized_name: 'note', + type: { + name: 'String' + } + }, + identities: { + required: false, + read_only: true, + serialized_name: 'identities', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'UserIdentityContractElementType', + type: { + name: 'Composite', + class_name: 'UserIdentityContract' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_identity_collection.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_identity_collection.rb new file mode 100644 index 0000000000..233c86b922 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_identity_collection.rb @@ -0,0 +1,104 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # List of Users Identity list representation. + # + class UserIdentityCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] User Identity values. + attr_accessor :value + + # @return [Integer] Total record count number across all pages. + attr_accessor :count + + # @return [String] Next page link if any. + 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 [UserIdentityCollection] 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 UserIdentityCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UserIdentityCollection', + type: { + name: 'Composite', + class_name: 'UserIdentityCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'UserIdentityContractElementType', + type: { + name: 'Composite', + class_name: 'UserIdentityContract' + } + } + } + }, + count: { + required: false, + serialized_name: 'count', + type: { + name: 'Number' + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_identity_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_identity_contract.rb new file mode 100644 index 0000000000..f256e54465 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_identity_contract.rb @@ -0,0 +1,54 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # User identity details. + # + class UserIdentityContract + + include MsRestAzure + + # @return [String] Identity provider name. + attr_accessor :provider + + # @return [String] Identifier value within provider. + attr_accessor :id + + + # + # Mapper for UserIdentityContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UserIdentityContract', + type: { + name: 'Composite', + class_name: 'UserIdentityContract', + model_properties: { + provider: { + required: false, + serialized_name: 'provider', + type: { + name: 'String' + } + }, + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_state.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_state.rb new file mode 100644 index 0000000000..25f4c3f04f --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_state.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for UserState + # + module UserState + Active = "active" + Blocked = "blocked" + Pending = "pending" + Deleted = "deleted" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_token_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_token_parameters.rb new file mode 100644 index 0000000000..7be0c8836a --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_token_parameters.rb @@ -0,0 +1,61 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Parameters supplied to the Get User Token operation. + # + class UserTokenParameters + + include MsRestAzure + + # @return [KeyType] The Key to be used to generate token for user. + # Possible values include: 'primary', 'secondary'. Default value: + # 'primary' . + attr_accessor :key_type + + # @return [DateTime] The Expiry time of the Token. Maximum token expiry + # time is set to 30 days. The date conforms to the following format: + # `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + # + attr_accessor :expiry + + + # + # Mapper for UserTokenParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UserTokenParameters', + type: { + name: 'Composite', + class_name: 'UserTokenParameters', + model_properties: { + key_type: { + required: true, + serialized_name: 'keyType', + default_value: 'primary', + type: { + name: 'Enum', + module: 'KeyType' + } + }, + expiry: { + required: true, + serialized_name: 'expiry', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_token_result.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_token_result.rb new file mode 100644 index 0000000000..1008e294aa --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_token_result.rb @@ -0,0 +1,44 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Get User Token response details. + # + class UserTokenResult + + include MsRestAzure + + # @return [String] Shared Access Authorization token for the User. + attr_accessor :value + + + # + # Mapper for UserTokenResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UserTokenResult', + type: { + name: 'Composite', + class_name: 'UserTokenResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_update_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_update_parameters.rb new file mode 100644 index 0000000000..87825d2ccf --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_update_parameters.rb @@ -0,0 +1,131 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # User update parameters. + # + class UserUpdateParameters + + include MsRestAzure + + # @return [UserState] Account state. Specifies whether the user is active + # or not. Blocked users are unable to sign into the developer portal or + # call any APIs of subscribed products. Default state is Active. Possible + # values include: 'active', 'blocked', 'pending', 'deleted'. Default + # value: 'active' . + attr_accessor :state + + # @return [String] Optional note about a user set by the administrator. + attr_accessor :note + + # @return [Array] Collection of user identities. + attr_accessor :identities + + # @return [String] Email address. Must not be empty and must be unique + # within the service instance. + attr_accessor :email + + # @return [String] User Password. + attr_accessor :password + + # @return [String] First name. + attr_accessor :first_name + + # @return [String] Last name. + attr_accessor :last_name + + + # + # Mapper for UserUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UserUpdateParameters', + type: { + name: 'Composite', + class_name: 'UserUpdateParameters', + model_properties: { + state: { + required: false, + serialized_name: 'properties.state', + default_value: 'active', + type: { + name: 'String' + } + }, + note: { + required: false, + serialized_name: 'properties.note', + type: { + name: 'String' + } + }, + identities: { + required: false, + read_only: true, + serialized_name: 'properties.identities', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'UserIdentityContractElementType', + type: { + name: 'Composite', + class_name: 'UserIdentityContract' + } + } + } + }, + email: { + required: false, + serialized_name: 'properties.email', + constraints: { + MaxLength: 254, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + password: { + required: false, + serialized_name: 'properties.password', + type: { + name: 'String' + } + }, + first_name: { + required: false, + serialized_name: 'properties.firstName', + constraints: { + MaxLength: 100, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + last_name: { + required: false, + serialized_name: 'properties.lastName', + constraints: { + MaxLength: 100, + MinLength: 1 + }, + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/versioning_scheme.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/versioning_scheme.rb new file mode 100644 index 0000000000..29c47369d8 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/versioning_scheme.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for VersioningScheme + # + module VersioningScheme + Segment = "Segment" + Query = "Query" + Header = "Header" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/virtual_network_configuration.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/virtual_network_configuration.rb new file mode 100644 index 0000000000..9e441a2336 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/virtual_network_configuration.rb @@ -0,0 +1,72 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Configuration of a virtual network to which API Management service is + # deployed. + # + class VirtualNetworkConfiguration + + include MsRestAzure + + # @return [String] The virtual network ID. This is typically a GUID. + # Expect a null GUID by default. + attr_accessor :vnetid + + # @return [String] The name of the subnet. + attr_accessor :subnetname + + # @return [String] The full resource ID of a subnet in a virtual network + # to deploy the API Management service in. + attr_accessor :subnet_resource_id + + + # + # Mapper for VirtualNetworkConfiguration class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VirtualNetworkConfiguration', + type: { + name: 'Composite', + class_name: 'VirtualNetworkConfiguration', + model_properties: { + vnetid: { + required: false, + read_only: true, + serialized_name: 'vnetid', + type: { + name: 'String' + } + }, + subnetname: { + required: false, + read_only: true, + serialized_name: 'subnetname', + type: { + name: 'String' + } + }, + subnet_resource_id: { + required: false, + serialized_name: 'subnetResourceId', + constraints: { + Pattern: '^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$' + }, + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/virtual_network_type.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/virtual_network_type.rb new file mode 100644 index 0000000000..9fedb56f67 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/virtual_network_type.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Defines values for VirtualNetworkType + # + module VirtualNetworkType + None = "None" + External = "External" + Internal = "Internal" + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/x509certificate_name.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/x509certificate_name.rb new file mode 100644 index 0000000000..aadfc5dd86 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/x509certificate_name.rb @@ -0,0 +1,54 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Properties of server X509Names. + # + class X509CertificateName + + include MsRestAzure + + # @return [String] Common Name of the Certificate. + attr_accessor :name + + # @return [String] Thumbprint for the Issuer of the Certificate. + attr_accessor :issuer_certificate_thumbprint + + + # + # Mapper for X509CertificateName class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'X509CertificateName', + type: { + name: 'Composite', + class_name: 'X509CertificateName', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + issuer_certificate_thumbprint: { + required: false, + serialized_name: 'issuerCertificateThumbprint', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/module_definition.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/module_definition.rb new file mode 100644 index 0000000000..d0a58ba7dc --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/module_definition.rb @@ -0,0 +1,9 @@ +# 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 end +module Azure::ApiManagement end +module Azure::ApiManagement::Mgmt end +module Azure::ApiManagement::Mgmt::V2018_01_01_preview end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/network_status.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/network_status.rb new file mode 100644 index 0000000000..816acceb57 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/network_status.rb @@ -0,0 +1,243 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class NetworkStatus + include MsRestAzure + + # + # Creates and initializes a new instance of the NetworkStatus class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Gets the Connectivity Status to the external resources on which the Api + # Management service depends from inside the Cloud Service. This also returns + # the DNS Servers as visible to the CloudService. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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_service(resource_group_name, service_name, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the Connectivity Status to the external resources on which the Api + # Management service depends from inside the Cloud Service. This also returns + # the DNS Servers as visible to the CloudService. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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_service_with_http_info(resource_group_name, service_name, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, custom_headers).value! + end + + # + # Gets the Connectivity Status to the external resources on which the Api + # Management service depends from inside the Cloud Service. This also returns + # the DNS Servers as visible to the CloudService. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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_service_async(resource_group_name, service_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, 'service_name is nil' if service_name.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.ApiManagement/service/{serviceName}/networkstatus' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serviceName' => service_name}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'NetworkStatusContractByLocationElementType', + type: { + name: 'Composite', + class_name: 'NetworkStatusContractByLocation' + } + } + } + } + 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 Connectivity Status to the external resources on which the Api + # Management service depends from inside the Cloud Service. This also returns + # the DNS Servers as visible to the CloudService. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param location_name [String] Location in which the API Management service is + # deployed. This is one of the Azure Regions like West US, East US, South + # Central US. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkStatusContract] operation results. + # + def list_by_location(resource_group_name, service_name, location_name, custom_headers = nil) + response = list_by_location_async(resource_group_name, service_name, location_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the Connectivity Status to the external resources on which the Api + # Management service depends from inside the Cloud Service. This also returns + # the DNS Servers as visible to the CloudService. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param location_name [String] Location in which the API Management service is + # deployed. This is one of the Azure Regions like West US, East US, South + # Central US. + # @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(resource_group_name, service_name, location_name, custom_headers = nil) + list_by_location_async(resource_group_name, service_name, location_name, custom_headers).value! + end + + # + # Gets the Connectivity Status to the external resources on which the Api + # Management service depends from inside the Cloud Service. This also returns + # the DNS Servers as visible to the CloudService. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param location_name [String] Location in which the API Management service is + # deployed. This is one of the Azure Regions like West US, East US, South + # Central US. + # @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(resource_group_name, service_name, location_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, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'location_name is nil' if location_name.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.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serviceName' => service_name,'locationName' => location_name}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::NetworkStatusContract.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_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/notification.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/notification.rb new file mode 100644 index 0000000000..bcb11edbc5 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/notification.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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class Notification + include MsRestAzure + + # + # Creates and initializes a new instance of the Notification class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists a collection of properties defined within a service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service(resource_group_name, service_name, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists a collection of properties defined within a service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_service_with_http_info(resource_group_name, service_name, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, top, skip, custom_headers).value! + end + + # + # Lists a collection of properties defined within a service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service_async(resource_group_name, service_name, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01_preview::Models::NotificationCollection.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 details of the Notification specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NotificationContract] operation results. + # + def get(resource_group_name, service_name, notification_name, custom_headers = nil) + response = get_async(resource_group_name, service_name, notification_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of the Notification specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @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, service_name, notification_name, custom_headers = nil) + get_async(resource_group_name, service_name, notification_name, custom_headers).value! + end + + # + # Gets the details of the Notification specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @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, service_name, notification_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'notification_name is nil' if notification_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'notificationName' => notification_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::NotificationContract.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 an Notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NotificationContract] operation results. + # + def create_or_update(resource_group_name, service_name, notification_name, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, notification_name, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates an Notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, notification_name, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, notification_name, if_match, custom_headers).value! + end + + # + # Updates an Notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, notification_name, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'notification_name is nil' if notification_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'notificationName' => notification_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::NotificationContract.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 collection of properties defined within a service instance. + # + # @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 [NotificationCollection] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists a collection of properties defined within a service instance. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists a collection of properties defined within a service instance. + # + # @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_service_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::NotificationCollection.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 collection of properties defined within a service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NotificationCollection] which provide lazy access to pages of the + # response. + # + def list_by_service_as_lazy(resource_group_name, service_name, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/notification_recipient_email.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/notification_recipient_email.rb new file mode 100644 index 0000000000..2974b71010 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/notification_recipient_email.rb @@ -0,0 +1,458 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class NotificationRecipientEmail + include MsRestAzure + + # + # Creates and initializes a new instance of the NotificationRecipientEmail class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Gets the list of the Notification Recipient Emails subscribed to a + # notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecipientEmailCollection] operation results. + # + def list_by_notification(resource_group_name, service_name, notification_name, custom_headers = nil) + response = list_by_notification_async(resource_group_name, service_name, notification_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of the Notification Recipient Emails subscribed to a + # notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @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_notification_with_http_info(resource_group_name, service_name, notification_name, custom_headers = nil) + list_by_notification_async(resource_group_name, service_name, notification_name, custom_headers).value! + end + + # + # Gets the list of the Notification Recipient Emails subscribed to a + # notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @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_notification_async(resource_group_name, service_name, notification_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'notification_name is nil' if notification_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'notificationName' => notification_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::RecipientEmailCollection.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 + + # + # Determine if Notification Recipient Email subscribed to the notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param email [String] Email identifier. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Boolean] operation results. + # + def check_entity_exists(resource_group_name, service_name, notification_name, email, custom_headers = nil) + response = check_entity_exists_async(resource_group_name, service_name, notification_name, email, custom_headers).value! + response.body unless response.nil? + end + + # + # Determine if Notification Recipient Email subscribed to the notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param email [String] Email identifier. + # @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 check_entity_exists_with_http_info(resource_group_name, service_name, notification_name, email, custom_headers = nil) + check_entity_exists_async(resource_group_name, service_name, notification_name, email, custom_headers).value! + end + + # + # Determine if Notification Recipient Email subscribed to the notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param email [String] Email identifier. + # @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 check_entity_exists_async(resource_group_name, service_name, notification_name, email, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'notification_name is nil' if notification_name.nil? + fail ArgumentError, 'email is nil' if email.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'notificationName' => notification_name,'email' => email,'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(:head, 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 == 204 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.body = (status_code == 204) + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Adds the Email address to the list of Recipients for the Notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param email [String] Email identifier. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecipientEmailContract] operation results. + # + def create_or_update(resource_group_name, service_name, notification_name, email, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, notification_name, email, custom_headers).value! + response.body unless response.nil? + end + + # + # Adds the Email address to the list of Recipients for the Notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param email [String] Email identifier. + # @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, service_name, notification_name, email, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, notification_name, email, custom_headers).value! + end + + # + # Adds the Email address to the list of Recipients for the Notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param email [String] Email identifier. + # @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, service_name, notification_name, email, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'notification_name is nil' if notification_name.nil? + fail ArgumentError, 'email is nil' if email.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'notificationName' => notification_name,'email' => email,'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 == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::RecipientEmailContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::RecipientEmailContract.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 email from the list of Notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param email [String] Email identifier. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, notification_name, email, custom_headers = nil) + response = delete_async(resource_group_name, service_name, notification_name, email, custom_headers).value! + nil + end + + # + # Removes the email from the list of Notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param email [String] Email identifier. + # @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, service_name, notification_name, email, custom_headers = nil) + delete_async(resource_group_name, service_name, notification_name, email, custom_headers).value! + end + + # + # Removes the email from the list of Notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param email [String] Email identifier. + # @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, service_name, notification_name, email, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'notification_name is nil' if notification_name.nil? + fail ArgumentError, 'email is nil' if email.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'notificationName' => notification_name,'email' => email,'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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/notification_recipient_user.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/notification_recipient_user.rb new file mode 100644 index 0000000000..ee353dae08 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/notification_recipient_user.rb @@ -0,0 +1,470 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class NotificationRecipientUser + include MsRestAzure + + # + # Creates and initializes a new instance of the NotificationRecipientUser class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Gets the list of the Notification Recipient User subscribed to the + # notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecipientUserCollection] operation results. + # + def list_by_notification(resource_group_name, service_name, notification_name, custom_headers = nil) + response = list_by_notification_async(resource_group_name, service_name, notification_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of the Notification Recipient User subscribed to the + # notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @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_notification_with_http_info(resource_group_name, service_name, notification_name, custom_headers = nil) + list_by_notification_async(resource_group_name, service_name, notification_name, custom_headers).value! + end + + # + # Gets the list of the Notification Recipient User subscribed to the + # notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @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_notification_async(resource_group_name, service_name, notification_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'notification_name is nil' if notification_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'notificationName' => notification_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::RecipientUserCollection.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 + + # + # Determine if the Notification Recipient User is subscribed to the + # notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Boolean] operation results. + # + def check_entity_exists(resource_group_name, service_name, notification_name, uid, custom_headers = nil) + response = check_entity_exists_async(resource_group_name, service_name, notification_name, uid, custom_headers).value! + response.body unless response.nil? + end + + # + # Determine if the Notification Recipient User is subscribed to the + # notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param uid [String] User identifier. Must be unique in the current API + # Management service 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 check_entity_exists_with_http_info(resource_group_name, service_name, notification_name, uid, custom_headers = nil) + check_entity_exists_async(resource_group_name, service_name, notification_name, uid, custom_headers).value! + end + + # + # Determine if the Notification Recipient User is subscribed to the + # notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param uid [String] User identifier. Must be unique in the current API + # Management service 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 check_entity_exists_async(resource_group_name, service_name, notification_name, uid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'notification_name is nil' if notification_name.nil? + fail ArgumentError, 'uid is nil' if uid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{uid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'notificationName' => notification_name,'uid' => uid,'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(:head, 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 == 204 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.body = (status_code == 204) + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Adds the API Management User to the list of Recipients for the Notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecipientUserContract] operation results. + # + def create_or_update(resource_group_name, service_name, notification_name, uid, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, notification_name, uid, custom_headers).value! + response.body unless response.nil? + end + + # + # Adds the API Management User to the list of Recipients for the Notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param uid [String] User identifier. Must be unique in the current API + # Management service 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 create_or_update_with_http_info(resource_group_name, service_name, notification_name, uid, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, notification_name, uid, custom_headers).value! + end + + # + # Adds the API Management User to the list of Recipients for the Notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param uid [String] User identifier. Must be unique in the current API + # Management service 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 create_or_update_async(resource_group_name, service_name, notification_name, uid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'notification_name is nil' if notification_name.nil? + fail ArgumentError, 'uid is nil' if uid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{uid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'notificationName' => notification_name,'uid' => uid,'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 == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::RecipientUserContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::RecipientUserContract.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 API Management user from the list of Notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param uid [String] User identifier. Must be unique in the current API + # Management service 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, service_name, notification_name, uid, custom_headers = nil) + response = delete_async(resource_group_name, service_name, notification_name, uid, custom_headers).value! + nil + end + + # + # Removes the API Management user from the list of Notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param uid [String] User identifier. Must be unique in the current API + # Management service 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 delete_with_http_info(resource_group_name, service_name, notification_name, uid, custom_headers = nil) + delete_async(resource_group_name, service_name, notification_name, uid, custom_headers).value! + end + + # + # Removes the API Management user from the list of Notification. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param notification_name [NotificationName] Notification Name Identifier. + # Possible values include: 'RequestPublisherNotificationMessage', + # 'PurchasePublisherNotificationMessage', 'NewApplicationNotificationMessage', + # 'BCC', 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + # 'QuotaLimitApproachingPublisherNotificationMessage' + # @param uid [String] User identifier. Must be unique in the current API + # Management service 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 delete_async(resource_group_name, service_name, notification_name, uid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'notification_name is nil' if notification_name.nil? + fail ArgumentError, 'uid is nil' if uid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{uid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'notificationName' => notification_name,'uid' => uid,'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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/open_id_connect_provider.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/open_id_connect_provider.rb new file mode 100644 index 0000000000..0f1fa295ae --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/open_id_connect_provider.rb @@ -0,0 +1,774 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class OpenIdConnectProvider + include MsRestAzure + + # + # Creates and initializes a new instance of the OpenIdConnectProvider class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists all OpenID Connect Providers. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists all OpenID Connect Providers. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + end + + # + # Lists all OpenID Connect Providers. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01_preview::Models::OpenIdConnectProviderCollection.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 entity state (Etag) version of the openIdConnectProvider specified + # by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param opid [String] Identifier of the OpenID Connect Provider. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, opid, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, opid, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the openIdConnectProvider specified + # by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param opid [String] Identifier of the OpenID Connect Provider. + # @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_entity_tag_with_http_info(resource_group_name, service_name, opid, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, opid, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the openIdConnectProvider specified + # by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param opid [String] Identifier of the OpenID Connect Provider. + # @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_entity_tag_async(resource_group_name, service_name, opid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'opid is nil' if opid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'opid' => opid,'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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets specific OpenID Connect Provider. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param opid [String] Identifier of the OpenID Connect Provider. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [OpenidConnectProviderContract] operation results. + # + def get(resource_group_name, service_name, opid, custom_headers = nil) + response = get_async(resource_group_name, service_name, opid, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets specific OpenID Connect Provider. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param opid [String] Identifier of the OpenID Connect Provider. + # @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, service_name, opid, custom_headers = nil) + get_async(resource_group_name, service_name, opid, custom_headers).value! + end + + # + # Gets specific OpenID Connect Provider. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param opid [String] Identifier of the OpenID Connect Provider. + # @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, service_name, opid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'opid is nil' if opid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'opid' => opid,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::OpenidConnectProviderContract.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 OpenID Connect Provider. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param opid [String] Identifier of the OpenID Connect Provider. + # @param parameters [OpenidConnectProviderContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [OpenidConnectProviderContract] operation results. + # + def create_or_update(resource_group_name, service_name, opid, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, opid, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates the OpenID Connect Provider. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param opid [String] Identifier of the OpenID Connect Provider. + # @param parameters [OpenidConnectProviderContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, opid, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, opid, parameters, if_match, custom_headers).value! + end + + # + # Creates or updates the OpenID Connect Provider. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param opid [String] Identifier of the OpenID Connect Provider. + # @param parameters [OpenidConnectProviderContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, opid, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'opid is nil' if opid.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::OpenidConnectProviderContract.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.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'opid' => opid,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::OpenidConnectProviderContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::OpenidConnectProviderContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Updates the specific OpenID Connect Provider. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param opid [String] Identifier of the OpenID Connect Provider. + # @param parameters [OpenidConnectProviderUpdateContract] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, opid, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, opid, parameters, if_match, custom_headers).value! + nil + end + + # + # Updates the specific OpenID Connect Provider. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param opid [String] Identifier of the OpenID Connect Provider. + # @param parameters [OpenidConnectProviderUpdateContract] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, opid, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, opid, parameters, if_match, custom_headers).value! + end + + # + # Updates the specific OpenID Connect Provider. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param opid [String] Identifier of the OpenID Connect Provider. + # @param parameters [OpenidConnectProviderUpdateContract] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, opid, parameters, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'opid is nil' if opid.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::OpenidConnectProviderUpdateContract.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.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'opid' => opid,'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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Deletes specific OpenID Connect Provider of the API Management service + # instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param opid [String] Identifier of the OpenID Connect Provider. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, opid, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, opid, if_match, custom_headers).value! + nil + end + + # + # Deletes specific OpenID Connect Provider of the API Management service + # instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param opid [String] Identifier of the OpenID Connect Provider. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, opid, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, opid, if_match, custom_headers).value! + end + + # + # Deletes specific OpenID Connect Provider of the API Management service + # instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param opid [String] Identifier of the OpenID Connect Provider. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, opid, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'opid is nil' if opid.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'opid' => opid,'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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists all OpenID Connect Providers. + # + # @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 [OpenIdConnectProviderCollection] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all OpenID Connect Providers. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all OpenID Connect Providers. + # + # @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_service_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::OpenIdConnectProviderCollection.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 OpenID Connect Providers. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [OpenIdConnectProviderCollection] which provide lazy access to pages + # of the response. + # + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/operation_operations.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/operation_operations.rb new file mode 100644 index 0000000000..b2c91a6d96 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/operation_operations.rb @@ -0,0 +1,306 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class OperationOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the OperationOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists a collection of operations associated with tags. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | apiName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_tags(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_tags_as_lazy(resource_group_name, service_name, api_id, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists a collection of operations associated with tags. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | apiName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_tags_with_http_info(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_tags_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! + end + + # + # Lists a collection of operations associated with tags. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | apiName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_tags_async(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagResourceCollection.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 collection of operations associated with tags. + # + # @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 [TagResourceCollection] operation results. + # + def list_by_tags_next(next_page_link, custom_headers = nil) + response = list_by_tags_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists a collection of operations associated with tags. + # + # @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_tags_next_with_http_info(next_page_link, custom_headers = nil) + list_by_tags_next_async(next_page_link, custom_headers).value! + end + + # + # Lists a collection of operations associated with tags. + # + # @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_tags_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagResourceCollection.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 collection of operations associated with tags. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | apiName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TagResourceCollection] which provide lazy access to pages of the + # response. + # + def list_by_tags_as_lazy(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_tags_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_tags_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/policy.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/policy.rb new file mode 100644 index 0000000000..567aa030a6 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/policy.rb @@ -0,0 +1,508 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class Policy + include MsRestAzure + + # + # Creates and initializes a new instance of the Policy class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists all the Global Policy definitions of the Api Management service. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param scope [PolicyScopeContract] Policy scope. Possible values include: + # 'Tenant', 'Product', 'Api', 'Operation', 'All' + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicyCollection] operation results. + # + def list_by_service(resource_group_name, service_name, scope = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, scope, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all the Global Policy definitions of the Api Management service. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param scope [PolicyScopeContract] Policy scope. Possible values include: + # 'Tenant', 'Product', 'Api', 'Operation', 'All' + # @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_service_with_http_info(resource_group_name, service_name, scope = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, scope, custom_headers).value! + end + + # + # Lists all the Global Policy definitions of the Api Management service. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param scope [PolicyScopeContract] Policy scope. Possible values include: + # 'Tenant', 'Product', 'Api', 'Operation', 'All' + # @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_service_async(resource_group_name, service_name, scope = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'scope' => scope,'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::ApiManagement::Mgmt::V2018_01_01_preview::Models::PolicyCollection.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 entity state (Etag) version of the Global policy definition in the + # Api Management service. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the Global policy definition in the + # Api Management service. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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_entity_tag_with_http_info(resource_group_name, service_name, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the Global policy definition in the + # Api Management service. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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_entity_tag_async(resource_group_name, service_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + policy_id = 'policy' + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'policyId' => policy_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Get the Global policy definition of the Api Management service. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicyContract] operation results. + # + def get(resource_group_name, service_name, custom_headers = nil) + response = get_async(resource_group_name, service_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the Global policy definition of the Api Management service. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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, service_name, custom_headers = nil) + get_async(resource_group_name, service_name, custom_headers).value! + end + + # + # Get the Global policy definition of the Api Management service. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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, service_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + policy_id = 'policy' + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'policyId' => policy_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PolicyContract.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 global policy configuration of the Api Management + # service. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [PolicyContract] The policy contents to apply. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicyContract] operation results. + # + def create_or_update(resource_group_name, service_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates the global policy configuration of the Api Management + # service. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [PolicyContract] The policy contents to apply. + # @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, service_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, parameters, custom_headers).value! + end + + # + # Creates or updates the global policy configuration of the Api Management + # service. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [PolicyContract] The policy contents to apply. + # @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, service_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + policy_id = 'policy' + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PolicyContract.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.ApiManagement/service/{serviceName}/policies/{policyId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'policyId' => policy_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PolicyContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PolicyContract.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 global policy configuration of the Api Management Service. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, if_match, custom_headers).value! + nil + end + + # + # Deletes the global policy configuration of the Api Management Service. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, if_match, custom_headers).value! + end + + # + # Deletes the global policy configuration of the Api Management Service. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + policy_id = 'policy' + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'policyId' => policy_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/policy_snippets.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/policy_snippets.rb new file mode 100644 index 0000000000..d19ebb4641 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/policy_snippets.rb @@ -0,0 +1,122 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class PolicySnippets + include MsRestAzure + + # + # Creates and initializes a new instance of the PolicySnippets class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists all policy snippets. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param scope [PolicyScopeContract] Policy scope. Possible values include: + # 'Tenant', 'Product', 'Api', 'Operation', 'All' + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicySnippetsCollection] operation results. + # + def list_by_service(resource_group_name, service_name, scope = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, scope, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all policy snippets. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param scope [PolicyScopeContract] Policy scope. Possible values include: + # 'Tenant', 'Product', 'Api', 'Operation', 'All' + # @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_service_with_http_info(resource_group_name, service_name, scope = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, scope, custom_headers).value! + end + + # + # Lists all policy snippets. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param scope [PolicyScopeContract] Policy scope. Possible values include: + # 'Tenant', 'Product', 'Api', 'Operation', 'All' + # @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_service_async(resource_group_name, service_name, scope = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policySnippets' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'scope' => scope,'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::ApiManagement::Mgmt::V2018_01_01_preview::Models::PolicySnippetsCollection.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_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product.rb new file mode 100644 index 0000000000..14e54ac639 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product.rb @@ -0,0 +1,824 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class Product + include MsRestAzure + + # + # Creates and initializes a new instance of the Product class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists a collection of products in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | terms | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | state | eq | + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param expand_groups [Boolean] When set to true, the response contains an + # array of groups that have visibility to the product. The default is false. + # @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_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, expand_groups = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, expand_groups, custom_headers) + first_page.get_all_items + end + + # + # Lists a collection of products in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | terms | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | state | eq | + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param expand_groups [Boolean] When set to true, the response contains an + # array of groups that have visibility to the product. The default is false. + # @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_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, expand_groups = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, expand_groups, custom_headers).value! + end + + # + # Lists a collection of products in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | terms | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | state | eq | + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param expand_groups [Boolean] When set to true, the response contains an + # array of groups that have visibility to the product. The default is false. + # @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_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, expand_groups = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'expandGroups' => expand_groups,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ProductCollection.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 entity state (Etag) version of the product specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, product_id, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, product_id, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the product specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service 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_entity_tag_with_http_info(resource_group_name, service_name, product_id, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, product_id, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the product specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service 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_entity_tag_async(resource_group_name, service_name, product_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the details of the product specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProductContract] operation results. + # + def get(resource_group_name, service_name, product_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, product_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of the product specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service 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, service_name, product_id, custom_headers = nil) + get_async(resource_group_name, service_name, product_id, custom_headers).value! + end + + # + # Gets the details of the product specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service 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, service_name, product_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ProductContract.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 product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param parameters [ProductContract] Create or update parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProductContract] operation results. + # + def create_or_update(resource_group_name, service_name, product_id, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or Updates a product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param parameters [ProductContract] Create or update parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, product_id, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers).value! + end + + # + # Creates or Updates a product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param parameters [ProductContract] Create or update parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, product_id, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ProductContract.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.ApiManagement/service/{serviceName}/products/{productId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ProductContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ProductContract.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 product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param parameters [ProductUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, product_id, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers).value! + nil + end + + # + # Update product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param parameters [ProductUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, product_id, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers).value! + end + + # + # Update product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param parameters [ProductUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, product_id, parameters, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ProductUpdateParameters.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.ApiManagement/service/{serviceName}/products/{productId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_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(: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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Delete product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param delete_subscriptions [Boolean] Delete existing subscriptions + # associated with the product or not. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, product_id, if_match, delete_subscriptions = nil, custom_headers = nil) + response = delete_async(resource_group_name, service_name, product_id, if_match, delete_subscriptions, custom_headers).value! + nil + end + + # + # Delete product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param delete_subscriptions [Boolean] Delete existing subscriptions + # associated with the product or not. + # @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, service_name, product_id, if_match, delete_subscriptions = nil, custom_headers = nil) + delete_async(resource_group_name, service_name, product_id, if_match, delete_subscriptions, custom_headers).value! + end + + # + # Delete product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param delete_subscriptions [Boolean] Delete existing subscriptions + # associated with the product or not. + # @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, service_name, product_id, if_match, delete_subscriptions = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_id,'subscriptionId' => @client.subscription_id}, + query_params: {'deleteSubscriptions' => delete_subscriptions,'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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists a collection of products in the specified service instance. + # + # @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 [ProductCollection] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists a collection of products in the specified service instance. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists a collection of products in the specified service instance. + # + # @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_service_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ProductCollection.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 collection of products in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | terms | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | state | eq | + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param expand_groups [Boolean] When set to true, the response contains an + # array of groups that have visibility to the product. The default is false. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProductCollection] which provide lazy access to pages of the + # response. + # + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, expand_groups = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, expand_groups, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product_api.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product_api.rb new file mode 100644 index 0000000000..11d19cb4d1 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product_api.rb @@ -0,0 +1,614 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class ProductApi + include MsRestAzure + + # + # Creates and initializes a new instance of the ProductApi class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists a collection of the APIs associated with a product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_product(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_product_as_lazy(resource_group_name, service_name, product_id, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists a collection of the APIs associated with a product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_product_with_http_info(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_product_async(resource_group_name, service_name, product_id, filter, top, skip, custom_headers).value! + end + + # + # Lists a collection of the APIs associated with a product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_product_async(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_id,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiCollection.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 + + # + # Checks that API entity specified by identifier is associated with the Product + # entity. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Boolean] operation results. + # + def check_entity_exists(resource_group_name, service_name, product_id, api_id, custom_headers = nil) + response = check_entity_exists_async(resource_group_name, service_name, product_id, api_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Checks that API entity specified by identifier is associated with the Product + # entity. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @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 check_entity_exists_with_http_info(resource_group_name, service_name, product_id, api_id, custom_headers = nil) + check_entity_exists_async(resource_group_name, service_name, product_id, api_id, custom_headers).value! + end + + # + # Checks that API entity specified by identifier is associated with the Product + # entity. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @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 check_entity_exists_async(resource_group_name, service_name, product_id, api_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_id,'apiId' => api_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(:head, 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 == 204 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.body = (status_code == 204) + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Adds an API to the specified product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiContract] operation results. + # + def create_or_update(resource_group_name, service_name, product_id, api_id, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, product_id, api_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Adds an API to the specified product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @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, service_name, product_id, api_id, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, product_id, api_id, custom_headers).value! + end + + # + # Adds an API to the specified product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @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, service_name, product_id, api_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_id,'apiId' => api_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 == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes the specified API from the specified product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, product_id, api_id, custom_headers = nil) + response = delete_async(resource_group_name, service_name, product_id, api_id, custom_headers).value! + nil + end + + # + # Deletes the specified API from the specified product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @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, service_name, product_id, api_id, custom_headers = nil) + delete_async(resource_group_name, service_name, product_id, api_id, custom_headers).value! + end + + # + # Deletes the specified API from the specified product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @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, service_name, product_id, api_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_id,'apiId' => api_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists a collection of the APIs associated with a product. + # + # @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 [ApiCollection] operation results. + # + def list_by_product_next(next_page_link, custom_headers = nil) + response = list_by_product_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists a collection of the APIs associated with a product. + # + # @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_product_next_with_http_info(next_page_link, custom_headers = nil) + list_by_product_next_async(next_page_link, custom_headers).value! + end + + # + # Lists a collection of the APIs associated with a product. + # + # @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_product_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::ApiCollection.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 collection of the APIs associated with a product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApiCollection] which provide lazy access to pages of the response. + # + def list_by_product_as_lazy(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_product_async(resource_group_name, service_name, product_id, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_product_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product_group.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product_group.rb new file mode 100644 index 0000000000..7051f85323 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product_group.rb @@ -0,0 +1,603 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class ProductGroup + include MsRestAzure + + # + # Creates and initializes a new instance of the ProductGroup class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists the collection of developer groups associated with the specified + # product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | type | eq, ne | N/A + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_product(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_product_as_lazy(resource_group_name, service_name, product_id, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists the collection of developer groups associated with the specified + # product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | type | eq, ne | N/A + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_product_with_http_info(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_product_async(resource_group_name, service_name, product_id, filter, top, skip, custom_headers).value! + end + + # + # Lists the collection of developer groups associated with the specified + # product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | type | eq, ne | N/A + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_product_async(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_id,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::GroupCollection.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 + + # + # Checks that Group entity specified by identifier is associated with the + # Product entity. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Boolean] operation results. + # + def check_entity_exists(resource_group_name, service_name, product_id, group_id, custom_headers = nil) + response = check_entity_exists_async(resource_group_name, service_name, product_id, group_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Checks that Group entity specified by identifier is associated with the + # Product entity. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service 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 check_entity_exists_with_http_info(resource_group_name, service_name, product_id, group_id, custom_headers = nil) + check_entity_exists_async(resource_group_name, service_name, product_id, group_id, custom_headers).value! + end + + # + # Checks that Group entity specified by identifier is associated with the + # Product entity. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service 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 check_entity_exists_async(resource_group_name, service_name, product_id, group_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + fail ArgumentError, 'group_id is nil' if group_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_id,'groupId' => group_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(:head, 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 == 204 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.body = (status_code == 204) + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Adds the association between the specified developer group with the specified + # product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [GroupContract] operation results. + # + def create_or_update(resource_group_name, service_name, product_id, group_id, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, product_id, group_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Adds the association between the specified developer group with the specified + # product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service 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 create_or_update_with_http_info(resource_group_name, service_name, product_id, group_id, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, product_id, group_id, custom_headers).value! + end + + # + # Adds the association between the specified developer group with the specified + # product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service 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 create_or_update_async(resource_group_name, service_name, product_id, group_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + fail ArgumentError, 'group_id is nil' if group_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_id,'groupId' => group_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 == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::GroupContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::GroupContract.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 association between the specified group and product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service 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, service_name, product_id, group_id, custom_headers = nil) + response = delete_async(resource_group_name, service_name, product_id, group_id, custom_headers).value! + nil + end + + # + # Deletes the association between the specified group and product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service 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 delete_with_http_info(resource_group_name, service_name, product_id, group_id, custom_headers = nil) + delete_async(resource_group_name, service_name, product_id, group_id, custom_headers).value! + end + + # + # Deletes the association between the specified group and product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param group_id [String] Group identifier. Must be unique in the current API + # Management service 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 delete_async(resource_group_name, service_name, product_id, group_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + fail ArgumentError, 'group_id is nil' if group_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_id,'groupId' => group_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists the collection of developer groups associated with the specified + # product. + # + # @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 [GroupCollection] operation results. + # + def list_by_product_next(next_page_link, custom_headers = nil) + response = list_by_product_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists the collection of developer groups associated with the specified + # product. + # + # @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_product_next_with_http_info(next_page_link, custom_headers = nil) + list_by_product_next_async(next_page_link, custom_headers).value! + end + + # + # Lists the collection of developer groups associated with the specified + # product. + # + # @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_product_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::GroupCollection.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 collection of developer groups associated with the specified + # product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | type | eq, ne | N/A + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [GroupCollection] which provide lazy access to pages of the response. + # + def list_by_product_as_lazy(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_product_async(resource_group_name, service_name, product_id, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_product_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product_policy.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product_policy.rb new file mode 100644 index 0000000000..8f0de63f7e --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product_policy.rb @@ -0,0 +1,538 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class ProductPolicy + include MsRestAzure + + # + # Creates and initializes a new instance of the ProductPolicy class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Get the policy configuration at the Product level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicyCollection] operation results. + # + def list_by_product(resource_group_name, service_name, product_id, custom_headers = nil) + response = list_by_product_async(resource_group_name, service_name, product_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the policy configuration at the Product level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service 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_product_with_http_info(resource_group_name, service_name, product_id, custom_headers = nil) + list_by_product_async(resource_group_name, service_name, product_id, custom_headers).value! + end + + # + # Get the policy configuration at the Product level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service 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_product_async(resource_group_name, service_name, product_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'productId' => product_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PolicyCollection.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 + + # + # Get the ETag of the policy configuration at the Product level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, product_id, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, product_id, custom_headers).value! + nil + end + + # + # Get the ETag of the policy configuration at the Product level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service 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_entity_tag_with_http_info(resource_group_name, service_name, product_id, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, product_id, custom_headers).value! + end + + # + # Get the ETag of the policy configuration at the Product level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service 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_entity_tag_async(resource_group_name, service_name, product_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + policy_id = 'policy' + + + 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.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'productId' => product_id,'policyId' => policy_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Get the policy configuration at the Product level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicyContract] operation results. + # + def get(resource_group_name, service_name, product_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, product_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the policy configuration at the Product level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service 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, service_name, product_id, custom_headers = nil) + get_async(resource_group_name, service_name, product_id, custom_headers).value! + end + + # + # Get the policy configuration at the Product level. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service 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, service_name, product_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + policy_id = 'policy' + + + 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.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'productId' => product_id,'policyId' => policy_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PolicyContract.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 policy configuration for the Product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param parameters [PolicyContract] The policy contents to apply. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicyContract] operation results. + # + def create_or_update(resource_group_name, service_name, product_id, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates policy configuration for the Product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param parameters [PolicyContract] The policy contents to apply. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, product_id, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, product_id, parameters, if_match, custom_headers).value! + end + + # + # Creates or updates policy configuration for the Product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param parameters [PolicyContract] The policy contents to apply. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, product_id, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + policy_id = 'policy' + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::PolicyContract.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.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_id,'policyId' => policy_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PolicyContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PolicyContract.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 policy configuration at the Product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, product_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, product_id, if_match, custom_headers).value! + nil + end + + # + # Deletes the policy configuration at the Product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, product_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, product_id, if_match, custom_headers).value! + end + + # + # Deletes the policy configuration at the Product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, product_id, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + policy_id = 'policy' + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_id,'policyId' => policy_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product_subscriptions.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product_subscriptions.rb new file mode 100644 index 0000000000..67e3592726 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product_subscriptions.rb @@ -0,0 +1,302 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class ProductSubscriptions + include MsRestAzure + + # + # Creates and initializes a new instance of the ProductSubscriptions class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists the collection of subscriptions to the specified product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |--------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | state | eq | + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, service_name, product_id, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists the collection of subscriptions to the specified product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |--------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | state | eq | + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_async(resource_group_name, service_name, product_id, filter, top, skip, custom_headers).value! + end + + # + # Lists the collection of subscriptions to the specified product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |--------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | state | eq | + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_id,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::SubscriptionCollection.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 collection of subscriptions to the specified product. + # + # @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 [SubscriptionCollection] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists the collection of subscriptions to the specified product. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Lists the collection of subscriptions to the specified product. + # + # @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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::SubscriptionCollection.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 collection of subscriptions to the specified product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |--------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | state | eq | + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SubscriptionCollection] which provide lazy access to pages of the + # response. + # + def list_as_lazy(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_async(resource_group_name, service_name, product_id, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/property.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/property.rb new file mode 100644 index 0000000000..882e883091 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/property.rb @@ -0,0 +1,771 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class Property + include MsRestAzure + + # + # Creates and initializes a new instance of the Property class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists a collection of properties defined within a service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|-------------------------------------------------------| + # | tags | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith, any, all | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists a collection of properties defined within a service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|-------------------------------------------------------| + # | tags | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith, any, all | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + end + + # + # Lists a collection of properties defined within a service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|-------------------------------------------------------| + # | tags | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith, any, all | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01_preview::Models::PropertyCollection.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 entity state (Etag) version of the property specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param prop_id [String] Identifier of the property. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, prop_id, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, prop_id, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the property specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param prop_id [String] Identifier of the property. + # @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_entity_tag_with_http_info(resource_group_name, service_name, prop_id, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, prop_id, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the property specified by its + # identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param prop_id [String] Identifier of the property. + # @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_entity_tag_async(resource_group_name, service_name, prop_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'prop_id is nil' if prop_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties/{propId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'propId' => prop_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the details of the property specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param prop_id [String] Identifier of the property. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PropertyContract] operation results. + # + def get(resource_group_name, service_name, prop_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, prop_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of the property specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param prop_id [String] Identifier of the property. + # @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, service_name, prop_id, custom_headers = nil) + get_async(resource_group_name, service_name, prop_id, custom_headers).value! + end + + # + # Gets the details of the property specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param prop_id [String] Identifier of the property. + # @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, service_name, prop_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'prop_id is nil' if prop_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties/{propId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'propId' => prop_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PropertyContract.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 property. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param prop_id [String] Identifier of the property. + # @param parameters [PropertyContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PropertyContract] operation results. + # + def create_or_update(resource_group_name, service_name, prop_id, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a property. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param prop_id [String] Identifier of the property. + # @param parameters [PropertyContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, prop_id, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers).value! + end + + # + # Creates or updates a property. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param prop_id [String] Identifier of the property. + # @param parameters [PropertyContract] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, prop_id, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'prop_id is nil' if prop_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::PropertyContract.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.ApiManagement/service/{serviceName}/properties/{propId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'propId' => prop_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PropertyContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PropertyContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Updates the specific property. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param prop_id [String] Identifier of the property. + # @param parameters [PropertyUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers).value! + nil + end + + # + # Updates the specific property. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param prop_id [String] Identifier of the property. + # @param parameters [PropertyUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, prop_id, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, prop_id, parameters, if_match, custom_headers).value! + end + + # + # Updates the specific property. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param prop_id [String] Identifier of the property. + # @param parameters [PropertyUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, prop_id, parameters, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'prop_id is nil' if prop_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::PropertyUpdateParameters.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.ApiManagement/service/{serviceName}/properties/{propId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'propId' => prop_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(: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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Deletes specific property from the the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param prop_id [String] Identifier of the property. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, prop_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, prop_id, if_match, custom_headers).value! + nil + end + + # + # Deletes specific property from the the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param prop_id [String] Identifier of the property. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, prop_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, prop_id, if_match, custom_headers).value! + end + + # + # Deletes specific property from the the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param prop_id [String] Identifier of the property. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, prop_id, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'prop_id is nil' if prop_id.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties/{propId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'propId' => prop_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists a collection of properties defined within a service instance. + # + # @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 [PropertyCollection] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists a collection of properties defined within a service instance. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists a collection of properties defined within a service instance. + # + # @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_service_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::PropertyCollection.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 collection of properties defined within a service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported functions + # | + # |-------|------------------------|-------------------------------------------------------| + # | tags | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith, any, all | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PropertyCollection] which provide lazy access to pages of the + # response. + # + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/quota_by_counter_keys.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/quota_by_counter_keys.rb new file mode 100644 index 0000000000..5ff97bae9a --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/quota_by_counter_keys.rb @@ -0,0 +1,256 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class QuotaByCounterKeys + include MsRestAzure + + # + # Creates and initializes a new instance of the QuotaByCounterKeys class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists a collection of current quota counter periods associated with the + # counter-key configured in the policy on the specified service instance. The + # api does not support paging yet. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param quota_counter_key [String] Quota counter key identifier.This is the + # result of expression defined in counter-key attribute of the quota-by-key + # policy.For Example, if you specify counter-key="boo" in the policy, then it’s + # accessible by "boo" counter key. But if it’s defined as + # counter-key="@("b"+"a")" then it will be accessible by "ba" key + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [QuotaCounterCollection] operation results. + # + def list_by_service(resource_group_name, service_name, quota_counter_key, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, quota_counter_key, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists a collection of current quota counter periods associated with the + # counter-key configured in the policy on the specified service instance. The + # api does not support paging yet. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param quota_counter_key [String] Quota counter key identifier.This is the + # result of expression defined in counter-key attribute of the quota-by-key + # policy.For Example, if you specify counter-key="boo" in the policy, then it’s + # accessible by "boo" counter key. But if it’s defined as + # counter-key="@("b"+"a")" then it will be accessible by "ba" key + # @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_service_with_http_info(resource_group_name, service_name, quota_counter_key, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, quota_counter_key, custom_headers).value! + end + + # + # Lists a collection of current quota counter periods associated with the + # counter-key configured in the policy on the specified service instance. The + # api does not support paging yet. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param quota_counter_key [String] Quota counter key identifier.This is the + # result of expression defined in counter-key attribute of the quota-by-key + # policy.For Example, if you specify counter-key="boo" in the policy, then it’s + # accessible by "boo" counter key. But if it’s defined as + # counter-key="@("b"+"a")" then it will be accessible by "ba" key + # @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_service_async(resource_group_name, service_name, quota_counter_key, 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, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'quota_counter_key is nil' if quota_counter_key.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.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serviceName' => service_name,'quotaCounterKey' => quota_counter_key}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::QuotaCounterCollection.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 all the quota counter values specified with the existing quota + # counter key to a value in the specified service instance. This should be used + # for reset of the quota counter values. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param quota_counter_key [String] Quota counter key identifier.This is the + # result of expression defined in counter-key attribute of the quota-by-key + # policy.For Example, if you specify counter-key="boo" in the policy, then it’s + # accessible by "boo" counter key. But if it’s defined as + # counter-key="@("b"+"a")" then it will be accessible by "ba" key + # @param parameters [QuotaCounterValueContractProperties] The value of the + # quota counter to be applied to all quota counter periods. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, quota_counter_key, parameters, custom_headers = nil) + response = update_async(resource_group_name, service_name, quota_counter_key, parameters, custom_headers).value! + nil + end + + # + # Updates all the quota counter values specified with the existing quota + # counter key to a value in the specified service instance. This should be used + # for reset of the quota counter values. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param quota_counter_key [String] Quota counter key identifier.This is the + # result of expression defined in counter-key attribute of the quota-by-key + # policy.For Example, if you specify counter-key="boo" in the policy, then it’s + # accessible by "boo" counter key. But if it’s defined as + # counter-key="@("b"+"a")" then it will be accessible by "ba" key + # @param parameters [QuotaCounterValueContractProperties] The value of the + # quota counter to be applied to all quota counter periods. + # @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, service_name, quota_counter_key, parameters, custom_headers = nil) + update_async(resource_group_name, service_name, quota_counter_key, parameters, custom_headers).value! + end + + # + # Updates all the quota counter values specified with the existing quota + # counter key to a value in the specified service instance. This should be used + # for reset of the quota counter values. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param quota_counter_key [String] Quota counter key identifier.This is the + # result of expression defined in counter-key attribute of the quota-by-key + # policy.For Example, if you specify counter-key="boo" in the policy, then it’s + # accessible by "boo" counter key. But if it’s defined as + # counter-key="@("b"+"a")" then it will be accessible by "ba" key + # @param parameters [QuotaCounterValueContractProperties] The value of the + # quota counter to be applied to all quota counter periods. + # @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, service_name, quota_counter_key, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'quota_counter_key is nil' if quota_counter_key.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::QuotaCounterValueContractProperties.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.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'quotaCounterKey' => quota_counter_key,'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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/quota_by_period_keys.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/quota_by_period_keys.rb new file mode 100644 index 0000000000..91a8260741 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/quota_by_period_keys.rb @@ -0,0 +1,255 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class QuotaByPeriodKeys + include MsRestAzure + + # + # Creates and initializes a new instance of the QuotaByPeriodKeys class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Gets the value of the quota counter associated with the counter-key in the + # policy for the specific period in service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param quota_counter_key [String] Quota counter key identifier.This is the + # result of expression defined in counter-key attribute of the quota-by-key + # policy.For Example, if you specify counter-key="boo" in the policy, then it’s + # accessible by "boo" counter key. But if it’s defined as + # counter-key="@("b"+"a")" then it will be accessible by "ba" key + # @param quota_period_key [String] Quota period key identifier. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [QuotaCounterContract] operation results. + # + def get(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers = nil) + response = get_async(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the value of the quota counter associated with the counter-key in the + # policy for the specific period in service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param quota_counter_key [String] Quota counter key identifier.This is the + # result of expression defined in counter-key attribute of the quota-by-key + # policy.For Example, if you specify counter-key="boo" in the policy, then it’s + # accessible by "boo" counter key. But if it’s defined as + # counter-key="@("b"+"a")" then it will be accessible by "ba" key + # @param quota_period_key [String] Quota period key identifier. + # @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, service_name, quota_counter_key, quota_period_key, custom_headers = nil) + get_async(resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers).value! + end + + # + # Gets the value of the quota counter associated with the counter-key in the + # policy for the specific period in service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param quota_counter_key [String] Quota counter key identifier.This is the + # result of expression defined in counter-key attribute of the quota-by-key + # policy.For Example, if you specify counter-key="boo" in the policy, then it’s + # accessible by "boo" counter key. But if it’s defined as + # counter-key="@("b"+"a")" then it will be accessible by "ba" key + # @param quota_period_key [String] Quota period key identifier. + # @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, service_name, quota_counter_key, quota_period_key, 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, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'quota_counter_key is nil' if quota_counter_key.nil? + fail ArgumentError, 'quota_period_key is nil' if quota_period_key.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.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serviceName' => service_name,'quotaCounterKey' => quota_counter_key,'quotaPeriodKey' => quota_period_key}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::QuotaCounterContract.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 an existing quota counter value in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param quota_counter_key [String] Quota counter key identifier.This is the + # result of expression defined in counter-key attribute of the quota-by-key + # policy.For Example, if you specify counter-key="boo" in the policy, then it’s + # accessible by "boo" counter key. But if it’s defined as + # counter-key="@("b"+"a")" then it will be accessible by "ba" key + # @param quota_period_key [String] Quota period key identifier. + # @param parameters [QuotaCounterValueContractProperties] The value of the + # Quota counter to be applied on the specified period. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, quota_counter_key, quota_period_key, parameters, custom_headers = nil) + response = update_async(resource_group_name, service_name, quota_counter_key, quota_period_key, parameters, custom_headers).value! + nil + end + + # + # Updates an existing quota counter value in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param quota_counter_key [String] Quota counter key identifier.This is the + # result of expression defined in counter-key attribute of the quota-by-key + # policy.For Example, if you specify counter-key="boo" in the policy, then it’s + # accessible by "boo" counter key. But if it’s defined as + # counter-key="@("b"+"a")" then it will be accessible by "ba" key + # @param quota_period_key [String] Quota period key identifier. + # @param parameters [QuotaCounterValueContractProperties] The value of the + # Quota counter to be applied on the specified period. + # @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, service_name, quota_counter_key, quota_period_key, parameters, custom_headers = nil) + update_async(resource_group_name, service_name, quota_counter_key, quota_period_key, parameters, custom_headers).value! + end + + # + # Updates an existing quota counter value in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param quota_counter_key [String] Quota counter key identifier.This is the + # result of expression defined in counter-key attribute of the quota-by-key + # policy.For Example, if you specify counter-key="boo" in the policy, then it’s + # accessible by "boo" counter key. But if it’s defined as + # counter-key="@("b"+"a")" then it will be accessible by "ba" key + # @param quota_period_key [String] Quota period key identifier. + # @param parameters [QuotaCounterValueContractProperties] The value of the + # Quota counter to be applied on the specified period. + # @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, service_name, quota_counter_key, quota_period_key, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'quota_counter_key is nil' if quota_counter_key.nil? + fail ArgumentError, 'quota_period_key is nil' if quota_period_key.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::QuotaCounterValueContractProperties.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.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'quotaCounterKey' => quota_counter_key,'quotaPeriodKey' => quota_period_key,'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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/regions.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/regions.rb new file mode 100644 index 0000000000..169015b5e9 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/regions.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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class Regions + include MsRestAzure + + # + # Creates and initializes a new instance of the Regions class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists all azure regions in which the service exists. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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_service(resource_group_name, service_name, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, custom_headers) + first_page.get_all_items + end + + # + # Lists all azure regions in which the service exists. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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_service_with_http_info(resource_group_name, service_name, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, custom_headers).value! + end + + # + # Lists all azure regions in which the service exists. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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_service_async(resource_group_name, service_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::RegionListResult.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 azure regions in which the service exists. + # + # @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 [RegionListResult] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all azure regions in which the service exists. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all azure regions in which the service exists. + # + # @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_service_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::RegionListResult.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 azure regions in which the service exists. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RegionListResult] which provide lazy access to pages of the + # response. + # + def list_by_service_as_lazy(resource_group_name, service_name, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb new file mode 100644 index 0000000000..d5a2c52abb --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb @@ -0,0 +1,1635 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class Reports + include MsRestAzure + + # + # Creates and initializes a new instance of the Reports class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists report records by API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_api(resource_group_name, service_name, filter, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_api_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists report records by API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_api_with_http_info(resource_group_name, service_name, filter, top = nil, skip = nil, custom_headers = nil) + list_by_api_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + end + + # + # Lists report records by API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_api_async(resource_group_name, service_name, filter, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'filter is nil' if filter.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ReportCollection.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 report records by User. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_user(resource_group_name, service_name, filter, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_user_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists report records by User. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_user_with_http_info(resource_group_name, service_name, filter, top = nil, skip = nil, custom_headers = nil) + list_by_user_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + end + + # + # Lists report records by User. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_user_async(resource_group_name, service_name, filter, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'filter is nil' if filter.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ReportCollection.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 report records by API Operations. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_operation(resource_group_name, service_name, filter, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_operation_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists report records by API Operations. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_operation_with_http_info(resource_group_name, service_name, filter, top = nil, skip = nil, custom_headers = nil) + list_by_operation_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + end + + # + # Lists report records by API Operations. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_operation_async(resource_group_name, service_name, filter, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'filter is nil' if filter.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ReportCollection.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 report records by Product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_product(resource_group_name, service_name, filter, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_product_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists report records by Product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_product_with_http_info(resource_group_name, service_name, filter, top = nil, skip = nil, custom_headers = nil) + list_by_product_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + end + + # + # Lists report records by Product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_product_async(resource_group_name, service_name, filter, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'filter is nil' if filter.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ReportCollection.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 report records by GeoGraphy. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_geo(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_geo_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists report records by GeoGraphy. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_geo_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_geo_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + end + + # + # Lists report records by GeoGraphy. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_geo_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ReportCollection.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 report records by subscription. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_subscription(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_subscription_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists report records by subscription. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_subscription_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_subscription_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + end + + # + # Lists report records by subscription. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_subscription_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ReportCollection.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 report records by Time. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param interval [Duration] By time interval. Interval must be multiple of 15 + # minutes and may not be zero. The value should be in ISO 8601 format + # (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to + # convert TimeSpan to a valid interval string: XmlConvert.ToString(new + # TimeSpan(hours, minutes, secconds)) + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_time(resource_group_name, service_name, interval, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_time_as_lazy(resource_group_name, service_name, interval, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists report records by Time. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param interval [Duration] By time interval. Interval must be multiple of 15 + # minutes and may not be zero. The value should be in ISO 8601 format + # (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to + # convert TimeSpan to a valid interval string: XmlConvert.ToString(new + # TimeSpan(hours, minutes, secconds)) + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_time_with_http_info(resource_group_name, service_name, interval, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_time_async(resource_group_name, service_name, interval, filter, top, skip, custom_headers).value! + end + + # + # Lists report records by Time. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param interval [Duration] By time interval. Interval must be multiple of 15 + # minutes and may not be zero. The value should be in ISO 8601 format + # (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to + # convert TimeSpan to a valid interval string: XmlConvert.ToString(new + # TimeSpan(hours, minutes, secconds)) + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_time_async(resource_group_name, service_name, interval, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'interval is nil' if interval.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byTime' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'interval' => interval,'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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ReportCollection.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 report records by Request. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RequestReportCollection] operation results. + # + def list_by_request(resource_group_name, service_name, filter, top = nil, skip = nil, custom_headers = nil) + response = list_by_request_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists report records by Request. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_request_with_http_info(resource_group_name, service_name, filter, top = nil, skip = nil, custom_headers = nil) + list_by_request_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + end + + # + # Lists report records by Request. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_request_async(resource_group_name, service_name, filter, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'filter is nil' if filter.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01_preview::Models::RequestReportCollection.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 report records by API. + # + # @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 [ReportCollection] operation results. + # + def list_by_api_next(next_page_link, custom_headers = nil) + response = list_by_api_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists report records by API. + # + # @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_api_next_with_http_info(next_page_link, custom_headers = nil) + list_by_api_next_async(next_page_link, custom_headers).value! + end + + # + # Lists report records by API. + # + # @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_api_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ReportCollection.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 report records by User. + # + # @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 [ReportCollection] operation results. + # + def list_by_user_next(next_page_link, custom_headers = nil) + response = list_by_user_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists report records by User. + # + # @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_user_next_with_http_info(next_page_link, custom_headers = nil) + list_by_user_next_async(next_page_link, custom_headers).value! + end + + # + # Lists report records by User. + # + # @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_user_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ReportCollection.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 report records by API Operations. + # + # @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 [ReportCollection] operation results. + # + def list_by_operation_next(next_page_link, custom_headers = nil) + response = list_by_operation_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists report records by API Operations. + # + # @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_operation_next_with_http_info(next_page_link, custom_headers = nil) + list_by_operation_next_async(next_page_link, custom_headers).value! + end + + # + # Lists report records by API Operations. + # + # @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_operation_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ReportCollection.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 report records by Product. + # + # @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 [ReportCollection] operation results. + # + def list_by_product_next(next_page_link, custom_headers = nil) + response = list_by_product_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists report records by Product. + # + # @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_product_next_with_http_info(next_page_link, custom_headers = nil) + list_by_product_next_async(next_page_link, custom_headers).value! + end + + # + # Lists report records by Product. + # + # @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_product_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ReportCollection.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 report records by GeoGraphy. + # + # @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 [ReportCollection] operation results. + # + def list_by_geo_next(next_page_link, custom_headers = nil) + response = list_by_geo_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists report records by GeoGraphy. + # + # @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_geo_next_with_http_info(next_page_link, custom_headers = nil) + list_by_geo_next_async(next_page_link, custom_headers).value! + end + + # + # Lists report records by GeoGraphy. + # + # @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_geo_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ReportCollection.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 report records by 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 [ReportCollection] operation results. + # + def list_by_subscription_next(next_page_link, custom_headers = nil) + response = list_by_subscription_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists report records by 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_by_subscription_next_with_http_info(next_page_link, custom_headers = nil) + list_by_subscription_next_async(next_page_link, custom_headers).value! + end + + # + # Lists report records by 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_by_subscription_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ReportCollection.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 report records by Time. + # + # @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 [ReportCollection] operation results. + # + def list_by_time_next(next_page_link, custom_headers = nil) + response = list_by_time_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists report records by Time. + # + # @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_time_next_with_http_info(next_page_link, custom_headers = nil) + list_by_time_next_async(next_page_link, custom_headers).value! + end + + # + # Lists report records by Time. + # + # @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_time_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::ReportCollection.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 report records by API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReportCollection] which provide lazy access to pages of the + # response. + # + def list_by_api_as_lazy(resource_group_name, service_name, filter, top = nil, skip = nil, custom_headers = nil) + response = list_by_api_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_api_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Lists report records by User. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReportCollection] which provide lazy access to pages of the + # response. + # + def list_by_user_as_lazy(resource_group_name, service_name, filter, top = nil, skip = nil, custom_headers = nil) + response = list_by_user_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_user_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Lists report records by API Operations. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReportCollection] which provide lazy access to pages of the + # response. + # + def list_by_operation_as_lazy(resource_group_name, service_name, filter, top = nil, skip = nil, custom_headers = nil) + response = list_by_operation_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_operation_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Lists report records by Product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReportCollection] which provide lazy access to pages of the + # response. + # + def list_by_product_as_lazy(resource_group_name, service_name, filter, top = nil, skip = nil, custom_headers = nil) + response = list_by_product_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_product_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Lists report records by GeoGraphy. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReportCollection] which provide lazy access to pages of the + # response. + # + def list_by_geo_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_geo_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_geo_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Lists report records by subscription. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReportCollection] which provide lazy access to pages of the + # response. + # + def list_by_subscription_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_subscription_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_subscription_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Lists report records by Time. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param interval [Duration] By time interval. Interval must be multiple of 15 + # minutes and may not be zero. The value should be in ISO 8601 format + # (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to + # convert TimeSpan to a valid interval string: XmlConvert.ToString(new + # TimeSpan(hours, minutes, secconds)) + # @param filter [String] The filter to apply on the operation. + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReportCollection] which provide lazy access to pages of the + # response. + # + def list_by_time_as_lazy(resource_group_name, service_name, interval, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_time_async(resource_group_name, service_name, interval, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_time_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/sign_in_settings.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/sign_in_settings.rb new file mode 100644 index 0000000000..0f5db139c4 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/sign_in_settings.rb @@ -0,0 +1,404 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class SignInSettings + include MsRestAzure + + # + # Creates and initializes a new instance of the SignInSettings class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Gets the entity state (Etag) version of the SignInSettings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the SignInSettings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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_entity_tag_with_http_info(resource_group_name, service_name, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the SignInSettings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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_entity_tag_async(resource_group_name, service_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Get Sign-In settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PortalSigninSettings] operation results. + # + def get(resource_group_name, service_name, custom_headers = nil) + response = get_async(resource_group_name, service_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get Sign-In settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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, service_name, custom_headers = nil) + get_async(resource_group_name, service_name, custom_headers).value! + end + + # + # Get Sign-In settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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, service_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::PortalSigninSettings.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 Sign-In settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [PortalSigninSettings] Update Sign-In settings. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, parameters, if_match, custom_headers).value! + nil + end + + # + # Update Sign-In settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [PortalSigninSettings] Update Sign-In settings. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, parameters, if_match, custom_headers).value! + end + + # + # Update Sign-In settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [PortalSigninSettings] Update Sign-In settings. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, parameters, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::PortalSigninSettings.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.ApiManagement/service/{serviceName}/portalsettings/signin' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Create or Update Sign-In settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [PortalSigninSettings] Create or update parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PortalSigninSettings] operation results. + # + def create_or_update(resource_group_name, service_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create or Update Sign-In settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [PortalSigninSettings] Create or update parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def create_or_update_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, parameters, custom_headers).value! + end + + # + # Create or Update Sign-In settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [PortalSigninSettings] Create or update parameters. + # @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, service_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PortalSigninSettings.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.ApiManagement/service/{serviceName}/portalsettings/signin' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PortalSigninSettings.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_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/sign_up_settings.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/sign_up_settings.rb new file mode 100644 index 0000000000..62368124eb --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/sign_up_settings.rb @@ -0,0 +1,404 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class SignUpSettings + include MsRestAzure + + # + # Creates and initializes a new instance of the SignUpSettings class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Gets the entity state (Etag) version of the SignUpSettings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the SignUpSettings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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_entity_tag_with_http_info(resource_group_name, service_name, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the SignUpSettings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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_entity_tag_async(resource_group_name, service_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Get Sign-Up settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PortalSignupSettings] operation results. + # + def get(resource_group_name, service_name, custom_headers = nil) + response = get_async(resource_group_name, service_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get Sign-Up settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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, service_name, custom_headers = nil) + get_async(resource_group_name, service_name, custom_headers).value! + end + + # + # Get Sign-Up settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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, service_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::PortalSignupSettings.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 Sign-Up settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [PortalSignupSettings] Update Sign-Up settings. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, parameters, if_match, custom_headers).value! + nil + end + + # + # Update Sign-Up settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [PortalSignupSettings] Update Sign-Up settings. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, parameters, if_match, custom_headers).value! + end + + # + # Update Sign-Up settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [PortalSignupSettings] Update Sign-Up settings. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, parameters, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::PortalSignupSettings.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.ApiManagement/service/{serviceName}/portalsettings/signup' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Create or Update Sign-Up settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [PortalSignupSettings] Create or update parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PortalSignupSettings] operation results. + # + def create_or_update(resource_group_name, service_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create or Update Sign-Up settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [PortalSignupSettings] Create or update parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def create_or_update_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, parameters, custom_headers).value! + end + + # + # Create or Update Sign-Up settings. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [PortalSignupSettings] Create or update parameters. + # @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, service_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PortalSignupSettings.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.ApiManagement/service/{serviceName}/portalsettings/signup' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::PortalSignupSettings.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_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/subscription.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/subscription.rb new file mode 100644 index 0000000000..5da9eeb3f6 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/subscription.rb @@ -0,0 +1,1025 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class Subscription + include MsRestAzure + + # + # Creates and initializes a new instance of the Subscription class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists all subscriptions of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |--------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | state | eq | + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists all subscriptions of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |--------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | state | eq | + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + end + + # + # Lists all subscriptions of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |--------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | state | eq | + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::SubscriptionCollection.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 entity state (Etag) version of the apimanagement subscription + # specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param sid [String] Subscription entity Identifier. The entity represents the + # association between a user and a product in API Management. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, sid, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, sid, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the apimanagement subscription + # specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param sid [String] Subscription entity Identifier. The entity represents the + # association between a user and a product in API Management. + # @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_entity_tag_with_http_info(resource_group_name, service_name, sid, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, sid, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the apimanagement subscription + # specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param sid [String] Subscription entity Identifier. The entity represents the + # association between a user and a product in API Management. + # @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_entity_tag_async(resource_group_name, service_name, sid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'sid is nil' if sid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'sid' => sid,'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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the specified Subscription entity. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param sid [String] Subscription entity Identifier. The entity represents the + # association between a user and a product in API Management. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SubscriptionContract] operation results. + # + def get(resource_group_name, service_name, sid, custom_headers = nil) + response = get_async(resource_group_name, service_name, sid, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the specified Subscription entity. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param sid [String] Subscription entity Identifier. The entity represents the + # association between a user and a product in API Management. + # @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, service_name, sid, custom_headers = nil) + get_async(resource_group_name, service_name, sid, custom_headers).value! + end + + # + # Gets the specified Subscription entity. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param sid [String] Subscription entity Identifier. The entity represents the + # association between a user and a product in API Management. + # @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, service_name, sid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'sid is nil' if sid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'sid' => sid,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::SubscriptionContract.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 subscription of specified user to the specified + # product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param sid [String] Subscription entity Identifier. The entity represents the + # association between a user and a product in API Management. + # @param parameters [SubscriptionCreateParameters] Create parameters. + # @param notify [Boolean] Notify change in Subscription State. + # - If false, do not send any email notification for change of state of + # subscription + # - If true, send email notification of change of state of subscription + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SubscriptionContract] operation results. + # + def create_or_update(resource_group_name, service_name, sid, parameters, notify = nil, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, sid, parameters, notify, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates the subscription of specified user to the specified + # product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param sid [String] Subscription entity Identifier. The entity represents the + # association between a user and a product in API Management. + # @param parameters [SubscriptionCreateParameters] Create parameters. + # @param notify [Boolean] Notify change in Subscription State. + # - If false, do not send any email notification for change of state of + # subscription + # - If true, send email notification of change of state of subscription + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, sid, parameters, notify = nil, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, sid, parameters, notify, if_match, custom_headers).value! + end + + # + # Creates or updates the subscription of specified user to the specified + # product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param sid [String] Subscription entity Identifier. The entity represents the + # association between a user and a product in API Management. + # @param parameters [SubscriptionCreateParameters] Create parameters. + # @param notify [Boolean] Notify change in Subscription State. + # - If false, do not send any email notification for change of state of + # subscription + # - If true, send email notification of change of state of subscription + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, sid, parameters, notify = nil, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'sid is nil' if sid.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::SubscriptionCreateParameters.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.ApiManagement/service/{serviceName}/subscriptions/{sid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'sid' => sid,'subscriptionId' => @client.subscription_id}, + query_params: {'notify' => notify,'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::SubscriptionContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::SubscriptionContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Updates the details of a subscription specificied by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param sid [String] Subscription entity Identifier. The entity represents the + # association between a user and a product in API Management. + # @param parameters [SubscriptionUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param notify [Boolean] Notify change in Subscription State. + # - If false, do not send any email notification for change of state of + # subscription + # - If true, send email notification of change of state of subscription + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, sid, parameters, if_match, notify = nil, custom_headers = nil) + response = update_async(resource_group_name, service_name, sid, parameters, if_match, notify, custom_headers).value! + nil + end + + # + # Updates the details of a subscription specificied by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param sid [String] Subscription entity Identifier. The entity represents the + # association between a user and a product in API Management. + # @param parameters [SubscriptionUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param notify [Boolean] Notify change in Subscription State. + # - If false, do not send any email notification for change of state of + # subscription + # - If true, send email notification of change of state of 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 update_with_http_info(resource_group_name, service_name, sid, parameters, if_match, notify = nil, custom_headers = nil) + update_async(resource_group_name, service_name, sid, parameters, if_match, notify, custom_headers).value! + end + + # + # Updates the details of a subscription specificied by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param sid [String] Subscription entity Identifier. The entity represents the + # association between a user and a product in API Management. + # @param parameters [SubscriptionUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param notify [Boolean] Notify change in Subscription State. + # - If false, do not send any email notification for change of state of + # subscription + # - If true, send email notification of change of state of 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 update_async(resource_group_name, service_name, sid, parameters, if_match, notify = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'sid is nil' if sid.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::SubscriptionUpdateParameters.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.ApiManagement/service/{serviceName}/subscriptions/{sid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'sid' => sid,'subscriptionId' => @client.subscription_id}, + query_params: {'notify' => notify,'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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Deletes the specified subscription. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param sid [String] Subscription entity Identifier. The entity represents the + # association between a user and a product in API Management. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, sid, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, sid, if_match, custom_headers).value! + nil + end + + # + # Deletes the specified subscription. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param sid [String] Subscription entity Identifier. The entity represents the + # association between a user and a product in API Management. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, sid, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, sid, if_match, custom_headers).value! + end + + # + # Deletes the specified subscription. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param sid [String] Subscription entity Identifier. The entity represents the + # association between a user and a product in API Management. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, sid, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'sid is nil' if sid.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'sid' => sid,'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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Regenerates primary key of existing subscription of the API Management + # service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param sid [String] Subscription entity Identifier. The entity represents the + # association between a user and a product in API Management. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def regenerate_primary_key(resource_group_name, service_name, sid, custom_headers = nil) + response = regenerate_primary_key_async(resource_group_name, service_name, sid, custom_headers).value! + nil + end + + # + # Regenerates primary key of existing subscription of the API Management + # service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param sid [String] Subscription entity Identifier. The entity represents the + # association between a user and a product in API Management. + # @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 regenerate_primary_key_with_http_info(resource_group_name, service_name, sid, custom_headers = nil) + regenerate_primary_key_async(resource_group_name, service_name, sid, custom_headers).value! + end + + # + # Regenerates primary key of existing subscription of the API Management + # service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param sid [String] Subscription entity Identifier. The entity represents the + # association between a user and a product in API Management. + # @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 regenerate_primary_key_async(resource_group_name, service_name, sid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'sid is nil' if sid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regeneratePrimaryKey' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'sid' => sid,'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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Regenerates secondary key of existing subscription of the API Management + # service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param sid [String] Subscription entity Identifier. The entity represents the + # association between a user and a product in API Management. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def regenerate_secondary_key(resource_group_name, service_name, sid, custom_headers = nil) + response = regenerate_secondary_key_async(resource_group_name, service_name, sid, custom_headers).value! + nil + end + + # + # Regenerates secondary key of existing subscription of the API Management + # service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param sid [String] Subscription entity Identifier. The entity represents the + # association between a user and a product in API Management. + # @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 regenerate_secondary_key_with_http_info(resource_group_name, service_name, sid, custom_headers = nil) + regenerate_secondary_key_async(resource_group_name, service_name, sid, custom_headers).value! + end + + # + # Regenerates secondary key of existing subscription of the API Management + # service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param sid [String] Subscription entity Identifier. The entity represents the + # association between a user and a product in API Management. + # @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 regenerate_secondary_key_async(resource_group_name, service_name, sid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'sid is nil' if sid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regenerateSecondaryKey' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'sid' => sid,'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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists all subscriptions of the API Management service instance. + # + # @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 [SubscriptionCollection] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all subscriptions of the API Management service instance. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all subscriptions of the API Management service instance. + # + # @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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::SubscriptionCollection.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 subscriptions of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |--------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | state | eq | + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SubscriptionCollection] which provide lazy access to pages of the + # response. + # + def list_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tag.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tag.rb new file mode 100644 index 0000000000..7a9ba744c2 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tag.rb @@ -0,0 +1,2878 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class Tag + include MsRestAzure + + # + # Creates and initializes a new instance of the Tag class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists a collection of tags defined within a service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists a collection of tags defined within a service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + end + + # + # Lists a collection of tags defined within a service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagCollection.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 entity state version of the tag specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_state(resource_group_name, service_name, tag_id, custom_headers = nil) + response = get_entity_state_async(resource_group_name, service_name, tag_id, custom_headers).value! + nil + end + + # + # Gets the entity state version of the tag specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service 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_entity_state_with_http_info(resource_group_name, service_name, tag_id, custom_headers = nil) + get_entity_state_async(resource_group_name, service_name, tag_id, custom_headers).value! + end + + # + # Gets the entity state version of the tag specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service 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_entity_state_async(resource_group_name, service_name, tag_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'tag_id is nil' if tag_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'tagId' => tag_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the details of the tag specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TagContract] operation results. + # + def get(resource_group_name, service_name, tag_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, tag_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of the tag specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service 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, service_name, tag_id, custom_headers = nil) + get_async(resource_group_name, service_name, tag_id, custom_headers).value! + end + + # + # Gets the details of the tag specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service 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, service_name, tag_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'tag_id is nil' if tag_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'tagId' => tag_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagContract.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 tag. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param parameters [TagCreateUpdateParameters] Create parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TagContract] operation results. + # + def create_or_update(resource_group_name, service_name, tag_id, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, tag_id, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a tag. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param parameters [TagCreateUpdateParameters] Create parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def create_or_update_with_http_info(resource_group_name, service_name, tag_id, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, tag_id, parameters, custom_headers).value! + end + + # + # Creates a tag. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param parameters [TagCreateUpdateParameters] Create parameters. + # @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, service_name, tag_id, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'tag_id is nil' if tag_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagCreateUpdateParameters.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.ApiManagement/service/{serviceName}/tags/{tagId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'tagId' => tag_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Updates the details of the tag specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param parameters [TagCreateUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, tag_id, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, tag_id, parameters, if_match, custom_headers).value! + nil + end + + # + # Updates the details of the tag specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param parameters [TagCreateUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, tag_id, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, tag_id, parameters, if_match, custom_headers).value! + end + + # + # Updates the details of the tag specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param parameters [TagCreateUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, tag_id, parameters, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'tag_id is nil' if tag_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagCreateUpdateParameters.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.ApiManagement/service/{serviceName}/tags/{tagId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'tagId' => tag_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(: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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Deletes specific tag of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, tag_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, tag_id, if_match, custom_headers).value! + nil + end + + # + # Deletes specific tag of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, tag_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, tag_id, if_match, custom_headers).value! + end + + # + # Deletes specific tag of the API Management service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, tag_id, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'tag_id is nil' if tag_id.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'tagId' => tag_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists all Tags associated with the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_api(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_api_as_lazy(resource_group_name, service_name, api_id, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists all Tags associated with the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_api_with_http_info(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_api_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! + end + + # + # Lists all Tags associated with the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_api_async(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagCollection.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 entity state version of the tag specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_state_by_api(resource_group_name, service_name, api_id, tag_id, custom_headers = nil) + response = get_entity_state_by_api_async(resource_group_name, service_name, api_id, tag_id, custom_headers).value! + nil + end + + # + # Gets the entity state version of the tag specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service 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_entity_state_by_api_with_http_info(resource_group_name, service_name, api_id, tag_id, custom_headers = nil) + get_entity_state_by_api_async(resource_group_name, service_name, api_id, tag_id, custom_headers).value! + end + + # + # Gets the entity state version of the tag specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service 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_entity_state_by_api_async(resource_group_name, service_name, api_id, tag_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'tag_id is nil' if tag_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'tagId' => tag_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Get tag associated with the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TagContract] operation results. + # + def get_by_api(resource_group_name, service_name, api_id, tag_id, custom_headers = nil) + response = get_by_api_async(resource_group_name, service_name, api_id, tag_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Get tag associated with the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service 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_by_api_with_http_info(resource_group_name, service_name, api_id, tag_id, custom_headers = nil) + get_by_api_async(resource_group_name, service_name, api_id, tag_id, custom_headers).value! + end + + # + # Get tag associated with the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service 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_by_api_async(resource_group_name, service_name, api_id, tag_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'tag_id is nil' if tag_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'tagId' => tag_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagContract.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 + + # + # Assign tag to the Api. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TagContract] operation results. + # + def assign_to_api(resource_group_name, service_name, api_id, tag_id, if_match = nil, custom_headers = nil) + response = assign_to_api_async(resource_group_name, service_name, api_id, tag_id, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Assign tag to the Api. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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 assign_to_api_with_http_info(resource_group_name, service_name, api_id, tag_id, if_match = nil, custom_headers = nil) + assign_to_api_async(resource_group_name, service_name, api_id, tag_id, if_match, custom_headers).value! + end + + # + # Assign tag to the Api. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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 assign_to_api_async(resource_group_name, service_name, api_id, tag_id, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'tag_id is nil' if tag_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'tagId' => tag_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 == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagContract.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 + + # + # Detach the tag from the Api. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def detach_from_api(resource_group_name, service_name, api_id, tag_id, if_match, custom_headers = nil) + response = detach_from_api_async(resource_group_name, service_name, api_id, tag_id, if_match, custom_headers).value! + nil + end + + # + # Detach the tag from the Api. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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 detach_from_api_with_http_info(resource_group_name, service_name, api_id, tag_id, if_match, custom_headers = nil) + detach_from_api_async(resource_group_name, service_name, api_id, tag_id, if_match, custom_headers).value! + end + + # + # Detach the tag from the Api. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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 detach_from_api_async(resource_group_name, service_name, api_id, tag_id, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'tag_id is nil' if tag_id.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'tagId' => tag_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists all Tags associated with the Operation. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_operation(resource_group_name, service_name, api_id, operation_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_operation_as_lazy(resource_group_name, service_name, api_id, operation_id, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists all Tags associated with the Operation. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_operation_with_http_info(resource_group_name, service_name, api_id, operation_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_operation_async(resource_group_name, service_name, api_id, operation_id, filter, top, skip, custom_headers).value! + end + + # + # Lists all Tags associated with the Operation. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_operation_async(resource_group_name, service_name, api_id, operation_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'operation_id is nil' if operation_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'operationId' => operation_id,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagCollection.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 entity state version of the tag specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_state_by_operation(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers = nil) + response = get_entity_state_by_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers).value! + nil + end + + # + # Gets the entity state version of the tag specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service 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_entity_state_by_operation_with_http_info(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers = nil) + get_entity_state_by_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers).value! + end + + # + # Gets the entity state version of the tag specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service 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_entity_state_by_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'operation_id is nil' if operation_id.nil? + fail ArgumentError, 'tag_id is nil' if tag_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'operationId' => operation_id,'tagId' => tag_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Get tag associated with the Operation. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TagContract] operation results. + # + def get_by_operation(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers = nil) + response = get_by_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Get tag associated with the Operation. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service 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_by_operation_with_http_info(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers = nil) + get_by_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers).value! + end + + # + # Get tag associated with the Operation. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service 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_by_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'operation_id is nil' if operation_id.nil? + fail ArgumentError, 'tag_id is nil' if tag_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'operationId' => operation_id,'tagId' => tag_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagContract.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 + + # + # Assign tag to the Operation. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TagContract] operation results. + # + def assign_to_operation(resource_group_name, service_name, api_id, operation_id, tag_id, if_match = nil, custom_headers = nil) + response = assign_to_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Assign tag to the Operation. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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 assign_to_operation_with_http_info(resource_group_name, service_name, api_id, operation_id, tag_id, if_match = nil, custom_headers = nil) + assign_to_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, if_match, custom_headers).value! + end + + # + # Assign tag to the Operation. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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 assign_to_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'operation_id is nil' if operation_id.nil? + fail ArgumentError, 'tag_id is nil' if tag_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'operationId' => operation_id,'tagId' => tag_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 == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagContract.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 + + # + # Detach the tag from the Operation. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def detach_from_operation(resource_group_name, service_name, api_id, operation_id, tag_id, if_match, custom_headers = nil) + response = detach_from_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, if_match, custom_headers).value! + nil + end + + # + # Detach the tag from the Operation. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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 detach_from_operation_with_http_info(resource_group_name, service_name, api_id, operation_id, tag_id, if_match, custom_headers = nil) + detach_from_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, if_match, custom_headers).value! + end + + # + # Detach the tag from the Operation. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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 detach_from_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'operation_id is nil' if operation_id.nil? + fail ArgumentError, 'tag_id is nil' if tag_id.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'operationId' => operation_id,'tagId' => tag_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists all Tags associated with the Product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_product(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_product_as_lazy(resource_group_name, service_name, product_id, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists all Tags associated with the Product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_product_with_http_info(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_product_async(resource_group_name, service_name, product_id, filter, top, skip, custom_headers).value! + end + + # + # Lists all Tags associated with the Product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_product_async(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_id,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagCollection.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 entity state version of the tag specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_state_by_product(resource_group_name, service_name, product_id, tag_id, custom_headers = nil) + response = get_entity_state_by_product_async(resource_group_name, service_name, product_id, tag_id, custom_headers).value! + nil + end + + # + # Gets the entity state version of the tag specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service 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_entity_state_by_product_with_http_info(resource_group_name, service_name, product_id, tag_id, custom_headers = nil) + get_entity_state_by_product_async(resource_group_name, service_name, product_id, tag_id, custom_headers).value! + end + + # + # Gets the entity state version of the tag specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service 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_entity_state_by_product_async(resource_group_name, service_name, product_id, tag_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + fail ArgumentError, 'tag_id is nil' if tag_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_id,'tagId' => tag_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Get tag associated with the Product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TagContract] operation results. + # + def get_by_product(resource_group_name, service_name, product_id, tag_id, custom_headers = nil) + response = get_by_product_async(resource_group_name, service_name, product_id, tag_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Get tag associated with the Product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service 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_by_product_with_http_info(resource_group_name, service_name, product_id, tag_id, custom_headers = nil) + get_by_product_async(resource_group_name, service_name, product_id, tag_id, custom_headers).value! + end + + # + # Get tag associated with the Product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service 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_by_product_async(resource_group_name, service_name, product_id, tag_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + fail ArgumentError, 'tag_id is nil' if tag_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_id,'tagId' => tag_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagContract.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 + + # + # Assign tag to the Product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TagContract] operation results. + # + def assign_to_product(resource_group_name, service_name, product_id, tag_id, if_match = nil, custom_headers = nil) + response = assign_to_product_async(resource_group_name, service_name, product_id, tag_id, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Assign tag to the Product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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 assign_to_product_with_http_info(resource_group_name, service_name, product_id, tag_id, if_match = nil, custom_headers = nil) + assign_to_product_async(resource_group_name, service_name, product_id, tag_id, if_match, custom_headers).value! + end + + # + # Assign tag to the Product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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 assign_to_product_async(resource_group_name, service_name, product_id, tag_id, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + fail ArgumentError, 'tag_id is nil' if tag_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_id,'tagId' => tag_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 == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagContract.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 + + # + # Detach the tag from the Product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def detach_from_product(resource_group_name, service_name, product_id, tag_id, if_match, custom_headers = nil) + response = detach_from_product_async(resource_group_name, service_name, product_id, tag_id, if_match, custom_headers).value! + nil + end + + # + # Detach the tag from the Product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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 detach_from_product_with_http_info(resource_group_name, service_name, product_id, tag_id, if_match, custom_headers = nil) + detach_from_product_async(resource_group_name, service_name, product_id, tag_id, if_match, custom_headers).value! + end + + # + # Detach the tag from the Product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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 detach_from_product_async(resource_group_name, service_name, product_id, tag_id, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'product_id is nil' if product_id.nil? + fail ArgumentError, 'tag_id is nil' if tag_id.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_id,'tagId' => tag_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists a collection of tags defined within a service instance. + # + # @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 [TagCollection] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists a collection of tags defined within a service instance. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists a collection of tags defined within a service instance. + # + # @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_service_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagCollection.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 Tags associated with the API. + # + # @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 [TagCollection] operation results. + # + def list_by_api_next(next_page_link, custom_headers = nil) + response = list_by_api_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all Tags associated with the API. + # + # @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_api_next_with_http_info(next_page_link, custom_headers = nil) + list_by_api_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all Tags associated with the API. + # + # @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_api_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagCollection.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 Tags associated with the Operation. + # + # @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 [TagCollection] operation results. + # + def list_by_operation_next(next_page_link, custom_headers = nil) + response = list_by_operation_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all Tags associated with the Operation. + # + # @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_operation_next_with_http_info(next_page_link, custom_headers = nil) + list_by_operation_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all Tags associated with the Operation. + # + # @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_operation_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagCollection.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 Tags associated with the Product. + # + # @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 [TagCollection] operation results. + # + def list_by_product_next(next_page_link, custom_headers = nil) + response = list_by_product_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all Tags associated with the Product. + # + # @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_product_next_with_http_info(next_page_link, custom_headers = nil) + list_by_product_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all Tags associated with the Product. + # + # @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_product_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagCollection.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 collection of tags defined within a service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TagCollection] which provide lazy access to pages of the response. + # + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Lists all Tags associated with the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TagCollection] which provide lazy access to pages of the response. + # + def list_by_api_as_lazy(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_api_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_api_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Lists all Tags associated with the Operation. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param operation_id [String] Operation identifier within an API. Must be + # unique in the current API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TagCollection] which provide lazy access to pages of the response. + # + def list_by_operation_as_lazy(resource_group_name, service_name, api_id, operation_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_operation_async(resource_group_name, service_name, api_id, operation_id, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_operation_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Lists all Tags associated with the Product. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param product_id [String] Product identifier. Must be unique in the current + # API Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TagCollection] which provide lazy access to pages of the response. + # + def list_by_product_as_lazy(resource_group_name, service_name, product_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_product_async(resource_group_name, service_name, product_id, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_product_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tag_description.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tag_description.rb new file mode 100644 index 0000000000..1bb72e0029 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tag_description.rb @@ -0,0 +1,739 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class TagDescription + include MsRestAzure + + # + # Creates and initializes a new instance of the TagDescription class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists all Tags descriptions in scope of API. Model similar to swagger - + # tagDescription is defined on API level but tag may be assigned to the + # Operations + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_api(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_api_as_lazy(resource_group_name, service_name, api_id, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists all Tags descriptions in scope of API. Model similar to swagger - + # tagDescription is defined on API level but tag may be assigned to the + # Operations + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_api_with_http_info(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_api_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! + end + + # + # Lists all Tags descriptions in scope of API. Model similar to swagger - + # tagDescription is defined on API level but tag may be assigned to the + # Operations + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_api_async(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagDescriptionCollection.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 entity state version of the tag specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_state(resource_group_name, service_name, api_id, tag_id, custom_headers = nil) + response = get_entity_state_async(resource_group_name, service_name, api_id, tag_id, custom_headers).value! + nil + end + + # + # Gets the entity state version of the tag specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service 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_entity_state_with_http_info(resource_group_name, service_name, api_id, tag_id, custom_headers = nil) + get_entity_state_async(resource_group_name, service_name, api_id, tag_id, custom_headers).value! + end + + # + # Gets the entity state version of the tag specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service 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_entity_state_async(resource_group_name, service_name, api_id, tag_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'tag_id is nil' if tag_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'tagId' => tag_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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Get tag associated with the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TagDescriptionContract] operation results. + # + def get(resource_group_name, service_name, api_id, tag_id, custom_headers = nil) + response = get_async(resource_group_name, service_name, api_id, tag_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Get tag associated with the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service 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, service_name, api_id, tag_id, custom_headers = nil) + get_async(resource_group_name, service_name, api_id, tag_id, custom_headers).value! + end + + # + # Get tag associated with the API. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service 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, service_name, api_id, tag_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'tag_id is nil' if tag_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'tagId' => tag_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagDescriptionContract.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 + + # + # Create/Update tag fescription in scope of the Api. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param parameters [TagDescriptionCreateParameters] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TagDescriptionContract] operation results. + # + def create_or_update(resource_group_name, service_name, api_id, tag_id, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, api_id, tag_id, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Create/Update tag fescription in scope of the Api. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param parameters [TagDescriptionCreateParameters] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, api_id, tag_id, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, api_id, tag_id, parameters, if_match, custom_headers).value! + end + + # + # Create/Update tag fescription in scope of the Api. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param parameters [TagDescriptionCreateParameters] Create parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, api_id, tag_id, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'tag_id is nil' if tag_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagDescriptionCreateParameters.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.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'tagId' => tag_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagDescriptionContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagDescriptionContract.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 + + # + # Delete tag description for the Api. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, api_id, tag_id, if_match, custom_headers = nil) + response = delete_async(resource_group_name, service_name, api_id, tag_id, if_match, custom_headers).value! + nil + end + + # + # Delete tag description for the Api. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, api_id, tag_id, if_match, custom_headers = nil) + delete_async(resource_group_name, service_name, api_id, tag_id, if_match, custom_headers).value! + end + + # + # Delete tag description for the Api. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param tag_id [String] Tag identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, api_id, tag_id, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'api_id is nil' if api_id.nil? + fail ArgumentError, 'tag_id is nil' if tag_id.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'tagId' => tag_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(: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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists all Tags descriptions in scope of API. Model similar to swagger - + # tagDescription is defined on API level but tag may be assigned to the + # Operations + # + # @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 [TagDescriptionCollection] operation results. + # + def list_by_api_next(next_page_link, custom_headers = nil) + response = list_by_api_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all Tags descriptions in scope of API. Model similar to swagger - + # tagDescription is defined on API level but tag may be assigned to the + # Operations + # + # @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_api_next_with_http_info(next_page_link, custom_headers = nil) + list_by_api_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all Tags descriptions in scope of API. Model similar to swagger - + # tagDescription is defined on API level but tag may be assigned to the + # Operations + # + # @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_api_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagDescriptionCollection.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 Tags descriptions in scope of API. Model similar to swagger - + # tagDescription is defined on API level but tag may be assigned to the + # Operations + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param api_id [String] API revision identifier. Must be unique in the current + # API Management service instance. Non-current revision has ;rev=n as a suffix + # where n is the revision number. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TagDescriptionCollection] which provide lazy access to pages of the + # response. + # + def list_by_api_as_lazy(resource_group_name, service_name, api_id, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_api_async(resource_group_name, service_name, api_id, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_api_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tag_resource.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tag_resource.rb new file mode 100644 index 0000000000..4ca92e500b --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tag_resource.rb @@ -0,0 +1,349 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class TagResource + include MsRestAzure + + # + # Creates and initializes a new instance of the TagResource class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists a collection of resources associated with tags. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | apiName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | terms | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | state | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | isCurrent | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists a collection of resources associated with tags. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | apiName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | terms | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | state | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | isCurrent | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + end + + # + # Lists a collection of resources associated with tags. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | apiName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | terms | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | state | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | isCurrent | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tagResources' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagResourceCollection.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 collection of resources associated with tags. + # + # @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 [TagResourceCollection] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists a collection of resources associated with tags. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists a collection of resources associated with tags. + # + # @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_service_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::ApiManagement::Mgmt::V2018_01_01_preview::Models::TagResourceCollection.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 collection of resources associated with tags. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | apiName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | terms | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | state | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | isCurrent | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TagResourceCollection] which provide lazy access to pages of the + # response. + # + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tenant_access.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tenant_access.rb new file mode 100644 index 0000000000..457bc23cc4 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tenant_access.rb @@ -0,0 +1,387 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class TenantAccess + include MsRestAzure + + # + # Creates and initializes a new instance of the TenantAccess class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Get tenant access information details. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AccessInformationContract] operation results. + # + def get(resource_group_name, service_name, custom_headers = nil) + response = get_async(resource_group_name, service_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get tenant access information details. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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, service_name, custom_headers = nil) + get_async(resource_group_name, service_name, custom_headers).value! + end + + # + # Get tenant access information details. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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, service_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + access_name = 'access' + + + 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.ApiManagement/service/{serviceName}/tenant/{accessName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'accessName' => access_name}, + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::AccessInformationContract.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 tenant access information details. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [AccessInformationUpdateParameters] Parameters supplied to + # retrieve the Tenant Access Information. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, parameters, if_match, custom_headers).value! + nil + end + + # + # Update tenant access information details. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [AccessInformationUpdateParameters] Parameters supplied to + # retrieve the Tenant Access Information. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, parameters, if_match, custom_headers).value! + end + + # + # Update tenant access information details. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [AccessInformationUpdateParameters] Parameters supplied to + # retrieve the Tenant Access Information. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, parameters, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + access_name = 'access' + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::AccessInformationUpdateParameters.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.ApiManagement/service/{serviceName}/tenant/{accessName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'accessName' => access_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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Regenerate primary access key. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def regenerate_primary_key(resource_group_name, service_name, custom_headers = nil) + response = regenerate_primary_key_async(resource_group_name, service_name, custom_headers).value! + nil + end + + # + # Regenerate primary access key. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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 regenerate_primary_key_with_http_info(resource_group_name, service_name, custom_headers = nil) + regenerate_primary_key_async(resource_group_name, service_name, custom_headers).value! + end + + # + # Regenerate primary access key. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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 regenerate_primary_key_async(resource_group_name, service_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + access_name = 'access' + + + 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.ApiManagement/service/{serviceName}/tenant/{accessName}/regeneratePrimaryKey' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'accessName' => access_name}, + 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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Regenerate secondary access key. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def regenerate_secondary_key(resource_group_name, service_name, custom_headers = nil) + response = regenerate_secondary_key_async(resource_group_name, service_name, custom_headers).value! + nil + end + + # + # Regenerate secondary access key. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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 regenerate_secondary_key_with_http_info(resource_group_name, service_name, custom_headers = nil) + regenerate_secondary_key_async(resource_group_name, service_name, custom_headers).value! + end + + # + # Regenerate secondary access key. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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 regenerate_secondary_key_async(resource_group_name, service_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + access_name = 'access' + + + 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.ApiManagement/service/{serviceName}/tenant/{accessName}/regenerateSecondaryKey' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'accessName' => access_name}, + 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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tenant_access_git.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tenant_access_git.rb new file mode 100644 index 0000000000..8d4e30884c --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tenant_access_git.rb @@ -0,0 +1,279 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class TenantAccessGit + include MsRestAzure + + # + # Creates and initializes a new instance of the TenantAccessGit class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Gets the Git access configuration for the tenant. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AccessInformationContract] operation results. + # + def get(resource_group_name, service_name, custom_headers = nil) + response = get_async(resource_group_name, service_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the Git access configuration for the tenant. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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, service_name, custom_headers = nil) + get_async(resource_group_name, service_name, custom_headers).value! + end + + # + # Gets the Git access configuration for the tenant. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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, service_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + access_name = 'access' + + + 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.ApiManagement/service/{serviceName}/tenant/{accessName}/git' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'accessName' => access_name}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::AccessInformationContract.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 + + # + # Regenerate primary access key for GIT. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def regenerate_primary_key(resource_group_name, service_name, custom_headers = nil) + response = regenerate_primary_key_async(resource_group_name, service_name, custom_headers).value! + nil + end + + # + # Regenerate primary access key for GIT. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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 regenerate_primary_key_with_http_info(resource_group_name, service_name, custom_headers = nil) + regenerate_primary_key_async(resource_group_name, service_name, custom_headers).value! + end + + # + # Regenerate primary access key for GIT. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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 regenerate_primary_key_async(resource_group_name, service_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + access_name = 'access' + + + 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.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regeneratePrimaryKey' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'accessName' => access_name}, + 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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Regenerate secondary access key for GIT. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def regenerate_secondary_key(resource_group_name, service_name, custom_headers = nil) + response = regenerate_secondary_key_async(resource_group_name, service_name, custom_headers).value! + nil + end + + # + # Regenerate secondary access key for GIT. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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 regenerate_secondary_key_with_http_info(resource_group_name, service_name, custom_headers = nil) + regenerate_secondary_key_async(resource_group_name, service_name, custom_headers).value! + end + + # + # Regenerate secondary access key for GIT. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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 regenerate_secondary_key_async(resource_group_name, service_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + access_name = 'access' + + + 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.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regenerateSecondaryKey' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'accessName' => access_name}, + 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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tenant_configuration.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tenant_configuration.rb new file mode 100644 index 0000000000..92fbedf980 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tenant_configuration.rb @@ -0,0 +1,597 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class TenantConfiguration + include MsRestAzure + + # + # Creates and initializes a new instance of the TenantConfiguration class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # This operation applies changes from the specified Git branch to the + # configuration database. This is a long running operation and could take + # several minutes to complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [DeployConfigurationParameters] Deploy Configuration + # parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [OperationResultContract] operation results. + # + def deploy(resource_group_name, service_name, parameters, custom_headers = nil) + response = deploy_async(resource_group_name, service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [DeployConfigurationParameters] Deploy Configuration + # parameters. + # @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 deploy_async(resource_group_name, service_name, parameters, custom_headers = nil) + # Send request + promise = begin_deploy_async(resource_group_name, service_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::OperationResultContract.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 + + # + # This operation creates a commit with the current configuration snapshot to + # the specified branch in the repository. This is a long running operation and + # could take several minutes to complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [SaveConfigurationParameter] Save Configuration parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [OperationResultContract] operation results. + # + def save(resource_group_name, service_name, parameters, custom_headers = nil) + response = save_async(resource_group_name, service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [SaveConfigurationParameter] Save Configuration parameters. + # @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 save_async(resource_group_name, service_name, parameters, custom_headers = nil) + # Send request + promise = begin_save_async(resource_group_name, service_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::OperationResultContract.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 + + # + # This operation validates the changes in the specified Git branch. This is a + # long running operation and could take several minutes to complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [DeployConfigurationParameters] Validate Configuration + # parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [OperationResultContract] operation results. + # + def validate(resource_group_name, service_name, parameters, custom_headers = nil) + response = validate_async(resource_group_name, service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [DeployConfigurationParameters] Validate Configuration + # parameters. + # @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 validate_async(resource_group_name, service_name, parameters, custom_headers = nil) + # Send request + promise = begin_validate_async(resource_group_name, service_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::OperationResultContract.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 the status of the most recent synchronization between the configuration + # database and the Git repository. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TenantConfigurationSyncStateContract] operation results. + # + def get_sync_state(resource_group_name, service_name, custom_headers = nil) + response = get_sync_state_async(resource_group_name, service_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the status of the most recent synchronization between the configuration + # database and the Git repository. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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_sync_state_with_http_info(resource_group_name, service_name, custom_headers = nil) + get_sync_state_async(resource_group_name, service_name, custom_headers).value! + end + + # + # Gets the status of the most recent synchronization between the configuration + # database and the Git repository. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @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_sync_state_async(resource_group_name, service_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + configuration_name = 'configuration' + + + 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.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'configurationName' => configuration_name}, + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::TenantConfigurationSyncStateContract.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 + + # + # This operation applies changes from the specified Git branch to the + # configuration database. This is a long running operation and could take + # several minutes to complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [DeployConfigurationParameters] Deploy Configuration + # parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [OperationResultContract] operation results. + # + def begin_deploy(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_deploy_async(resource_group_name, service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # This operation applies changes from the specified Git branch to the + # configuration database. This is a long running operation and could take + # several minutes to complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [DeployConfigurationParameters] Deploy Configuration + # parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_deploy_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_deploy_async(resource_group_name, service_name, parameters, custom_headers).value! + end + + # + # This operation applies changes from the specified Git branch to the + # configuration database. This is a long running operation and could take + # several minutes to complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [DeployConfigurationParameters] Deploy Configuration + # parameters. + # @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_deploy_async(resource_group_name, service_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + configuration_name = 'configuration' + + + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::DeployConfigurationParameters.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.ApiManagement/service/{serviceName}/tenant/{configurationName}/deploy' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'configurationName' => configuration_name}, + 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 == 202 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::OperationResultContract.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 + + # + # This operation creates a commit with the current configuration snapshot to + # the specified branch in the repository. This is a long running operation and + # could take several minutes to complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [SaveConfigurationParameter] Save Configuration parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [OperationResultContract] operation results. + # + def begin_save(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_save_async(resource_group_name, service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # This operation creates a commit with the current configuration snapshot to + # the specified branch in the repository. This is a long running operation and + # could take several minutes to complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [SaveConfigurationParameter] Save Configuration parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_save_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_save_async(resource_group_name, service_name, parameters, custom_headers).value! + end + + # + # This operation creates a commit with the current configuration snapshot to + # the specified branch in the repository. This is a long running operation and + # could take several minutes to complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [SaveConfigurationParameter] Save Configuration parameters. + # @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_save_async(resource_group_name, service_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + configuration_name = 'configuration' + + + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::SaveConfigurationParameter.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.ApiManagement/service/{serviceName}/tenant/{configurationName}/save' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'configurationName' => configuration_name}, + 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 == 202 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::OperationResultContract.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 + + # + # This operation validates the changes in the specified Git branch. This is a + # long running operation and could take several minutes to complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [DeployConfigurationParameters] Validate Configuration + # parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [OperationResultContract] operation results. + # + def begin_validate(resource_group_name, service_name, parameters, custom_headers = nil) + response = begin_validate_async(resource_group_name, service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # This operation validates the changes in the specified Git branch. This is a + # long running operation and could take several minutes to complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [DeployConfigurationParameters] Validate Configuration + # parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_validate_with_http_info(resource_group_name, service_name, parameters, custom_headers = nil) + begin_validate_async(resource_group_name, service_name, parameters, custom_headers).value! + end + + # + # This operation validates the changes in the specified Git branch. This is a + # long running operation and could take several minutes to complete. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param parameters [DeployConfigurationParameters] Validate Configuration + # parameters. + # @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_validate_async(resource_group_name, service_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + configuration_name = 'configuration' + + + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::DeployConfigurationParameters.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.ApiManagement/service/{serviceName}/tenant/{configurationName}/validate' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id,'configurationName' => configuration_name}, + 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 == 202 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::OperationResultContract.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_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/user.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/user.rb new file mode 100644 index 0000000000..d1805c5590 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/user.rb @@ -0,0 +1,1049 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class User + include MsRestAzure + + # + # Creates and initializes a new instance of the User class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists a collection of registered users in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | + # Supported functions | + # |------------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | firstName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | lastName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | email | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | state | eq | N/A + # | + # | registrationDate | ge, le, eq, ne, gt, lt | N/A + # | + # | note | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_by_service_as_lazy(resource_group_name, service_name, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists a collection of registered users in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | + # Supported functions | + # |------------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | firstName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | lastName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | email | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | state | eq | N/A + # | + # | registrationDate | ge, le, eq, ne, gt, lt | N/A + # | + # | note | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_service_with_http_info(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + end + + # + # Lists a collection of registered users in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | + # Supported functions | + # |------------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | firstName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | lastName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | email | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | state | eq | N/A + # | + # | registrationDate | ge, le, eq, ne, gt, lt | N/A + # | + # | note | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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_service_async(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::UserCollection.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 entity state (Etag) version of the user specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def get_entity_tag(resource_group_name, service_name, uid, custom_headers = nil) + response = get_entity_tag_async(resource_group_name, service_name, uid, custom_headers).value! + nil + end + + # + # Gets the entity state (Etag) version of the user specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service 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_entity_tag_with_http_info(resource_group_name, service_name, uid, custom_headers = nil) + get_entity_tag_async(resource_group_name, service_name, uid, custom_headers).value! + end + + # + # Gets the entity state (Etag) version of the user specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service 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_entity_tag_async(resource_group_name, service_name, uid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'uid is nil' if uid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'uid' => uid,'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(:head, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the details of the user specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [UserContract] operation results. + # + def get(resource_group_name, service_name, uid, custom_headers = nil) + response = get_async(resource_group_name, service_name, uid, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of the user specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service 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, service_name, uid, custom_headers = nil) + get_async(resource_group_name, service_name, uid, custom_headers).value! + end + + # + # Gets the details of the user specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service 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, service_name, uid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'uid is nil' if uid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'uid' => uid,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::UserContract.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 user. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param parameters [UserCreateParameters] Create or update parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [UserContract] operation results. + # + def create_or_update(resource_group_name, service_name, uid, parameters, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, service_name, uid, parameters, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or Updates a user. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param parameters [UserCreateParameters] Create or update parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, uid, parameters, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, service_name, uid, parameters, if_match, custom_headers).value! + end + + # + # Creates or Updates a user. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param parameters [UserCreateParameters] Create or update parameters. + # @param if_match [String] ETag of the Entity. Not required when creating an + # entity, but required when updating an entity. + # @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, service_name, uid, parameters, if_match = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'uid is nil' if uid.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::UserCreateParameters.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.ApiManagement/service/{serviceName}/users/{uid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'uid' => uid,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::UserContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::UserContract.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Updates the details of the user specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param parameters [UserUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def update(resource_group_name, service_name, uid, parameters, if_match, custom_headers = nil) + response = update_async(resource_group_name, service_name, uid, parameters, if_match, custom_headers).value! + nil + end + + # + # Updates the details of the user specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param parameters [UserUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, uid, parameters, if_match, custom_headers = nil) + update_async(resource_group_name, service_name, uid, parameters, if_match, custom_headers).value! + end + + # + # Updates the details of the user specified by its identifier. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param parameters [UserUpdateParameters] Update parameters. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @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, service_name, uid, parameters, if_match, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'uid is nil' if uid.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + 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::ApiManagement::Mgmt::V2018_01_01_preview::Models::UserUpdateParameters.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.ApiManagement/service/{serviceName}/users/{uid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'uid' => uid,'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 == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Deletes specific user. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param delete_subscriptions [Boolean] Whether to delete user's subscription + # or not. + # @param notify [Boolean] Send an Account Closed Email notification to the + # User. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, service_name, uid, if_match, delete_subscriptions = nil, notify = nil, custom_headers = nil) + response = delete_async(resource_group_name, service_name, uid, if_match, delete_subscriptions, notify, custom_headers).value! + nil + end + + # + # Deletes specific user. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param delete_subscriptions [Boolean] Whether to delete user's subscription + # or not. + # @param notify [Boolean] Send an Account Closed Email notification to the + # User. + # @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, service_name, uid, if_match, delete_subscriptions = nil, notify = nil, custom_headers = nil) + delete_async(resource_group_name, service_name, uid, if_match, delete_subscriptions, notify, custom_headers).value! + end + + # + # Deletes specific user. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param if_match [String] ETag of the Entity. ETag should match the current + # entity state from the header response of the GET request or it should be * + # for unconditional update. + # @param delete_subscriptions [Boolean] Whether to delete user's subscription + # or not. + # @param notify [Boolean] Send an Account Closed Email notification to the + # User. + # @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, service_name, uid, if_match, delete_subscriptions = nil, notify = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'uid is nil' if uid.nil? + fail ArgumentError, 'if_match is nil' if if_match.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'uid' => uid,'subscriptionId' => @client.subscription_id}, + query_params: {'deleteSubscriptions' => delete_subscriptions,'notify' => notify,'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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Retrieves a redirection URL containing an authentication token for signing a + # given user into the developer portal. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [GenerateSsoUrlResult] operation results. + # + def generate_sso_url(resource_group_name, service_name, uid, custom_headers = nil) + response = generate_sso_url_async(resource_group_name, service_name, uid, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieves a redirection URL containing an authentication token for signing a + # given user into the developer portal. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service 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 generate_sso_url_with_http_info(resource_group_name, service_name, uid, custom_headers = nil) + generate_sso_url_async(resource_group_name, service_name, uid, custom_headers).value! + end + + # + # Retrieves a redirection URL containing an authentication token for signing a + # given user into the developer portal. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service 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 generate_sso_url_async(resource_group_name, service_name, uid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'uid is nil' if uid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/generateSsoUrl' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'uid' => uid,'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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::GenerateSsoUrlResult.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 Shared Access Authorization Token for the User. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param parameters [UserTokenParameters] Create Authorization Token + # parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [UserTokenResult] operation results. + # + def get_shared_access_token(resource_group_name, service_name, uid, parameters, custom_headers = nil) + response = get_shared_access_token_async(resource_group_name, service_name, uid, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the Shared Access Authorization Token for the User. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param parameters [UserTokenParameters] Create Authorization Token + # parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_shared_access_token_with_http_info(resource_group_name, service_name, uid, parameters, custom_headers = nil) + get_shared_access_token_async(resource_group_name, service_name, uid, parameters, custom_headers).value! + end + + # + # Gets the Shared Access Authorization Token for the User. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param parameters [UserTokenParameters] Create Authorization Token + # parameters. + # @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_shared_access_token_async(resource_group_name, service_name, uid, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'uid is nil' if uid.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::UserTokenParameters.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.ApiManagement/service/{serviceName}/users/{uid}/token' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'uid' => uid,'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 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::UserTokenResult.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 collection of registered users in the specified service instance. + # + # @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 [UserCollection] operation results. + # + def list_by_service_next(next_page_link, custom_headers = nil) + response = list_by_service_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists a collection of registered users in the specified service instance. + # + # @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_service_next_with_http_info(next_page_link, custom_headers = nil) + list_by_service_next_async(next_page_link, custom_headers).value! + end + + # + # Lists a collection of registered users in the specified service instance. + # + # @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_service_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::UserCollection.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 collection of registered users in the specified service instance. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param filter [String] | Field | Supported operators | + # Supported functions | + # |------------------|------------------------|-----------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | firstName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | lastName | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | email | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # | state | eq | N/A + # | + # | registrationDate | ge, le, eq, ne, gt, lt | N/A + # | + # | note | ge, le, eq, ne, gt, lt | substringof, contains, + # startswith, endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [UserCollection] which provide lazy access to pages of the response. + # + def list_by_service_as_lazy(resource_group_name, service_name, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_by_service_async(resource_group_name, service_name, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_service_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/user_group.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/user_group.rb new file mode 100644 index 0000000000..1d0eebc173 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/user_group.rb @@ -0,0 +1,277 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class UserGroup + include MsRestAzure + + # + # Creates and initializes a new instance of the UserGroup class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists all user groups. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, service_name, uid, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists all user groups. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_async(resource_group_name, service_name, uid, filter, top, skip, custom_headers).value! + end + + # + # Lists all user groups. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'uid is nil' if uid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/groups' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'uid' => uid,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::GroupCollection.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 user groups. + # + # @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 [GroupCollection] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all user groups. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all user groups. + # + # @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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::GroupCollection.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 user groups. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |-------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [GroupCollection] which provide lazy access to pages of the response. + # + def list_as_lazy(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_async(resource_group_name, service_name, uid, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/user_identities.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/user_identities.rb new file mode 100644 index 0000000000..b413cdf3cb --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/user_identities.rb @@ -0,0 +1,234 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class UserIdentities + include MsRestAzure + + # + # Creates and initializes a new instance of the UserIdentities class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists all user identities. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service 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(resource_group_name, service_name, uid, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, service_name, uid, custom_headers) + first_page.get_all_items + end + + # + # Lists all user identities. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service 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_with_http_info(resource_group_name, service_name, uid, custom_headers = nil) + list_async(resource_group_name, service_name, uid, custom_headers).value! + end + + # + # Lists all user identities. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service 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_async(resource_group_name, service_name, uid, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'uid is nil' if uid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/identities' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'uid' => uid,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::UserIdentityCollection.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 user identities. + # + # @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 [UserIdentityCollection] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all user identities. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all user identities. + # + # @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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::UserIdentityCollection.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 user identities. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [UserIdentityCollection] which provide lazy access to pages of the + # response. + # + def list_as_lazy(resource_group_name, service_name, uid, custom_headers = nil) + response = list_async(resource_group_name, service_name, uid, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/user_subscription.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/user_subscription.rb new file mode 100644 index 0000000000..9c4f4ddb48 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/user_subscription.rb @@ -0,0 +1,302 @@ +# 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::ApiManagement::Mgmt::V2018_01_01_preview + # + # ApiManagement Client + # + class UserSubscription + include MsRestAzure + + # + # Creates and initializes a new instance of the UserSubscription class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ApiManagementClient] reference to the ApiManagementClient + attr_reader :client + + # + # Lists the collection of subscriptions of the specified user. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |--------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | state | eq | + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, service_name, uid, filter, top, skip, custom_headers) + first_page.get_all_items + end + + # + # Lists the collection of subscriptions of the specified user. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |--------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | state | eq | + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) + list_async(resource_group_name, service_name, uid, filter, top, skip, custom_headers).value! + end + + # + # Lists the collection of subscriptions of the specified user. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |--------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | state | eq | + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @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(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'service_name is nil' if service_name.nil? + fail ArgumentError, 'uid is nil' if uid.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/subscriptions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'uid' => uid,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::SubscriptionCollection.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 collection of subscriptions of the specified user. + # + # @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 [SubscriptionCollection] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists the collection of subscriptions of the specified user. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Lists the collection of subscriptions of the specified user. + # + # @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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::SubscriptionCollection.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 collection of subscriptions of the specified user. + # + # @param resource_group_name [String] The name of the resource group. + # @param service_name [String] The name of the API Management service. + # @param uid [String] User identifier. Must be unique in the current API + # Management service instance. + # @param filter [String] | Field | Supported operators | Supported + # functions | + # |--------------|------------------------|---------------------------------------------| + # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + # endswith | + # | state | eq | + # | + # @param top [Integer] Number of records to return. + # @param skip [Integer] Number of records to skip. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SubscriptionCollection] which provide lazy access to pages of the + # response. + # + def list_as_lazy(resource_group_name, service_name, uid, filter = nil, top = nil, skip = nil, custom_headers = nil) + response = list_async(resource_group_name, service_name, uid, filter, top, skip, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/version.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/version.rb new file mode 100644 index 0000000000..f87ec32dbe --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/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::ApiManagement::Mgmt::V2018_01_01_preview + VERSION = '0.17.0' +end diff --git a/management/azure_mgmt_api_management/lib/azure_mgmt_api_management.rb b/management/azure_mgmt_api_management/lib/azure_mgmt_api_management.rb index 49a1dc87d2..4d67313944 100644 --- a/management/azure_mgmt_api_management/lib/azure_mgmt_api_management.rb +++ b/management/azure_mgmt_api_management/lib/azure_mgmt_api_management.rb @@ -2,9 +2,10 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -require '2018-06-01-preview/generated/azure_mgmt_api_management' +require '2017-03-01/generated/azure_mgmt_api_management' +require '2018-01-01/generated/azure_mgmt_api_management' require '2018-01-01-preview/generated/azure_mgmt_api_management' require '2016-10-10/generated/azure_mgmt_api_management' +require '2018-06-01-preview/generated/azure_mgmt_api_management' require '2016-07-07/generated/azure_mgmt_api_management' -require '2017-03-01/generated/azure_mgmt_api_management' require 'profiles/latest/apimanagement_latest_profile_client' diff --git a/management/azure_mgmt_api_management/lib/profiles/latest/modules/apimanagement_profile_module.rb b/management/azure_mgmt_api_management/lib/profiles/latest/modules/apimanagement_profile_module.rb index d79d0a95e7..d78e939e1a 100644 --- a/management/azure_mgmt_api_management/lib/profiles/latest/modules/apimanagement_profile_module.rb +++ b/management/azure_mgmt_api_management/lib/profiles/latest/modules/apimanagement_profile_module.rb @@ -6,6 +6,7 @@ module Azure::ApiManagement::Profiles::Latest module Mgmt + Group = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Group Policy = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Policy PolicySnippets = Azure::ApiManagement::Mgmt::V2018_06_01_preview::PolicySnippets Regions = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Regions @@ -28,7 +29,6 @@ module Mgmt ApiManagementService = Azure::ApiManagement::Mgmt::V2018_06_01_preview::ApiManagementService Diagnostic = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Diagnostic EmailTemplate = Azure::ApiManagement::Mgmt::V2018_06_01_preview::EmailTemplate - Group = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Group GroupUser = Azure::ApiManagement::Mgmt::V2018_06_01_preview::GroupUser IdentityProvider = Azure::ApiManagement::Mgmt::V2018_06_01_preview::IdentityProvider Logger = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Logger @@ -51,10 +51,10 @@ module Mgmt Reports = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Reports Subscription = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Subscription TagResource = Azure::ApiManagement::Mgmt::V2018_06_01_preview::TagResource - Tag = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Tag TagDescription = Azure::ApiManagement::Mgmt::V2018_06_01_preview::TagDescription OperationOperations = Azure::ApiManagement::Mgmt::V2018_06_01_preview::OperationOperations TenantAccess = Azure::ApiManagement::Mgmt::V2018_06_01_preview::TenantAccess + Tag = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Tag TenantAccessGit = Azure::ApiManagement::Mgmt::V2018_06_01_preview::TenantAccessGit TenantConfiguration = Azure::ApiManagement::Mgmt::V2018_06_01_preview::TenantConfiguration User = Azure::ApiManagement::Mgmt::V2018_06_01_preview::User @@ -65,6 +65,86 @@ module Mgmt ApiExport = Azure::ApiManagement::Mgmt::V2018_06_01_preview::ApiExport module Models + TagResourceContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TagResourceContract + RegistrationDelegationSettingsProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RegistrationDelegationSettingsProperties + BackendBaseParameters = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendBaseParameters + QuotaCounterValueContractProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::QuotaCounterValueContractProperties + ParameterContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ParameterContract + ProductUpdateParameters = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ProductUpdateParameters + AuthorizationServerContractBaseProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AuthorizationServerContractBaseProperties + PropertyEntityBaseParameters = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PropertyEntityBaseParameters + SamplingSettings = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SamplingSettings + SubscriptionCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SubscriptionCollection + PropertyUpdateParameters = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PropertyUpdateParameters + PolicyContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PolicyContract + ApiContractProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiContractProperties + ApiContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiContract + ApiReleaseContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiReleaseContract + OperationContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::OperationContract + SchemaContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SchemaContract + IssueContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IssueContract + IssueCommentContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IssueCommentContract + IssueAttachmentContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IssueAttachmentContract + DiagnosticContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::DiagnosticContract + ProductTagResourceContractProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ProductTagResourceContractProperties + ApiTagResourceContractProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiTagResourceContractProperties + ProductContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ProductContract + AuthorizationServerContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AuthorizationServerContract + AuthorizationServerUpdateContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AuthorizationServerUpdateContract + BackendContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendContract + BackendReconnectContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendReconnectContract + CertificateContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::CertificateContract + ApiManagementServiceResource = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiManagementServiceResource + ApiManagementServiceUpdateParameters = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiManagementServiceUpdateParameters + EmailTemplateContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::EmailTemplateContract + GroupContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::GroupContract + UserContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::UserContract + IdentityProviderContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IdentityProviderContract + LoggerContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::LoggerContract + NotificationContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::NotificationContract + RecipientUserContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RecipientUserContract + RecipientEmailContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RecipientEmailContract + OpenidConnectProviderContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::OpenidConnectProviderContract + PortalSigninSettings = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PortalSigninSettings + PortalSignupSettings = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PortalSignupSettings + PortalDelegationSettings = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PortalDelegationSettings + SubscriptionContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SubscriptionContract + PropertyContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PropertyContract + TagContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TagContract + TagDescriptionContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TagDescriptionContract + ApiVersionSetContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiVersionSetContract + PolicyContentFormat = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PolicyContentFormat + Protocol = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::Protocol + ContentFormat = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ContentFormat + SoapApiType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SoapApiType + ApiType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiType + SamplingType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SamplingType + AlwaysLog = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AlwaysLog + ProductState = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ProductState + GrantType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::GrantType + AuthorizationMethod = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AuthorizationMethod + ClientAuthenticationMethod = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ClientAuthenticationMethod + BearerTokenSendingMethod = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BearerTokenSendingMethod + BackendProtocol = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendProtocol + HostnameType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::HostnameType + SkuType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SkuType + VirtualNetworkType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::VirtualNetworkType + NameAvailabilityReason = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::NameAvailabilityReason + GroupType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::GroupType + Confirmation = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::Confirmation + UserState = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::UserState + IdentityProviderType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IdentityProviderType + LoggerType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::LoggerType + ConnectivityStatusType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ConnectivityStatusType + SubscriptionState = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SubscriptionState + AsyncOperationStatus = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AsyncOperationStatus + KeyType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::KeyType + VersioningScheme = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::VersioningScheme + TemplateName = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TemplateName + NotificationName = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::NotificationName + PolicyScopeContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PolicyScopeContract + ExportFormat = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ExportFormat + State = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::State ApiManagementServiceListResult = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiManagementServiceListResult ErrorFieldContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ErrorFieldContract ApiManagementServiceGetSsoTokenResult = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiManagementServiceGetSsoTokenResult @@ -197,93 +277,13 @@ module Models QuotaCounterContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::QuotaCounterContract IssueCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IssueCollection SubscriptionsDelegationSettingsProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SubscriptionsDelegationSettingsProperties - TagResourceContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TagResourceContract - RegistrationDelegationSettingsProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RegistrationDelegationSettingsProperties - BackendBaseParameters = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendBaseParameters - QuotaCounterValueContractProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::QuotaCounterValueContractProperties - ParameterContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ParameterContract - ProductUpdateParameters = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ProductUpdateParameters - AuthorizationServerContractBaseProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AuthorizationServerContractBaseProperties - PropertyEntityBaseParameters = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PropertyEntityBaseParameters - SamplingSettings = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SamplingSettings - SubscriptionCollection = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SubscriptionCollection - PropertyUpdateParameters = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PropertyUpdateParameters - PolicyContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PolicyContract - ApiContractProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiContractProperties - ApiContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiContract - ApiReleaseContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiReleaseContract - OperationContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::OperationContract - SchemaContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SchemaContract - IssueContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IssueContract - IssueCommentContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IssueCommentContract - IssueAttachmentContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IssueAttachmentContract - DiagnosticContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::DiagnosticContract - ProductTagResourceContractProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ProductTagResourceContractProperties - ApiTagResourceContractProperties = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiTagResourceContractProperties - ProductContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ProductContract - AuthorizationServerContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AuthorizationServerContract - AuthorizationServerUpdateContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AuthorizationServerUpdateContract - BackendContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendContract - BackendReconnectContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendReconnectContract - CertificateContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::CertificateContract - ApiManagementServiceResource = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiManagementServiceResource - ApiManagementServiceUpdateParameters = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiManagementServiceUpdateParameters - EmailTemplateContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::EmailTemplateContract - GroupContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::GroupContract - UserContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::UserContract - IdentityProviderContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IdentityProviderContract - LoggerContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::LoggerContract - NotificationContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::NotificationContract - RecipientUserContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RecipientUserContract - RecipientEmailContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RecipientEmailContract - OpenidConnectProviderContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::OpenidConnectProviderContract - PortalSigninSettings = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PortalSigninSettings - PortalSignupSettings = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PortalSignupSettings - PortalDelegationSettings = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PortalDelegationSettings - SubscriptionContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SubscriptionContract - PropertyContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PropertyContract - TagContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TagContract - TagDescriptionContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TagDescriptionContract - ApiVersionSetContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiVersionSetContract - PolicyContentFormat = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PolicyContentFormat - Protocol = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::Protocol - ContentFormat = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ContentFormat - SoapApiType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SoapApiType - ApiType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiType - State = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::State - SamplingType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SamplingType - AlwaysLog = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AlwaysLog - ProductState = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ProductState - GrantType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::GrantType - AuthorizationMethod = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AuthorizationMethod - ClientAuthenticationMethod = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ClientAuthenticationMethod - BearerTokenSendingMethod = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BearerTokenSendingMethod - BackendProtocol = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendProtocol - HostnameType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::HostnameType - SkuType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SkuType - VirtualNetworkType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::VirtualNetworkType - NameAvailabilityReason = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::NameAvailabilityReason - GroupType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::GroupType - Confirmation = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::Confirmation - UserState = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::UserState - IdentityProviderType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IdentityProviderType - LoggerType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::LoggerType - ConnectivityStatusType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ConnectivityStatusType - SubscriptionState = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SubscriptionState - AsyncOperationStatus = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AsyncOperationStatus - KeyType = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::KeyType - VersioningScheme = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::VersioningScheme - TemplateName = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TemplateName - NotificationName = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::NotificationName - PolicyScopeContract = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PolicyScopeContract - ExportFormat = Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ExportFormat end # # ApiManagementManagementClass # class ApiManagementManagementClass - attr_reader :policy, :policy_snippets, :regions, :api, :api_revisions, :api_release, :api_operation, :api_operation_policy, :api_product, :api_policy, :api_schema, :api_diagnostic, :api_issue, :api_issue_comment, :api_issue_attachment, :authorization_server, :backend, :certificate, :api_management_operations, :api_management_service, :diagnostic, :email_template, :group, :group_user, :identity_provider, :logger, :notification, :notification_recipient_user, :notification_recipient_email, :network_status, :open_id_connect_provider, :sign_in_settings, :sign_up_settings, :delegation_settings, :product, :product_api, :product_group, :product_subscriptions, :product_policy, :property, :quota_by_counter_keys, :quota_by_period_keys, :reports, :subscription, :tag_resource, :tag, :tag_description, :operation_operations, :tenant_access, :tenant_access_git, :tenant_configuration, :user, :user_group, :user_subscription, :user_identities, :api_version_set, :api_export, :configurable, :base_url, :options, :model_classes + attr_reader :group, :policy, :policy_snippets, :regions, :api, :api_revisions, :api_release, :api_operation, :api_operation_policy, :api_product, :api_policy, :api_schema, :api_diagnostic, :api_issue, :api_issue_comment, :api_issue_attachment, :authorization_server, :backend, :certificate, :api_management_operations, :api_management_service, :diagnostic, :email_template, :group_user, :identity_provider, :logger, :notification, :notification_recipient_user, :notification_recipient_email, :network_status, :open_id_connect_provider, :sign_in_settings, :sign_up_settings, :delegation_settings, :product, :product_api, :product_group, :product_subscriptions, :product_policy, :property, :quota_by_counter_keys, :quota_by_period_keys, :reports, :subscription, :tag_resource, :tag_description, :operation_operations, :tenant_access, :tag, :tenant_access_git, :tenant_configuration, :user, :user_group, :user_subscription, :user_identities, :api_version_set, :api_export, :configurable, :base_url, :options, :model_classes def initialize(options = {}) if options.is_a?(Hash) && options.length == 0 @@ -303,6 +303,7 @@ def initialize(options = {}) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) + @group = @client_0.group @policy = @client_0.policy @policy_snippets = @client_0.policy_snippets @regions = @client_0.regions @@ -325,7 +326,6 @@ def initialize(options = {}) @api_management_service = @client_0.api_management_service @diagnostic = @client_0.diagnostic @email_template = @client_0.email_template - @group = @client_0.group @group_user = @client_0.group_user @identity_provider = @client_0.identity_provider @logger = @client_0.logger @@ -348,10 +348,10 @@ def initialize(options = {}) @reports = @client_0.reports @subscription = @client_0.subscription @tag_resource = @client_0.tag_resource - @tag = @client_0.tag @tag_description = @client_0.tag_description @operation_operations = @client_0.operation_operations @tenant_access = @client_0.tenant_access + @tag = @client_0.tag @tenant_access_git = @client_0.tenant_access_git @tenant_configuration = @client_0.tenant_configuration @user = @client_0.user @@ -368,18 +368,258 @@ def add_telemetry(client) profile_information = 'Profiles/Latest/ApiManagement/Mgmt' client.add_user_agent_information(profile_information) end - - def method_missing(method, *args) - if @client_0.respond_to?method - @client_0.send(method, *args) - else - super - end + + def method_missing(method, *args) + if @client_0.respond_to?method + @client_0.send(method, *args) + else + super + end + end + + end + + class ModelClasses + def tag_resource_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TagResourceContract + end + def registration_delegation_settings_properties + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RegistrationDelegationSettingsProperties + end + def backend_base_parameters + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendBaseParameters + end + def quota_counter_value_contract_properties + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::QuotaCounterValueContractProperties + end + def parameter_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ParameterContract + end + def product_update_parameters + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ProductUpdateParameters + end + def authorization_server_contract_base_properties + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AuthorizationServerContractBaseProperties + end + def property_entity_base_parameters + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PropertyEntityBaseParameters + end + def sampling_settings + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SamplingSettings + end + def subscription_collection + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SubscriptionCollection + end + def property_update_parameters + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PropertyUpdateParameters + end + def policy_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PolicyContract + end + def api_contract_properties + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiContractProperties + end + def api_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiContract + end + def api_release_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiReleaseContract + end + def operation_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::OperationContract + end + def schema_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SchemaContract + end + def issue_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IssueContract + end + def issue_comment_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IssueCommentContract + end + def issue_attachment_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IssueAttachmentContract + end + def diagnostic_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::DiagnosticContract + end + def product_tag_resource_contract_properties + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ProductTagResourceContractProperties + end + def api_tag_resource_contract_properties + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiTagResourceContractProperties + end + def product_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ProductContract + end + def authorization_server_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AuthorizationServerContract + end + def authorization_server_update_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AuthorizationServerUpdateContract + end + def backend_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendContract + end + def backend_reconnect_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendReconnectContract + end + def certificate_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::CertificateContract + end + def api_management_service_resource + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiManagementServiceResource + end + def api_management_service_update_parameters + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiManagementServiceUpdateParameters + end + def email_template_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::EmailTemplateContract + end + def group_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::GroupContract + end + def user_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::UserContract + end + def identity_provider_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IdentityProviderContract + end + def logger_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::LoggerContract + end + def notification_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::NotificationContract + end + def recipient_user_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RecipientUserContract + end + def recipient_email_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RecipientEmailContract + end + def openid_connect_provider_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::OpenidConnectProviderContract + end + def portal_signin_settings + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PortalSigninSettings + end + def portal_signup_settings + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PortalSignupSettings + end + def portal_delegation_settings + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PortalDelegationSettings + end + def subscription_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SubscriptionContract + end + def property_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PropertyContract + end + def tag_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TagContract + end + def tag_description_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TagDescriptionContract + end + def api_version_set_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiVersionSetContract + end + def policy_content_format + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PolicyContentFormat + end + def protocol + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::Protocol + end + def content_format + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ContentFormat + end + def soap_api_type + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SoapApiType + end + def api_type + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiType + end + def sampling_type + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SamplingType + end + def always_log + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AlwaysLog + end + def product_state + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ProductState + end + def grant_type + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::GrantType + end + def authorization_method + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AuthorizationMethod + end + def client_authentication_method + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ClientAuthenticationMethod + end + def bearer_token_sending_method + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BearerTokenSendingMethod + end + def backend_protocol + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendProtocol + end + def hostname_type + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::HostnameType + end + def sku_type + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SkuType + end + def virtual_network_type + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::VirtualNetworkType + end + def name_availability_reason + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::NameAvailabilityReason + end + def group_type + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::GroupType + end + def confirmation + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::Confirmation + end + def user_state + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::UserState + end + def identity_provider_type + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IdentityProviderType + end + def logger_type + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::LoggerType + end + def connectivity_status_type + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ConnectivityStatusType + end + def subscription_state + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SubscriptionState + end + def async_operation_status + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AsyncOperationStatus + end + def key_type + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::KeyType + end + def versioning_scheme + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::VersioningScheme + end + def template_name + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TemplateName + end + def notification_name + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::NotificationName + end + def policy_scope_contract + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PolicyScopeContract + end + def export_format + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ExportFormat + end + def state + Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::State end - - end - - class ModelClasses def api_management_service_list_result Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiManagementServiceListResult end @@ -776,246 +1016,6 @@ def issue_collection def subscriptions_delegation_settings_properties Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SubscriptionsDelegationSettingsProperties end - def tag_resource_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TagResourceContract - end - def registration_delegation_settings_properties - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RegistrationDelegationSettingsProperties - end - def backend_base_parameters - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendBaseParameters - end - def quota_counter_value_contract_properties - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::QuotaCounterValueContractProperties - end - def parameter_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ParameterContract - end - def product_update_parameters - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ProductUpdateParameters - end - def authorization_server_contract_base_properties - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AuthorizationServerContractBaseProperties - end - def property_entity_base_parameters - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PropertyEntityBaseParameters - end - def sampling_settings - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SamplingSettings - end - def subscription_collection - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SubscriptionCollection - end - def property_update_parameters - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PropertyUpdateParameters - end - def policy_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PolicyContract - end - def api_contract_properties - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiContractProperties - end - def api_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiContract - end - def api_release_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiReleaseContract - end - def operation_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::OperationContract - end - def schema_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SchemaContract - end - def issue_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IssueContract - end - def issue_comment_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IssueCommentContract - end - def issue_attachment_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IssueAttachmentContract - end - def diagnostic_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::DiagnosticContract - end - def product_tag_resource_contract_properties - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ProductTagResourceContractProperties - end - def api_tag_resource_contract_properties - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiTagResourceContractProperties - end - def product_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ProductContract - end - def authorization_server_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AuthorizationServerContract - end - def authorization_server_update_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AuthorizationServerUpdateContract - end - def backend_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendContract - end - def backend_reconnect_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendReconnectContract - end - def certificate_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::CertificateContract - end - def api_management_service_resource - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiManagementServiceResource - end - def api_management_service_update_parameters - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiManagementServiceUpdateParameters - end - def email_template_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::EmailTemplateContract - end - def group_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::GroupContract - end - def user_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::UserContract - end - def identity_provider_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IdentityProviderContract - end - def logger_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::LoggerContract - end - def notification_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::NotificationContract - end - def recipient_user_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RecipientUserContract - end - def recipient_email_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::RecipientEmailContract - end - def openid_connect_provider_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::OpenidConnectProviderContract - end - def portal_signin_settings - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PortalSigninSettings - end - def portal_signup_settings - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PortalSignupSettings - end - def portal_delegation_settings - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PortalDelegationSettings - end - def subscription_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SubscriptionContract - end - def property_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PropertyContract - end - def tag_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TagContract - end - def tag_description_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TagDescriptionContract - end - def api_version_set_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiVersionSetContract - end - def policy_content_format - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PolicyContentFormat - end - def protocol - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::Protocol - end - def content_format - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ContentFormat - end - def soap_api_type - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SoapApiType - end - def api_type - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ApiType - end - def state - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::State - end - def sampling_type - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SamplingType - end - def always_log - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AlwaysLog - end - def product_state - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ProductState - end - def grant_type - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::GrantType - end - def authorization_method - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AuthorizationMethod - end - def client_authentication_method - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ClientAuthenticationMethod - end - def bearer_token_sending_method - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BearerTokenSendingMethod - end - def backend_protocol - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::BackendProtocol - end - def hostname_type - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::HostnameType - end - def sku_type - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SkuType - end - def virtual_network_type - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::VirtualNetworkType - end - def name_availability_reason - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::NameAvailabilityReason - end - def group_type - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::GroupType - end - def confirmation - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::Confirmation - end - def user_state - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::UserState - end - def identity_provider_type - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::IdentityProviderType - end - def logger_type - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::LoggerType - end - def connectivity_status_type - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ConnectivityStatusType - end - def subscription_state - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::SubscriptionState - end - def async_operation_status - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::AsyncOperationStatus - end - def key_type - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::KeyType - end - def versioning_scheme - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::VersioningScheme - end - def template_name - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::TemplateName - end - def notification_name - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::NotificationName - end - def policy_scope_contract - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::PolicyScopeContract - end - def export_format - Azure::ApiManagement::Mgmt::V2018_06_01_preview::Models::ExportFormat - end end end end From 265d3ebd55941dc1c7b40fb5dbc48e68319417bf Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 9 Nov 2018 23:28:05 +0000 Subject: [PATCH 2/3] Generated from dcb5eb7ef83a50275a7d92747baaad3a850286a4 Added missing PATCH operation to Api Issue resource --- .../generated/azure_mgmt_api_management.rb | 60 ++++++------ .../azure_mgmt_api_management/api_issue.rb | 33 ++----- .../models/issue_contract.rb | 54 +++++------ .../models/issue_contract_base_properties.rb | 66 +++++++++++++ .../models/issue_update_contract.rb | 96 +++++++++++++++++++ 5 files changed, 226 insertions(+), 83 deletions(-) create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_contract_base_properties.rb create mode 100644 management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_update_contract.rb diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management.rb index 9183456d9e..82d226a16f 100644 --- a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management.rb +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management.rb @@ -82,29 +82,29 @@ module Azure::ApiManagement::Mgmt::V2018_01_01_preview autoload :ApiManagementClient, '2018-01-01/generated/azure_mgmt_api_management/api_management_client.rb' module Models + autoload :ApimResource, '2018-01-01/generated/azure_mgmt_api_management/models/apim_resource.rb' + autoload :HostnameConfiguration, '2018-01-01/generated/azure_mgmt_api_management/models/hostname_configuration.rb' autoload :VirtualNetworkConfiguration, '2018-01-01/generated/azure_mgmt_api_management/models/virtual_network_configuration.rb' - autoload :ErrorFieldContract, '2018-01-01/generated/azure_mgmt_api_management/models/error_field_contract.rb' - autoload :ApiManagementServiceSkuProperties, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_sku_properties.rb' autoload :ErrorResponse, '2018-01-01/generated/azure_mgmt_api_management/models/error_response.rb' - autoload :AdditionalLocation, '2018-01-01/generated/azure_mgmt_api_management/models/additional_location.rb' + autoload :ApiManagementServiceSkuProperties, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_sku_properties.rb' autoload :PolicyCollection, '2018-01-01/generated/azure_mgmt_api_management/models/policy_collection.rb' - autoload :ApiManagementServiceBackupRestoreParameters, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_backup_restore_parameters.rb' + autoload :AdditionalLocation, '2018-01-01/generated/azure_mgmt_api_management/models/additional_location.rb' autoload :PolicySnippetsCollection, '2018-01-01/generated/azure_mgmt_api_management/models/policy_snippets_collection.rb' - autoload :ApiManagementServiceBaseProperties, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_base_properties.rb' + autoload :ApiManagementServiceBackupRestoreParameters, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_backup_restore_parameters.rb' autoload :RegionListResult, '2018-01-01/generated/azure_mgmt_api_management/models/region_list_result.rb' - autoload :ApiManagementServiceIdentity, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_identity.rb' + autoload :ApiManagementServiceBaseProperties, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_base_properties.rb' autoload :ApiExportResult, '2018-01-01/generated/azure_mgmt_api_management/models/api_export_result.rb' - autoload :ApiVersionSetContractDetails, '2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_contract_details.rb' + autoload :ApiManagementServiceIdentity, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_identity.rb' + autoload :CertificateCreateOrUpdateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/certificate_create_or_update_parameters.rb' autoload :AccessInformationContract, '2018-01-01/generated/azure_mgmt_api_management/models/access_information_contract.rb' + autoload :CertificateInformation, '2018-01-01/generated/azure_mgmt_api_management/models/certificate_information.rb' + autoload :ApiCreateOrUpdatePropertiesWsdlSelector, '2018-01-01/generated/azure_mgmt_api_management/models/api_create_or_update_properties_wsdl_selector.rb' autoload :CertificateConfiguration, '2018-01-01/generated/azure_mgmt_api_management/models/certificate_configuration.rb' - autoload :ApiCollection, '2018-01-01/generated/azure_mgmt_api_management/models/api_collection.rb' - autoload :HostnameConfiguration, '2018-01-01/generated/azure_mgmt_api_management/models/hostname_configuration.rb' - autoload :ApiCreateOrUpdateParameter, '2018-01-01/generated/azure_mgmt_api_management/models/api_create_or_update_parameter.rb' + autoload :ApiUpdateContract, '2018-01-01/generated/azure_mgmt_api_management/models/api_update_contract.rb' autoload :ErrorResponseBody, '2018-01-01/generated/azure_mgmt_api_management/models/error_response_body.rb' - autoload :OAuth2AuthenticationSettingsContract, '2018-01-01/generated/azure_mgmt_api_management/models/oauth2authentication_settings_contract.rb' autoload :OpenIdAuthenticationSettingsContract, '2018-01-01/generated/azure_mgmt_api_management/models/open_id_authentication_settings_contract.rb' autoload :AuthenticationSettingsContract, '2018-01-01/generated/azure_mgmt_api_management/models/authentication_settings_contract.rb' - autoload :PropertyUpdateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/property_update_parameters.rb' + autoload :PropertyCollection, '2018-01-01/generated/azure_mgmt_api_management/models/property_collection.rb' autoload :ApiEntityBaseContract, '2018-01-01/generated/azure_mgmt_api_management/models/api_entity_base_contract.rb' autoload :PolicySnippetContract, '2018-01-01/generated/azure_mgmt_api_management/models/policy_snippet_contract.rb' autoload :ApiRevisionCollection, '2018-01-01/generated/azure_mgmt_api_management/models/api_revision_collection.rb' @@ -112,15 +112,17 @@ module Models autoload :TagDescriptionCreateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/tag_description_create_parameters.rb' autoload :Resource, '2018-01-01/generated/azure_mgmt_api_management/models/resource.rb' autoload :TagDescriptionCollection, '2018-01-01/generated/azure_mgmt_api_management/models/tag_description_collection.rb' - autoload :PropertyCollection, '2018-01-01/generated/azure_mgmt_api_management/models/property_collection.rb' + autoload :ApiVersionSetContractDetails, '2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_contract_details.rb' autoload :ParameterContract, '2018-01-01/generated/azure_mgmt_api_management/models/parameter_contract.rb' autoload :PropertyEntityBaseParameters, '2018-01-01/generated/azure_mgmt_api_management/models/property_entity_base_parameters.rb' autoload :RequestContract, '2018-01-01/generated/azure_mgmt_api_management/models/request_contract.rb' - autoload :ApimResource, '2018-01-01/generated/azure_mgmt_api_management/models/apim_resource.rb' + autoload :PropertyUpdateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/property_update_parameters.rb' autoload :OperationEntityBaseContract, '2018-01-01/generated/azure_mgmt_api_management/models/operation_entity_base_contract.rb' + autoload :ErrorFieldContract, '2018-01-01/generated/azure_mgmt_api_management/models/error_field_contract.rb' autoload :AccessInformationUpdateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/access_information_update_parameters.rb' - autoload :ApiManagementServiceListResult, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_list_result.rb' autoload :TagCreateUpdateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/tag_create_update_parameters.rb' + autoload :ApiManagementServiceListResult, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_list_result.rb' + autoload :IssueUpdateContract, '2018-01-01/generated/azure_mgmt_api_management/models/issue_update_contract.rb' autoload :ApiManagementServiceGetSsoTokenResult, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_get_sso_token_result.rb' autoload :TagCollection, '2018-01-01/generated/azure_mgmt_api_management/models/tag_collection.rb' autoload :ApiManagementServiceCheckNameAvailabilityParameters, '2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_check_name_availability_parameters.rb' @@ -158,19 +160,19 @@ module Models autoload :GroupCreateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/group_create_parameters.rb' autoload :QuotaCounterValueContractProperties, '2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_value_contract_properties.rb' autoload :GroupUpdateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/group_update_parameters.rb' - autoload :CertificateCreateOrUpdateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/certificate_create_or_update_parameters.rb' + autoload :ApiCollection, '2018-01-01/generated/azure_mgmt_api_management/models/api_collection.rb' autoload :UserIdentityContract, '2018-01-01/generated/azure_mgmt_api_management/models/user_identity_contract.rb' - autoload :ApiCreateOrUpdatePropertiesWsdlSelector, '2018-01-01/generated/azure_mgmt_api_management/models/api_create_or_update_properties_wsdl_selector.rb' + autoload :OAuth2AuthenticationSettingsContract, '2018-01-01/generated/azure_mgmt_api_management/models/oauth2authentication_settings_contract.rb' autoload :UserEntityBaseParameters, '2018-01-01/generated/azure_mgmt_api_management/models/user_entity_base_parameters.rb' - autoload :SubscriptionKeyParameterNamesContract, '2018-01-01/generated/azure_mgmt_api_management/models/subscription_key_parameter_names_contract.rb' + autoload :ApiRevisionContract, '2018-01-01/generated/azure_mgmt_api_management/models/api_revision_contract.rb' autoload :ApiVersionSetCollection, '2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_collection.rb' - autoload :ApiRevisionInfoContract, '2018-01-01/generated/azure_mgmt_api_management/models/api_revision_info_contract.rb' + autoload :ApiReleaseCollection, '2018-01-01/generated/azure_mgmt_api_management/models/api_release_collection.rb' autoload :UserCollection, '2018-01-01/generated/azure_mgmt_api_management/models/user_collection.rb' - autoload :OperationCollection, '2018-01-01/generated/azure_mgmt_api_management/models/operation_collection.rb' + autoload :RepresentationContract, '2018-01-01/generated/azure_mgmt_api_management/models/representation_contract.rb' autoload :UserUpdateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/user_update_parameters.rb' - autoload :ResponseContract, '2018-01-01/generated/azure_mgmt_api_management/models/response_contract.rb' + autoload :OperationUpdateContract, '2018-01-01/generated/azure_mgmt_api_management/models/operation_update_contract.rb' autoload :IdentityProviderList, '2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_list.rb' - autoload :SchemaCollection, '2018-01-01/generated/azure_mgmt_api_management/models/schema_collection.rb' + autoload :IssueCollection, '2018-01-01/generated/azure_mgmt_api_management/models/issue_collection.rb' autoload :IdentityProviderUpdateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_update_parameters.rb' autoload :IssueCommentCollection, '2018-01-01/generated/azure_mgmt_api_management/models/issue_comment_collection.rb' autoload :IdentityProviderBaseParameters, '2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_base_parameters.rb' @@ -190,13 +192,13 @@ module Models autoload :UserIdentityCollection, '2018-01-01/generated/azure_mgmt_api_management/models/user_identity_collection.rb' autoload :QuotaCounterContract, '2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_contract.rb' autoload :RecipientEmailCollection, '2018-01-01/generated/azure_mgmt_api_management/models/recipient_email_collection.rb' - autoload :CertificateInformation, '2018-01-01/generated/azure_mgmt_api_management/models/certificate_information.rb' + autoload :ApiCreateOrUpdateParameter, '2018-01-01/generated/azure_mgmt_api_management/models/api_create_or_update_parameter.rb' autoload :ConnectivityStatusContract, '2018-01-01/generated/azure_mgmt_api_management/models/connectivity_status_contract.rb' - autoload :ApiRevisionContract, '2018-01-01/generated/azure_mgmt_api_management/models/api_revision_contract.rb' + autoload :ApiRevisionInfoContract, '2018-01-01/generated/azure_mgmt_api_management/models/api_revision_info_contract.rb' autoload :NetworkStatusContract, '2018-01-01/generated/azure_mgmt_api_management/models/network_status_contract.rb' - autoload :RepresentationContract, '2018-01-01/generated/azure_mgmt_api_management/models/representation_contract.rb' + autoload :ResponseContract, '2018-01-01/generated/azure_mgmt_api_management/models/response_contract.rb' autoload :NetworkStatusContractByLocation, '2018-01-01/generated/azure_mgmt_api_management/models/network_status_contract_by_location.rb' - autoload :IssueCollection, '2018-01-01/generated/azure_mgmt_api_management/models/issue_collection.rb' + autoload :IssueContractBaseProperties, '2018-01-01/generated/azure_mgmt_api_management/models/issue_contract_base_properties.rb' autoload :UserCreateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/user_create_parameters.rb' autoload :DiagnosticCollection, '2018-01-01/generated/azure_mgmt_api_management/models/diagnostic_collection.rb' autoload :OpenIdConnectProviderCollection, '2018-01-01/generated/azure_mgmt_api_management/models/open_id_connect_provider_collection.rb' @@ -206,15 +208,15 @@ module Models autoload :GenerateSsoUrlResult, '2018-01-01/generated/azure_mgmt_api_management/models/generate_sso_url_result.rb' autoload :BackendCollection, '2018-01-01/generated/azure_mgmt_api_management/models/backend_collection.rb' autoload :TermsOfServiceProperties, '2018-01-01/generated/azure_mgmt_api_management/models/terms_of_service_properties.rb' - autoload :ApiUpdateContract, '2018-01-01/generated/azure_mgmt_api_management/models/api_update_contract.rb' + autoload :SubscriptionKeyParameterNamesContract, '2018-01-01/generated/azure_mgmt_api_management/models/subscription_key_parameter_names_contract.rb' autoload :TenantConfigurationSyncStateContract, '2018-01-01/generated/azure_mgmt_api_management/models/tenant_configuration_sync_state_contract.rb' - autoload :OperationUpdateContract, '2018-01-01/generated/azure_mgmt_api_management/models/operation_update_contract.rb' + autoload :SchemaCollection, '2018-01-01/generated/azure_mgmt_api_management/models/schema_collection.rb' autoload :SubscriptionsDelegationSettingsProperties, '2018-01-01/generated/azure_mgmt_api_management/models/subscriptions_delegation_settings_properties.rb' autoload :RequestReportRecordContract, '2018-01-01/generated/azure_mgmt_api_management/models/request_report_record_contract.rb' autoload :RegistrationDelegationSettingsProperties, '2018-01-01/generated/azure_mgmt_api_management/models/registration_delegation_settings_properties.rb' autoload :BackendProxyContract, '2018-01-01/generated/azure_mgmt_api_management/models/backend_proxy_contract.rb' autoload :SaveConfigurationParameter, '2018-01-01/generated/azure_mgmt_api_management/models/save_configuration_parameter.rb' - autoload :ApiReleaseCollection, '2018-01-01/generated/azure_mgmt_api_management/models/api_release_collection.rb' + autoload :OperationCollection, '2018-01-01/generated/azure_mgmt_api_management/models/operation_collection.rb' autoload :ProductUpdateParameters, '2018-01-01/generated/azure_mgmt_api_management/models/product_update_parameters.rb' autoload :QuotaCounterValueContract, '2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_value_contract.rb' autoload :OperationResultContract, '2018-01-01/generated/azure_mgmt_api_management/models/operation_result_contract.rb' diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_issue.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_issue.rb index 30f81cc43e..57e5006e2f 100644 --- a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_issue.rb +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_issue.rb @@ -495,18 +495,17 @@ def create_or_update_async(resource_group_name, service_name, api_id, issue_id, # Management service instance. # @param issue_id [String] Issue identifier. Must be unique in the current API # Management service instance. - # @param parameters [IssueContract] Update parameters. + # @param parameters [IssueUpdateContract] Update parameters. # @param if_match [String] ETag of the Issue Entity. ETag should match the # current entity state from the header response of the GET request or it should # be * for unconditional update. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [IssueContract] operation results. # def update(resource_group_name, service_name, api_id, issue_id, parameters, if_match = nil, custom_headers = nil) response = update_async(resource_group_name, service_name, api_id, issue_id, parameters, if_match, custom_headers).value! - response.body unless response.nil? + nil end # @@ -518,7 +517,7 @@ def update(resource_group_name, service_name, api_id, issue_id, parameters, if_m # Management service instance. # @param issue_id [String] Issue identifier. Must be unique in the current API # Management service instance. - # @param parameters [IssueContract] Update parameters. + # @param parameters [IssueUpdateContract] Update parameters. # @param if_match [String] ETag of the Issue Entity. ETag should match the # current entity state from the header response of the GET request or it should # be * for unconditional update. @@ -540,7 +539,7 @@ def update_with_http_info(resource_group_name, service_name, api_id, issue_id, p # Management service instance. # @param issue_id [String] Issue identifier. Must be unique in the current API # Management service instance. - # @param parameters [IssueContract] Update parameters. + # @param parameters [IssueUpdateContract] Update parameters. # @param if_match [String] ETag of the Issue Entity. ETag should match the # current entity state from the header response of the GET request or it should # be * for unconditional update. @@ -569,7 +568,7 @@ def update_async(resource_group_name, service_name, api_id, issue_id, parameters request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueContract.mapper() + request_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueUpdateContract.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil @@ -591,32 +590,12 @@ def update_async(resource_group_name, service_name, api_id, issue_id, parameters http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 201 || status_code == 200 + unless status_code == 204 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 201 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueContract.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01_preview::Models::IssueContract.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 diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_contract.rb index 3f5e0f7d2d..e8fd7fe04a 100644 --- a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_contract.rb +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_contract.rb @@ -12,12 +12,6 @@ class IssueContract < Resource include MsRestAzure - # @return [String] The issue title. - attr_accessor :title - - # @return [String] Text describing the issue. - attr_accessor :description - # @return [DateTime] Date and time when the issue was created. attr_accessor :created_date @@ -25,13 +19,19 @@ class IssueContract < Resource # 'proposed', 'open', 'removed', 'resolved', 'closed' attr_accessor :state - # @return [String] A resource identifier for the user created the issue. - attr_accessor :user_id - # @return [String] A resource identifier for the API the issue was # created for. attr_accessor :api_id + # @return [String] The issue title. + attr_accessor :title + + # @return [String] Text describing the issue. + attr_accessor :description + + # @return [String] A resource identifier for the user created the issue. + attr_accessor :user_id + # # Mapper for IssueContract class as Ruby Hash. @@ -69,44 +69,44 @@ def self.mapper() name: 'String' } }, - title: { - required: true, - serialized_name: 'properties.title', + created_date: { + required: false, + serialized_name: 'properties.createdDate', type: { - name: 'String' + name: 'DateTime' } }, - description: { - required: true, - serialized_name: 'properties.description', + state: { + required: false, + serialized_name: 'properties.state', type: { name: 'String' } }, - created_date: { + api_id: { required: false, - serialized_name: 'properties.createdDate', + serialized_name: 'properties.apiId', type: { - name: 'DateTime' + name: 'String' } }, - state: { - required: false, - serialized_name: 'properties.state', + title: { + required: true, + serialized_name: 'properties.title', type: { name: 'String' } }, - user_id: { + description: { required: true, - serialized_name: 'properties.userId', + serialized_name: 'properties.description', type: { name: 'String' } }, - api_id: { - required: false, - serialized_name: 'properties.apiId', + user_id: { + required: true, + serialized_name: 'properties.userId', type: { name: 'String' } diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_contract_base_properties.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_contract_base_properties.rb new file mode 100644 index 0000000000..8fd19636a1 --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_contract_base_properties.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Issue contract Base Properties. + # + class IssueContractBaseProperties + + include MsRestAzure + + # @return [DateTime] Date and time when the issue was created. + attr_accessor :created_date + + # @return [State] Status of the issue. Possible values include: + # 'proposed', 'open', 'removed', 'resolved', 'closed' + attr_accessor :state + + # @return [String] A resource identifier for the API the issue was + # created for. + attr_accessor :api_id + + + # + # Mapper for IssueContractBaseProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'IssueContractBaseProperties', + type: { + name: 'Composite', + class_name: 'IssueContractBaseProperties', + model_properties: { + created_date: { + required: false, + serialized_name: 'createdDate', + type: { + name: 'DateTime' + } + }, + state: { + required: false, + serialized_name: 'state', + type: { + name: 'String' + } + }, + api_id: { + required: false, + serialized_name: 'apiId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_update_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_update_contract.rb new file mode 100644 index 0000000000..5242fc04fc --- /dev/null +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/issue_update_contract.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::ApiManagement::Mgmt::V2018_01_01_preview + module Models + # + # Issue update Parameters. + # + class IssueUpdateContract + + include MsRestAzure + + # @return [DateTime] Date and time when the issue was created. + attr_accessor :created_date + + # @return [State] Status of the issue. Possible values include: + # 'proposed', 'open', 'removed', 'resolved', 'closed' + attr_accessor :state + + # @return [String] A resource identifier for the API the issue was + # created for. + attr_accessor :api_id + + # @return [String] The issue title. + attr_accessor :title + + # @return [String] Text describing the issue. + attr_accessor :description + + # @return [String] A resource identifier for the user created the issue. + attr_accessor :user_id + + + # + # Mapper for IssueUpdateContract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'IssueUpdateContract', + type: { + name: 'Composite', + class_name: 'IssueUpdateContract', + model_properties: { + created_date: { + required: false, + serialized_name: 'properties.createdDate', + type: { + name: 'DateTime' + } + }, + state: { + required: false, + serialized_name: 'properties.state', + type: { + name: 'String' + } + }, + api_id: { + required: false, + serialized_name: 'properties.apiId', + type: { + name: 'String' + } + }, + title: { + required: false, + serialized_name: 'properties.title', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + user_id: { + required: false, + serialized_name: 'properties.userId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end From 7220041f43722970463c4a03a444edb0d908bc87 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 14 Nov 2018 15:48:44 +0000 Subject: [PATCH 3/3] Generated from ccc27d4c2f7026867aa2bcf3e67b6359c3ec0f11 Added missing PATCH operation to Api Issue resource --- .../generated/azure_mgmt_api_management/models/user_contract.rb | 1 - .../azure_mgmt_api_management/models/user_create_parameters.rb | 1 - .../models/user_entity_base_parameters.rb | 1 - .../azure_mgmt_api_management/models/user_update_parameters.rb | 1 - 4 files changed, 4 deletions(-) diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_contract.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_contract.rb index 3a8473120c..d2fdaa9511 100644 --- a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_contract.rb +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_contract.rb @@ -98,7 +98,6 @@ def self.mapper() }, identities: { required: false, - read_only: true, serialized_name: 'properties.identities', type: { name: 'Sequence', diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_create_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_create_parameters.rb index 5208790cd3..e24452efae 100644 --- a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_create_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_create_parameters.rb @@ -74,7 +74,6 @@ def self.mapper() }, identities: { required: false, - read_only: true, serialized_name: 'properties.identities', type: { name: 'Sequence', diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_entity_base_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_entity_base_parameters.rb index db6f755ad0..0cfd1b6d72 100644 --- a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_entity_base_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_entity_base_parameters.rb @@ -55,7 +55,6 @@ def self.mapper() }, identities: { required: false, - read_only: true, serialized_name: 'identities', type: { name: 'Sequence', diff --git a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_update_parameters.rb b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_update_parameters.rb index 87825d2ccf..cfe984f347 100644 --- a/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_update_parameters.rb +++ b/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_update_parameters.rb @@ -68,7 +68,6 @@ def self.mapper() }, identities: { required: false, - read_only: true, serialized_name: 'properties.identities', type: { name: 'Sequence',